|
|
A180041
|
|
Number of Goldbach partitions of (2n)^n.
|
|
1
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
This is the main diagonal of the array mentioned in A180007, only considering even rows (as odd numbers cannot be the sums of two odd primes), namely A(2n, n) = number of ways of writing (2n)^n as the sum of two odd primes, when the order does not matter.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
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.
|
|
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 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
more,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|