OFFSET
1,1
COMMENTS
The term 'prime power' refers to the elements of A246655.
If we were to extend the definition of prime power to include 1, then 3 would be the first term of the sequence, because 3 = 2^0 + 2.
The sequence is probably infinite, since it includes all the terms of A006512 (Greater of twin primes).
From Robert Israel, Jan 22 2016: (Start)
Since 3 divides p or p^k+2 if k is even, the only terms of the form p^k+2 where k is even are A228034.
All terms not in A057735 are congruent to 1 mod 3.
The generalized Bunyakovsky conjecture implies that for any odd k, there are infinitely many terms of the form p^k+2. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Wikipedia, Generalized Bunyakovsky conjecture
EXAMPLE
5 is in the sequence because 5 = 3^1 + 2.
7 is in the sequence because 7 = 5^1 + 2.
11 is in the sequence because 11 = 3^2 + 2.
13 is in the sequence because 13 = 11^1 + 2.
29 is in the sequence because 29 = 3^3 + 2.
MAPLE
select(t -> isprime(t) and nops(numtheory:-factorset(t-2))=1, [ seq(i, i=3..1000, 2)]); # Robert Israel, Jan 22 2016
MATHEMATICA
A267945Q = PrimeQ@# && (Length@# == 1 && #[[1, 1]] > 1 &@FactorInteger[# - 2]) & (* JungHwan Min, Jan 25 2016 *)
Select[Array[Prime, 100], Length@# == 1 && #[[1, 1]] > 1 &@FactorInteger[# - 2] &] (* JungHwan Min, Jan 25 2016 *)
PROG
(Sage) filter( is_prime, [ n+2 for n in prime_powers( 1, 1000 ) ] )
(PARI) lista(nn) = {forprime(p=2, nn, if (isprimepower(p-2), print1(p, ", ")); ); } \\ Michel Marcus, Jan 22 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert C. Lyons, Jan 22 2016
STATUS
approved