login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A264734 Prime powers k such that k - 2 and k + 2 are prime powers. 2
3, 5, 7, 9, 11, 25, 27, 29, 81, 241, 59051, 450283905890997361, 36472996377170786401 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

From Robert Israel, Nov 22 2015: (Start)

a(14) > 3^1000 - 2 if it exists.

One of a(n), a(n)+2 and a(n)-2 must be a power of 3. (End)

LINKS

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

EXAMPLE

81 is in this sequence because 81 - 2 = 79, 81 and 81 + 2 = 83 are all prime powers.

MAPLE

ispp:= proc(x) local p, r;

  if isprime(x) then return true fi;

  p:= 2;

  do

     r:= iroot(x, p);

     if r^p = x then return isprime(r) fi;

     if r < 2 then return false fi;

     p:= nextprime(p);

  od:

end proc:

ispp(1):= true:

A:= NULL;

for n from 1 to 1000 do

  B:= map(ispp, [3^n-4, 3^n-2, 3^n+2, 3^n+4]);

  if B[1] and B[2] then A:= A, 3^n-2 fi;

  if B[2] and B[3] then A:= A, 3^n fi;

  if B[3] and B[4] then A:= A, 3^n+2 fi;

od:

A; # Robert Israel, Nov 22 2015

MATHEMATICA

Prepend[Select[Range@ 100000, AllTrue[{# - 2, #, # + 2}, PrimePowerQ] &], 3] (* Michael De Vlieger, Dec 03 2015, Version 10 *)

PROG

(MAGMA) [n: n in [5..100000] | IsPrimePower(n-2) and IsPrimePower(n) and IsPrimePower(n+2)];

(PARI) is(k) = isprimepower(k) || k==1;

for(k=1, 1e6, if(is(k) && is(k+2) && is(k-2), print1(k, ", "))) \\ Altug Alkan, Nov 22 2015

CROSSREFS

Cf. A000961, A144234, A264744.

Sequence in context: A088049 A229364 A029660 * A004156 A081936 A238795

Adjacent sequences:  A264731 A264732 A264733 * A264735 A264736 A264737

KEYWORD

nonn,more

AUTHOR

Juri-Stepan Gerasimov, Nov 22 2015

EXTENSIONS

a(12) and a(13) from Robert Israel, Nov 22 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 2 03:43 EST 2021. Contains 349437 sequences. (Running on oeis4.)