A180041 Number of Goldbach partitions of (2n)^n.
0, 2, 13, 53, 810, 20564, 274904, 6341424, 419586990
Offset: 1
Examples
a(1) = 0 because 2*1 = 2 is too small to be the sum of two primes. a(2) = 2 because 4^2 = 16 = 3+13 = 5+11. a(3) = 13 because 6^3 = 216 and A180007(3) = Number of Goldbach partitions of 6^3 = 13. a(4) = 53 because 8^4 = 2^12 and A006307(12) = Number of ways writing 2^12 as unordered sums of 2 primes.
Programs
-
Maple
A180041 := proc(n) local a,m,p: if(n=1)then return 0:fi: a:=0: m:=(2*n)^n: p:=prevprime(ceil((m-1)/2)): while p > 2 do if isprime(m-p) then a:=a+1: fi: p := prevprime(p): od: return a: end: seq(A180041(n),n=1..5); # Nathaniel Johnston, May 08 2011
-
Mathematica
f[n_] := Block[{c = 0, p = 3, m = (2 n)^n}, lmt = Floor[m/2] + 1; While[p < lmt, If[ PrimeQ[m - p], c++ ]; p = NextPrime@p]; c]; Do[ Print[{n, f@n // Timing}], {n, 8}] (* Robert G. Wilson v, Aug 10 2010 *)
Extensions
a(6)-a(8) from Robert G. Wilson v, Aug 10 2010
a(9) from Giovanni Resta, Apr 15 2019
Comments