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.
%I A006549 M0582 #58 Feb 16 2025 08:32:30 %S A006549 1,2,3,4,7,8,16,31,127,256,8191,65536,131071,524287,2147483647, %T A006549 2305843009213693951,618970019642690137449562111, %U A006549 162259276829213363391578010288127,170141183460469231731687303715884105727 %N A006549 Numbers k such that k and k+1 are prime powers. %C A006549 Numbers k such that k + (0, 1) is a prime power pair. %C A006549 Consecutive prime powers. %C A006549 k + (0, 2m), m >= 1, being an admissible pattern for prime pairs, since (0, 2m) == (0, 0) (mod 2), has high density. %C A006549 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]. %C A006549 Numbers k such that k and k+1 are primes would give only 2, for the prime pair (2, 3). %C A006549 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). %C A006549 It is not known whether this sequence is infinite, but is conjectured to be since: %C A006549 (*) 2^3, 3^2 are the only consecutive prime powers with exponents >= 2 %C A006549 (as a consequence of Mihailescu's theorem -- Mihailescu proved Catalan's conjecture in 2002); %C A006549 (*) Only the first 5 Fermat numbers f_0 to f_4 are known to be prime %C A006549 (it is conjectured that there might be no others, f_5 to f_32 are all composite); %C A006549 (*) It has been conjectured that there exist an infinite number of Mersenne primes. %C A006549 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 %C A006549 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 %D A006549 R. K. Guy, Unsolved Problems in Number Theory, D9. %D A006549 P. Ribenboim, 13 Lect. on Fermat's Last Theorem, p. 236. %D A006549 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A006549 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. %H A006549 Daniel Forgues, <a href="/A006549/b006549.txt">Table of n, a(n) for n = 1..25</a> %H A006549 Peter Cameron, <a href="https://cameroncounts.wordpress.com/2021/11/08/graphs-on-groups-9/">Graphs on groups, 9</a>, Peter Cameron's blog. %H A006549 Wacław Sierpiński, <a href="http://matwbn.icm.edu.pl/ksiazki/cm/cm6/cm6128.pdf">Sur une question concernant le nombre de diviseurs premiers d'un nombre naturel</a>, Colloquium Mathematicum 6 (1958), 209-210. %H A006549 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CatalansConjecture.html">Catalan's Conjecture</a>. %H A006549 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CliqueNumber.html">Clique Number</a>. %H A006549 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FermatPrime.html">Fermat Prime</a>. %H A006549 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MersennePrime.html">Mersenne Prime</a>. %t A006549 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} ] %t A006549 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 *) %o A006549 (Haskell) %o A006549 a006549 n = a006549_list !! (n-1) %o A006549 a006549_list = [1,2,3,4,7,8] ++ f (drop 4 a000040_list) where %o A006549 f (p:ps) | a010055 (p - 1) == 1 = (p - 1) : f ps %o A006549 | a010055 (p + 1) == 1 = p : f ps %o A006549 | otherwise = f ps %o A006549 -- _Reinhard Zumkeller_, Jan 03 2013 %o A006549 (PARI) is(n)=if(n<5,return(n>0)); isprimepower(n) && isprimepower(n+1) \\ _Charles R Greathouse IV_, Apr 24 2015 %Y A006549 Cf. A000961, A000040, A010055. %Y A006549 Cf. A019434 Fermat primes: primes of form 2^(2^n) + 1, n >= 0. %Y A006549 Cf. A000668 Mersenne primes (of form 2^p - 1 where p is a prime). %Y A006549 Cf. A120431 Numbers n such that n and n+2 are prime powers. %Y A006549 Cf. A164571 Numbers n such that n and n+3 are prime powers. %Y A006549 Cf. A164572 Numbers n such that n and n+4 are prime powers. %Y A006549 Cf. A164573 Numbers n such that n and n+5 are prime powers. %Y A006549 Cf. A164574 Numbers n such that n and n+6 are prime powers. %K A006549 nonn,nice,easy %O A006549 1,2 %A A006549 _N. J. A. Sloane_ %E A006549 More terms from _David W. Wilson_ %E A006549 Additional comments from _Daniel Forgues_, Aug 17 2009