login
A109314
Numbers n such that prime(n) + n is a prime power (A246547).
2
3, 5, 8, 9, 12, 86, 230, 503, 1170, 2660, 2772, 6288, 6572, 8858, 9590, 14870, 16332, 17708, 53132, 54540, 63890, 64908, 82830, 93068, 98132, 104726, 119298, 136502, 152198, 177918, 187040, 234650, 241682, 253118, 263930, 278970, 376680, 412440, 456110, 469034
OFFSET
1,1
LINKS
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
Cf. A025475 = powers of a prime but not prime, also nonprime n such that sigma(n)*phi(n) > (n-1)2; A107708 = values of q, A107709 = values of k; A107710 = values of prime (A109314(n)).
Sequence in context: A051206 A081451 A107605 * A319828 A325540 A102529
KEYWORD
nonn
AUTHOR
STATUS
approved