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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A084440 Number of ways to write the n-th prime as 1+p+p^k, p prime and k>0. 6

%I #11 Dec 13 2023 15:16:20

%S 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,

%T 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,

%U 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

%N Number of ways to write the n-th prime as 1+p+p^k, p prime and k>0.

%C a(A084441(n))>0, a(A084442(n))=1, a(A084443(n))=0.

%H Robert Israel, <a href="/A084440/b084440.txt">Table of n, a(n) for n = 1..10000</a>

%e a(11)=2: prime(11) = 31 = 1+5+5^2 = 1+3+3^3.

%p N:= 200:

%p V:= Vector(N):

%p P:= [seq(ithprime(i),i=1..N)]:

%p for i from 1 to N do

%p p:= P[i];

%p for k from 1 do

%p q:= 1+p+p^k;

%p if q > P[N] then break fi;

%p r:= ListTools:-BinarySearch(P,q);

%p if r > 0 then V[r]:= V[r]+1 fi;

%p od od:

%p convert(V,list); # _Robert Israel_, Dec 13 2023

%Y Cf. A084441, A084442, A084443.

%K nonn

%O 1,4

%A _Reinhard Zumkeller_, May 26 2003

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 April 24 11:49 EDT 2024. Contains 371936 sequences. (Running on oeis4.)