OFFSET
1,3
FORMULA
a(n) = Sum_{k=1..prime(n)-1} A036987(k-1)*A000035(p-k)*A010055(p-k). - Reinhard Zumkeller, Apr 29 2010
EXAMPLE
n=25: A000040(25) = 97 = 2^6 + 3*11 = 2^5 + 5*13 = 2^4 + 3^4 = 2^3 + 89^1 = 2^2 + 3*31 = 2^1 + 5*19 = 2^0 + 3*2^5, therefore a(25) = #{[16+81], [8+89]} = 2.
MAPLE
From Reinhard Zumkeller, Apr 30 2010: (Start)
A000035 := proc(n) n mod 2 ; end proc:
A000108 := proc(n) binomial(2*n, n)/(n+1) ; end proc:
A010055 := proc(n) if n = 1 then 1; else numtheory[factorset](n) ; if nops(%) = 1 then 1; else 0; end if; end if: end proc:
MATHEMATICA
f[p_] := Length@ Table[q = p - 2^exp; If[ PrimeNu@ q == 1, {q}, Sequence @@ {}], {exp, 0, Floor@ Log2@ p}]; Table[ f[ Prime[ n]], {n, 105}] (* Robert G. Wilson v, Oct 05 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 17 2006
EXTENSIONS
Recomputed by Charles R Greathouse IV, Ray Chandler, R. J. Mathar, and Reinhard Zumkeller, Apr 29 2010; thanks to Charles R Greathouse IV, who pointed out that there were many errors in entries of A115230-A115233.
Edited by N. J. A. Sloane, Apr 30 2010
Formula corrected (thanks to R. J. Mathar, who found an error in it) by Reinhard Zumkeller, Apr 30 2010
STATUS
approved