cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A267944 Primes that are a prime power minus two.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 23, 29, 41, 47, 59, 71, 79, 101, 107, 137, 149, 167, 179, 191, 197, 227, 239, 241, 269, 281, 311, 347, 359, 419, 431, 461, 521, 569, 599, 617, 641, 659, 727, 809, 821, 827, 839, 857, 881
Offset: 1

Views

Author

Robert C. Lyons, Jan 22 2016

Keywords

Comments

The sequence is probably infinite, since it includes all the terms of A001359 (Lesser of twin primes).
Also includes A049002. The generalized Bunyakovsky conjecture implies that for every k there are infinitely many terms of the form p^k - 2. - Robert Israel, Jan 22 2016

Examples

			2 is in the sequence because 2 = 2^2 - 2.
3 is in the sequence because 3 = 5^1 - 2.
5 is in the sequence because 5 = 7^1 - 2.
7 is in the sequence because 7 = 3^2 - 2.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and nops(numtheory:-factorset(t+2))=1, [2, seq(i,i=3..1000, 2)]); # Robert Israel, Jan 22 2016
  • Mathematica
    A267944Q = PrimeQ@# && Length@FactorInteger[# + 2] == 1 & (* JungHwan Min, Jan 24 2016 *)
    Select[Array[Prime, 100], Length@FactorInteger[# + 2] == 1 &] (* JungHwan Min, Jan 24 2016 *)
    Select[Prime[Range[300]],PrimePowerQ[#+2]&] (* Harvey P. Dale, Nov 28 2016 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (isprimepower(p+2), print1(p, ", ")););} \\ Michel Marcus, Jan 22 2016
  • Sage
    [n - 2 for n in prime_powers(1, 1000) if is_prime(n - 2)]
    
Showing 1-1 of 1 results.