login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115230 Let p = prime(n); a(n) = number of ways to write p = 2^i + q^j where i >= 0, j >= 1, q = odd prime. 5
1, 1, 2, 2, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 2, 2, 3, 2, 4, 3, 2, 2, 2, 2, 2, 4, 1, 3, 3, 4, 0, 2, 3, 1, 3, 3, 1, 4, 1, 1, 2, 4, 2, 1, 3, 3, 2, 1, 3, 1, 3, 2, 1, 3, 2, 2, 3, 4, 2, 1, 2, 2, 0, 1, 3, 2, 4, 2, 2, 0, 2, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 3, 0, 2, 3, 2, 1, 1, 3, 1, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..105.

FORMULA

a(n) = sum(A036987(k-1)*A000035(p-k)*A010055(p-k): 1<=k<p, p=prime(n)). [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:

A036987 := proc(n) A000108(n) mod 2 ; 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:

A115230 := proc(n) p := ithprime(n) ; add(A036987(k-1)*A000035(p-k)*A010055(p-k), k=1..p-1) ; end proc: seq(A115230(n), n=1..40) ; # R. J. Mathar, Apr 30 2010 (End)

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

Cf. A115231-A115233, A000079, A061345.

Sequence in context: A321860 A348459 A266123 * A338686 A338687 A331677

Adjacent sequences: A115227 A115228 A115229 * A115231 A115232 A115233

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 Reinhard Zumkeller, Apr 30 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 9 17:46 EST 2022. Contains 358703 sequences. (Running on oeis4.)