|
|
A120432
|
|
Numbers n such that n-1 and n+1 are prime powers.
|
|
1
|
|
|
2, 3, 4, 6, 8, 10, 12, 18, 24, 26, 28, 30, 42, 48, 60, 72, 80, 82, 102, 108, 126, 138, 150, 168, 180, 192, 198, 228, 240, 242, 270, 282, 312, 348, 360, 420, 432, 462, 522, 570, 600, 618, 642, 660, 728, 810, 822, 828, 840, 858, 882, 1020, 1032, 1050, 1062, 1092
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
10 is in the sequence because both 9 and 11 are prime powers; 26 is in the sequence because both 25 and 27 are prime powers.
|
|
MAPLE
|
with(numtheory): a:=proc(n) if nops(factorset(n-1))*nops(factorset(n+1))=1 then n else fi end: 2, seq(a(n), n=2..1500); # Emeric Deutsch, Jul 23 2006
|
|
MATHEMATICA
|
Insert[Select[Range[3, 3000], Length[FactorInteger[ # - 1]] == Length[ FactorInteger[ # + 1]] == 1 &], 2, 1] (* Stefan Steinerberger, Jul 23 2006 *)
Join[{2}, Select[Range[1100], And @@ PrimePowerQ /@ {# - 1, # + 1} &]] (* Ivan Neretin, Nov 24 2016 *)
|
|
PROG
|
(Magma) [2] cat [n : n in [3..1110] | IsPrimePower(n-1) and IsPrimePower(n+1)]; // Vincenzo Librandi, Nov 25 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|