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!)
A271394 1 and the prime powers (p^k, p prime, k >= 1) such that p^k - k and p^k + k are prime powers. 0
1, 2, 3, 8, 9, 25, 32, 512, 6561, 36703368217294125441230211032033660188801 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(10) = 7^48. If it exists, a(11) > 10^100. - Giovanni Resta, Apr 12 2016
LINKS
EXAMPLE
6561 is in this sequence because 6561 = 3^8, 6561 - 8 = 6553 is prime and 6561 + 8 = 6569 is prime.
MATHEMATICA
nn = 10^6; {1}~Join~Sort@ Apply[Power, Select[Flatten[Function[k, {#, k}] /@ Range[Floor@ Log[#, nn]] & /@ Prime@ Range@ PrimePi@ nn, 1], With[{p = First@ #, k = Last@ #}, And[Or[PrimePowerQ@ #, # == 1] &[p^k - k], Or[PrimePowerQ@ #, # == 1] &[p^k + k]]] &], 1] (* Michael De Vlieger, Apr 06 2016 *)
PROG
(PARI) ispp(n) = (n==1) || isprimepower(n);
isok(n) = (n==1) || ((k=isprimepower(n)) && ispp(n+k) && ispp(n-k));
\\ Michel Marcus, Apr 07 2016
CROSSREFS
Sequence in context: A279090 A163168 A085453 * A030439 A119386 A162219
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(10) from Giovanni Resta, Apr 12 2016
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 April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)