login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A084440
Number of ways to write the n-th prime as 1+p+p^k, p prime and k>0.
6
0, 0, 1, 2, 2, 1, 0, 1, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0
OFFSET
1,4
COMMENTS
a(A084441(n))>0, a(A084442(n))=1, a(A084443(n))=0.
LINKS
EXAMPLE
a(11)=2: prime(11) = 31 = 1+5+5^2 = 1+3+3^3.
MAPLE
N:= 200:
V:= Vector(N):
P:= [seq(ithprime(i), i=1..N)]:
for i from 1 to N do
p:= P[i];
for k from 1 do
q:= 1+p+p^k;
if q > P[N] then break fi;
r:= ListTools:-BinarySearch(P, q);
if r > 0 then V[r]:= V[r]+1 fi;
od od:
convert(V, list); # Robert Israel, Dec 13 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 26 2003
STATUS
approved