A267945 Primes that are a prime power plus two.
5, 7, 11, 13, 19, 29, 31, 43, 61, 73, 83, 103, 109, 127, 139, 151, 181, 193, 199, 229, 241, 271, 283, 313, 349, 421, 433, 463, 523, 571, 601, 619, 643, 661, 811, 823, 829, 859, 883
Offset: 1
Keywords
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Wikipedia, Generalized Bunyakovsky conjecture
Programs
-
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 *)
-
PARI
lista(nn) = {forprime(p=2, nn, if (isprimepower(p-2), print1(p, ", ")););} \\ Michel Marcus, Jan 22 2016
-
Sage
filter( is_prime, [ n+2 for n in prime_powers( 1, 1000 ) ] )
Comments