OFFSET
1,4
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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