OFFSET
1,1
LINKS
Donovan Johnson, Table of n, a(n) for n = 1..1000
FORMULA
prime(n) + n = q^k, q is prime and k_Integer >= 2.
EXAMPLE
2660 is OK because prime(2660) + 2660 = 23909 + 2660 = 26569 = 163^2, 163 is prime.
MAPLE
ispp:= n -> not isprime(n) and nops(numtheory:-factorset(n))=1:
p:= 1: Res:= NULL:
for n from 1 to 10^6 do
p:= nextprime(p);
if ispp(n+p) then Res:= Res, n fi
od:
Res; # Robert Israel, Jun 08 2016
MATHEMATICA
lst = {}; fQ[n_] := Block[{pf = FactorInteger[n]}, (2-Length[pf])(pf[[1, 2]]-1) > 0]; Do[ If[ fQ[Prime[n] + n], Print[n]; AppendTo[lst, n]], {n, 456109}]; lst
PROG
(Sage) def np(n): return n+nth_prime(n)
[n for n in (1..10000) if not np(n).is_prime() and np(n).is_prime_power()] # Giuseppe Coppoletta, Jun 08 2016
(PARI) isok(n) = isprimepower(n+prime(n)) >= 2; \\ Michel Marcus, Jun 18 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov and Robert G. Wilson v, Jun 25 2005
STATUS
approved