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-7 of 7 results.

A006549 Numbers k such that k and k+1 are prime powers.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 16, 31, 127, 256, 8191, 65536, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that k + (0, 1) is a prime power pair.
Consecutive prime powers.
k + (0, 2m), m >= 1, being an admissible pattern for prime pairs, since (0, 2m) == (0, 0) (mod 2), has high density.
k + (0, 2m-1), m >= 1, being a non-admissible pattern for prime pairs, since (0, 2m-1) == (0, 1) (mod 2), has low density [the only possible pairs are (2^a - 2m-1, 2^a) or (2^a, 2^a + 2m-1), a >= 0].
Numbers k such that k and k+1 are primes would give only 2, for the prime pair (2, 3).
This sequence corresponds to the least member of each one of the following prime power pairs, ordered by increasing value of least member: (1, 2), (2^3, 3^2), (Fermat primes - 1, Fermat primes), (Mersenne primes, Mersenne primes + 1).
It is not known whether this sequence is infinite, but is conjectured to be since:
(*) 2^3, 3^2 are the only consecutive prime powers with exponents >= 2
(as a consequence of Mihailescu's theorem -- Mihailescu proved Catalan's conjecture in 2002);
(*) Only the first 5 Fermat numbers f_0 to f_4 are known to be prime
(it is conjectured that there might be no others, f_5 to f_32 are all composite);
(*) It has been conjectured that there exist an infinite number of Mersenne primes.
Numbers k such that A003418(k) appears only once in the sequence A003418. This may suggest that k is also characterized by the pairs formed by a 2 whose direct neighbor is a prime number in the sequence A014963. - Eric Desbiaux, Feb 11 2015
The power graph and enhanced power graph of the groups PGL(2,q) have the same clique number iff q>1 is a term of this sequence (Peter Cameron's link). - Bernard Schott, Dec 14 2021

References

  • R. K. Guy, Unsolved Problems in Number Theory, D9.
  • P. Ribenboim, 13 Lect. on Fermat's Last Theorem, p. 236.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David W. Wilson and Eric Rains (rains(AT)caltech.edu) found a simple proof that in this case of Catalan's conjecture either n or n+1 must be a power of 2 and the other number must be a prime, except for n=8. Using this the sequence is easy to extend.

Crossrefs

Cf. A019434 Fermat primes: primes of form 2^(2^n) + 1, n >= 0.
Cf. A000668 Mersenne primes (of form 2^p - 1 where p is a prime).
Cf. A120431 Numbers n such that n and n+2 are prime powers.
Cf. A164571 Numbers n such that n and n+3 are prime powers.
Cf. A164572 Numbers n such that n and n+4 are prime powers.
Cf. A164573 Numbers n such that n and n+5 are prime powers.
Cf. A164574 Numbers n such that n and n+6 are prime powers.

Programs

  • Haskell
    a006549 n = a006549_list !! (n-1)
    a006549_list = [1,2,3,4,7,8] ++ f (drop 4 a000040_list) where
       f (p:ps) | a010055 (p - 1) == 1 = (p - 1) : f ps
                | a010055 (p + 1) == 1 = p : f ps
                | otherwise            = f ps
    -- Reinhard Zumkeller, Jan 03 2013
    
  • Mathematica
    Do[ a = Length[ FactorInteger[ 2^n - 1 ] ]; b = Length[ FactorInteger[ 2^n ] ]; c = Length[ FactorInteger[ 2^n + 1 ] ]; If[ a == b, Print[ 2^n - 1 ] ]; If[ b == c, Print[ 2^n ] ], {n, 0, 127} ]
    Join[{1},SequencePosition[Boole[PrimePowerQ[Range[600000]]],{1,1}][[All,1]]] (* Requires Mathematica version 10 or later *) (* Generates the first 14 terms of the sequence. Increase Range constant to generate more. *) (* Harvey P. Dale, Apr 12 2020 *)
  • PARI
    is(n)=if(n<5,return(n>0)); isprimepower(n) && isprimepower(n+1) \\ Charles R Greathouse IV, Apr 24 2015

Extensions

More terms from David W. Wilson
Additional comments from Daniel Forgues, Aug 17 2009

A164572 Numbers k such that k and k+4 are both prime powers.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 13, 19, 23, 25, 27, 37, 43, 49, 67, 79, 97, 103, 109, 121, 127, 163, 169, 193, 223, 229, 239, 277, 289, 307, 313, 343, 349, 379, 397, 439, 457, 463, 487, 499, 613, 643, 673, 729, 739, 757, 769, 823, 853, 859, 877, 883, 907, 937, 967, 1009, 1087
Offset: 1

Views

Author

Daniel Forgues, Aug 16 2009, Aug 17 2009

Keywords

Comments

Numbers n such that n + (0, 4) is a prime power pair.
A generalization of the cousin primes. The cousin primes are a subsequence.
n + (0, 2m), m >= 1, being an admissible pattern for prime pairs, since (0, 2m) = (0, 0) (mod 2), has high density.
n + (0, 2m-1), m >= 1, being a non-admissible pattern for prime pairs, since (0, 2m-1) = (0, 1) (mod 2), has low density [the only possible pairs are (2^a - 2m-1, 2^a) or (2^a, 2^a + 2m-1), a >= 0.]

Crossrefs

k and (x) are prime powers: A006549 (k+1), A120431 (k+2), A164571 (k+3), this sequence (k+4), A164573 (k+5), A164574 (k+6).

Programs

  • Mathematica
    Select[Range[1000], PrimeNu[#] < 2 && PrimeNu[# + 4] < 2 &] (* Amiram Eldar, Oct 01 2020 *)
  • PARI
    is(n)=if(n==1,return(1)); isprimepower(n) && isprimepower(n+4) \\ Charles R Greathouse IV, Apr 24 2015

A164571 Numbers n such that n and n+3 are prime powers.

Original entry on oeis.org

1, 2, 4, 5, 8, 13, 16, 29, 61, 64, 125, 128, 509, 1021, 4093, 4096, 16381, 32768, 65536, 262144, 1048573, 4194301, 16777213, 268435456, 536870909, 1073741824, 36028797018963968
Offset: 1

Views

Author

Daniel Forgues, Aug 16 2009

Keywords

Comments

Numbers n such that n + (0, 3) is a prime power pair.
n + (0, 2m), m >= 1, being an admissible pattern for prime pairs, since (0, 2m) = (0, 0) (mod 2), has high density.
n + (0, 2m-1), m >= 1, being a non-admissible pattern for prime pairs, since (0, 2m-1) = (0, 1) (mod 2), has low density [the only possible pairs are (2^a - 2m-1, 2^a) or (2^a, 2^a + 2m-1), a >= 0.]
n + (0, 3) being a non-admissible pattern for prime pairs, has only prime power pairs (2^a - 3, 2^a) or (2^a, 2^a + 3), a >= 0.
Numbers n such that n and n+3 are primes would give only 2, for the prime pair (2, 5).
10^18 < a(28) <= 19807040628566084398385987581. - Donovan Johnson, Aug 17 2009

Crossrefs

Cf. A000961.
Cf. A006549 Numbers n such that n and n+1 are prime powers.
Cf. A120431 Numbers n such that n and n+2 are prime powers.
Cf. A164571 Numbers n such that n and n+3 are prime powers.
Cf. A164572 Numbers n such that n and n+4 are prime powers.
Cf. A164573 Numbers n such that n and n+5 are prime powers.
Cf. A164574 Numbers n such that n and n+6 are prime powers.

Programs

  • PARI
    ispp(n) = (n==1) || isprime(n) || (ispower(n, ,&p) && isprime(p));
    isok(n) = ispp(n) && ispp(n+3); \\ Michel Marcus, Aug 31 2013
    
  • PARI
    v=List(); for(n=0, 1e3, if(isprimepower(2^n-3), listput(v, 2^n-3)); if(isprimepower(2^n+3), listput(v, 2^n))); Set(v) \\ Charles R Greathouse IV, Apr 24 2015

Extensions

Edited by Daniel Forgues, Aug 17 2009
a(20)-a(27) from Donovan Johnson, Aug 17 2009

A164573 Numbers n such that n and n+5 are prime powers.

Original entry on oeis.org

2, 3, 4, 8, 11, 27, 32, 59, 251, 1019, 2048, 4091, 262139, 1048571, 67108859, 4294967291, 68719476731, 140737488355328, 9007199254740992, 72057594037927931, 73786976294838206459, 332306998946228968225951765070086139
Offset: 1

Views

Author

Daniel Forgues, Aug 16 2009

Keywords

Comments

Numbers n such that n + (0, 5) is a prime power pair.
n + (0, 2m), m >= 1, being an admissible pattern for prime pairs, since (0, 2m) = (0, 0) (mod 2), has high density.
n + (0, 2m-1), m >= 1, being a non-admissible pattern for prime pairs, since (0, 2m-1) = (0, 1) (mod 2), has low density [the only possible pairs are (2^a - 2m-1, 2^a) or (2^a, 2^a + 2m-1), a >= 0.]
Numbers n such that n and n+5 are primes would give only 2, for the prime pair (2, 7).
10^18 < a(21) <= 73786976294838206459. - Donovan Johnson, Aug 17 2009

Crossrefs

Cf. A006549 Numbers n such that n and n+1 are prime powers.
Cf. A120431 Numbers n such that n and n+2 are prime powers.
Cf. A164571 Numbers n such that n and n+3 are prime powers.
Cf. A164572 Numbers n such that n and n+4 are prime powers.
Cf. A164573 Numbers n such that n and n+5 are prime powers.
Cf. A164574 Numbers n such that n and n+6 are prime powers.

Programs

  • PARI
    is(n)=if(n<5,return(n>1)); isprimepower(n) && isprimepower(n+5) \\ Charles R Greathouse IV, Apr 24 2015
    
  • PARI
    v=List();for(n=0,1e3,if(isprimepower(2^n-5),listput(v,2^n-5));if(isprimepower(2^n+5),listput(v,2^n))); Set(v) \\ Charles R Greathouse IV, Apr 24 2015

Extensions

Edited by Daniel Forgues, Aug 17 2009
a(13)-a(20) from Donovan Johnson, Aug 17 2009
a(21)-a(22) from Charles R Greathouse IV, Apr 24 2015

A164574 Numbers k such that k and k+6 are both prime powers.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 25, 31, 37, 41, 43, 47, 53, 61, 67, 73, 83, 97, 101, 103, 107, 121, 125, 131, 151, 157, 163, 167, 173, 191, 193, 223, 227, 233, 251, 257, 263, 271, 277, 283, 307, 311, 331, 337, 343, 347, 353, 361, 367, 373, 383, 433, 443, 457
Offset: 1

Views

Author

Daniel Forgues, Aug 16 2009

Keywords

Comments

Numbers n such that n + (0, 6) is a prime power pair.
n + (0, 2m), m >= 1, being an admissible pattern for prime pairs, since (0, 2m) = (0, 0) (mod 2), has high density.
n + (0, 2m-1), m >= 1, being a non-admissible pattern for prime pairs, since (0, 2m-1) = (0, 1) (mod 2), has low density [the only possible pairs are (2^a - 2m-1, 2^a) or (2^a, 2^a + 2m-1), a >= 0.]

Crossrefs

k and (x) are prime powers: A006549 (k+1) A120431 (k+2), A164571 (k+3), A164572 (k+4), A164573 (k+5), this sequence (k+6).

Programs

  • Mathematica
    Join[{1},Select[Range[500],AllTrue[{#,#+6},PrimePowerQ]&]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 30 2018 *)
  • PARI
    is(n)=if(n<4,return(n>0)); isprimepower(n) && isprimepower(n+6) \\ Charles R Greathouse IV, Apr 24 2015

Extensions

Edited by Daniel Forgues, Aug 17 2009

A269721 Integers k such that k, k+2, k+4 and k+6 are prime powers (A000961).

Original entry on oeis.org

1, 3, 5, 7, 23, 25
Offset: 1

Views

Author

Altug Alkan, Mar 04 2016

Keywords

Comments

At least one of a(n), a(n)+2, a(n)+4 and a(n)+6 must be a power of 3. See comments in A264734.

Examples

			5 is a term because 5, 7, 11 are prime numbers and 9 = 3^2.
23 is a term because 23 and 29 are prime numbers and 25 = 5^2, 27 = 3^3.
25 is a term because 25 = 5^2, 27 = 3^3, 29 and 31 are prime numbers.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 10^5], AllTrue[Range[0, 6, 2] + #, Or[# == 1, PrimePowerQ@ #] &] &] (* Michael De Vlieger, Mar 04 2016, Version 10 *)
  • PARI
    lista(nn) = for(n=1, nn, if(n==1 || (isprimepower(n) && isprimepower(n+2) && isprimepower(n+4) && isprimepower(n+6)), print1(n, ", ")));

A329364 Numbers k such that k, k+2, k+4 are prime powers.

Original entry on oeis.org

1, 3, 5, 7, 9, 23, 25, 27, 79, 239, 59049, 450283905890997359, 36472996377170786399
Offset: 1

Views

Author

Lior Manor, Nov 12 2019

Keywords

Comments

Intersection of A120431 and A164572.
a(14) > 10^3000, if it exists. Note that one among k, k+2, k+4 is always divisible by 3, so it must be a power of 3. - Giovanni Resta, Nov 12 2019

Examples

			7 is a term since 7, 9, and 11 are all prime powers.
		

Crossrefs

Programs

  • Mathematica
    pp[w_] := w == 1 || And @@ PrimePowerQ[w + {0,2,4}]; Reap[ Do[ If[pp[n - k], Sow[n-k]], {n, 3^Range[100]}, {k, {4, 2, 0}}]][[2, 1]] (* Giovanni Resta, Nov 12 2019 *)
  • PARI
    isok(k) = (k==1) || (isprimepower(k) && isprimepower(k+2) && isprimepower(k+4)); \\ Michel Marcus, Nov 12 2019

Extensions

a(12)-a(13) from Giovanni Resta, Nov 12 2019
Showing 1-7 of 7 results.