A065577 Number of Goldbach partitions of 10^n?
Richard Mathar
mathar at strw.leidenuniv.nl
Wed Nov 1 14:17:58 CET 2006
zs> From seqfan-owner at ext.jussieu.fr Wed Nov 1 06:44:53 2006
zs> Return-Path: <seqfan-owner at ext.jussieu.fr>
zs> Date: Tue, 31 Oct 2006 21:43:12 -0800 (PST)
zs> From: zak seidov <zakseidov at yahoo.com>
zs> Subject: A065577 Number of Goldbach partitions of 10^n? More terms?
zs> To: seqfan at ext.jussieu.fr, ip at sciserv.org, rgwv at rgwv.com
zs>
zs> Dear seqfans,
zs> Bob, Ivars,
zs>
zs> In A065577,
zs> a(1)=2 because 10=3+7=5+5?
zs> Also a(2)=6 because
zs> 100=3+97=11+89=17+83=29+71=41+59=47+53?
zs> ....
One might call A065577 explicitly the partitions without regard to order. The
conversion between the two counts is simple, see
http://mathworld.wolfram.com/GoldbachPartition.html
The table of n, ordered, and non-ordered partitions is
1, 3, 2
2, 12, 6
3, 56, 28
4, 254, 127
5, 1620, 810
6, 10804, 5402
7, 77614, 38807
with the ordered partitions in the OEIS as A073610, the non-ordered in A061358 (?)
(Cf from A065577 to these two might also help to show the difference,
A065577(n)=A061358(10^n).)
With the exception of the n=1 leading term, the count of the
ordered partitions is twice that of the non-ordered partitions,
because 10^n/2 is not a prime then.
The Maple program to print the small table above:
A065577 := proc(n,orderd)
local N,a,i,ip;
N := 10^n ;
a := 0 ;
i := 1 ;
ip := 2 ;
while 2*ip <= N do
if isprime(N-ip) then
if orderd and ip <> N-ip then
a := a+ 2;
else
a := a+ 1;
fi ;
fi ;
i := i+1 ;
ip := ithprime(i) ;
od ;
RETURN(a) ;
end:
for n from 1 to 20 do
print(n,A065577(n,true),A065577(n,false)) ;
od ;
In PARI
A065577(n)={
local(N,a,i,ip);
N = 10^n ;
a = 0 ;
i = 1 ;
ip = 2 ;
while(2*ip <= N,
if(isprime(N-ip),
a++ ;
) ;
i++ ;
\\ip = prime(i) ; \\ slower and needs -p switch
ip = nextprime(ip+1) ; \\ pseudoprimes only
) ;
return(a) ;
}
{
for(n=1,20,
print(n," ",A065577(n)) ;
)
}
The PARI output confirms the n=9 case quoted by Zak (I've not gone to n=10):
1 2
2 6
3 28
4 127
5 810
6 5402
7 38807
8 291400
9 2274205
-- Richard
More information about the SeqFan
mailing list