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

A005603 Smallest prime beginning a complete Cunningham chain (of the second kind) of length n.

Original entry on oeis.org

11, 7, 2, 2131, 1531, 385591, 16651, 15514861, 857095381, 205528443121, 1389122693971, 216857744866621, 758083947856951, 107588900851484911, 69257563144280941, 3203000719597029781
Offset: 1

Views

Author

Keywords

Comments

The chain begins with a prime number p; next term p' (a prime) is produced forming 2p-1; next term p"=2p'-1, etc. "Complete" means that each chain is exactly n primes long (i.e. the chain cannot be a subchain of another one). That is why this sequence is slightly different from A064812, where the 6th term (33301) is smaller than here (385591) but is the second one of a seven primes sequence and therefore doesn't *start* a sequence.
According to Augustin's web site, the numbers 107588900851484911, 69257563144280941, 3203000719597029781 are also in the sequence. - Dmitry Kamenetsky, May 14 2009

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A064812 for another version.

Extensions

6th term corrected from 385591 on Feb 23 1995, at Robert G. Wilson v's suggestion
a(14) and a(15) found by Paul Jobling (Paul.Jobling(AT)WhiteCross.com) [Oct 23 2000]
a(6) reverted to original value by Sean A. Irvine, Jul 10 2016
a(16) from Augustin's page, comment corrected by Jens Kruse Andersen, Jun 14 2014
Edited by N. J. A. Sloane, Nov 03 2018 at the suggestion of Georg Fischer, Nov 03 2018, merging a duplicate entry with this one.
In Augustin's web page there are 7 or so more terms which could be added here, or alternatively used to create a b-file. - Georg Fischer, Nov 03 2018

A181715 Length of the complete Cunningham chain of the second kind starting with prime(n).

Original entry on oeis.org

3, 2, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

M. F. Hasler, Nov 17 2010

Keywords

Comments

Number of iterations x -> 2x-1 needed to get a composite number, when starting with prime(n).
Dickson's conjecture implies that, for every positive integer r, there exist infinitely many n such that a(n) = r. - Lorenzo Sauras Altuzarra, Feb 12 2021
a(n) is the least k such that 2^k * (prime(n)-1) + 1 is composite. Note that a(n) is well defined since 2^(p-1) * (p-1) + 1 is divisible by p for odd primes p. - Jianing Song, Nov 24 2021

Examples

			2 -> 3 -> 5 -> 9 = 3^2, so a(1) = 3 and a(2) = 2. - _Jonathan Sondow_, Oct 30 2015
		

Crossrefs

Programs

  • Maple
    a := proc(n)
       local c, l:
       c, l := 0, ithprime(n):
       while isprime(l) do c, l := c+1, 2*l-1: od:
       c:
    end: # Lorenzo Sauras Altuzarra, Feb 12 2021
  • Mathematica
    Table[p = Prime[n]; cnt = 1; While[p = 2*p - 1; PrimeQ[p], cnt++]; cnt, {n, 100}] (* T. D. Noe, Jul 12 2012 *)
    Table[-1 + Length@ NestWhileList[2 # - 1 &, Prime@ n, PrimeQ@ # &], {n, 98}] (* Michael De Vlieger, Apr 26 2017 *)
  • PARI
    a(n)= n=prime(n); for(c=1,1e9, is/*pseudo*/prime(n=2*n-1) || return(c))

Formula

a(n) < prime(n) for n > 1; see Löh (1989), p. 751. - Jonathan Sondow, Oct 28 2015
max(a(n), A181697(n)) = A263879(n) for n > 2. - Jonathan Sondow, Oct 30 2015
a(n) = A285700(A000040(n)). - Antti Karttunen, Apr 26 2017

Extensions

Escape clause added to definition by N. J. A. Sloane, Feb 19 2021
Escape clause deleted from definition by Jianing Song, Nov 24 2021

A109998 Non-Cunningham primes: primes isolated from any Cunningham chain under any iteration of 2p+-1 or (p+-1)/2.

Original entry on oeis.org

17, 43, 67, 71, 101, 103, 109, 127, 137, 149, 151, 163, 181, 197, 223, 241, 257, 269, 283, 311, 317, 349, 353, 373, 389, 401, 409, 433, 449, 461, 463, 487, 521, 523, 557, 569, 571, 599, 617, 631, 643, 647, 677, 701, 709, 739, 751, 769, 773, 787, 797, 821
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 01 2005

Keywords

Comments

The condition that neither 2p - 1 nor 2p + 1 be prime is equivalent to ((p-1) mod 3 = 0) or ((p+1) mod 3 = 0). For example, the prime p = 2^607 - 1 is not in this sequence because p + 1 mod 3 = 2. - Washington Bomfim, Oct 30 2009

Examples

			a(1) = 17 is here because 17 * 2 + 1 = 35, 17 * 2 - 1 = 33; (17+1)/2 = 9, (17-1)/2 = 8: four composite numbers.
		

Crossrefs

Programs

  • Mathematica
    nonCunninghamPrimes = {}; Do[p = Prime[n]; If[!PrimeQ[2p - 1] && !PrimeQ[2p + 1] && !PrimeQ[(p - 1)/2] && !PrimeQ[(p + 1)/2], AppendTo[nonCunninghamPrimes, p]], {n, 6!}]; nonCunninghamPrimes (* Vladimir Joseph Stephan Orlovsky, Mar 22 2009 *)

Extensions

Corrected and extended by Ray Chandler, Sep 02 2005
Replaced link to cached arXiv URL with link to the abstract - R. J. Mathar, Mar 01 2010

A379144 a(n) is the number of iterations of the function x --> 2*x - 1 such that x remains prime, starting from A005382(n).

Original entry on oeis.org

2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1
Offset: 1

Views

Author

Ctibor O. Zizka, Dec 16 2024

Keywords

Comments

Cunningham chain of the second kind of length i is a sequence of prime numbers (p_1, ..., p_i) such that p_(r + 1) = 2*p_r - 1 for all 1 =< r < i. This sequence tells the length of the Cunningham chain of the second kind for primes from A005382.

Examples

			n = 1: A005382(1) = 2 --> 3 --> 5 --> 9, 9 is not a prime, thus a(1) = 2.
n = 3: A005382(3) = 7 --> 13 --> 25, 25 is not a prime, thus a(3) = 1.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := -2 + Length[NestWhileList[2*# - 1 &, n, PrimeQ[#] &]]; Select[Array[s, 5000], # > 0 &] (* Amiram Eldar, Dec 16 2024 *)

Formula

a(A110581(n)) = 1.
a(A057326(n)) = 2.
Showing 1-4 of 4 results.