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.

Previous Showing 21-30 of 39 results. Next

A064812 Smallest prime p such that the infinite sequence {p, p'=2p-1, p''=2p'-1, ...} begins with a string of exactly n primes.

Original entry on oeis.org

5, 3, 2, 2131, 1531, 33301, 16651, 15514861, 857095381, 205528443121, 1389122693971, 216857744866621, 758083947856951, 107588900851484911, 69257563144280941
Offset: 1

Views

Author

David Terr, Oct 21 2002

Keywords

Comments

Chains of length n of nearly doubled primes.
Smallest prime beginning a complete Cunningham chain of length n of the second kind. (For the first kind see A005602.) - Jonathan Sondow, Oct 30 2015

Examples

			a(3) = 2 because 2 is the smallest prime such that the sequence {2, 3, 5, 9, ...} begins with exactly 3 primes, where each term in the sequence is twice the preceding term minus 1.
		

Crossrefs

A110056 Least prime that ends a complete Cunningham chain (of the first kind) of length n.

Original entry on oeis.org

13, 7, 167, 4079, 47, 2879, 71850239, 2444789759, 21981381119, 13357981992959, 681004115066879, 1136001594224639, 16756459239477534719, 781558105952602767359
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 04 2005

Keywords

Comments

"Complete" means that this chain is not part of a longer Cunningham chain of the first kind.
Next term is greater than 4*10^17.
A005602(13)-> 8181864863026139 -> ... -> a(13) = 16756459239477534719. [From Washington Bomfim, Oct 21 2009]

Examples

			41->83->167 is a Cunningham chain of the first kind. It is complete because neither (41-1)/2 nor 2*167+1 is prime. It is the first such chain of three primes, so a(3) = 167.
		

Crossrefs

Cf. A110059 for Cunningham chains of the second kind.
Cf. A005602 [From Washington Bomfim, Oct 21 2009]

Extensions

Edited and extended by David Wasserman, Aug 08 2006
a(13) and a(14) from Washington Bomfim, Oct 21 2009

A236443 Primes which start a Cunningham chain of length 4 where every entity of the chain is smallest of twin prime.

Original entry on oeis.org

253679, 1138829, 58680929, 90895769, 124253009, 269877299, 392071679, 613813199, 1014342209, 1277981669, 1413015029, 1453978679, 1753585679, 2919331379, 3424037189, 3538972709, 4025789039, 4175762009, 4362439199, 4843208789, 5708418869, 5795508599
Offset: 1

Views

Author

Abhiram R Devesh, Jan 26 2014

Keywords

Comments

a(n) generates a Cunningham chain of length 4 and a_n(i) + 2 is also prime for i = 1,2,3 and 4.
This sequence is infinite under Dickson's conjecture. - Charles R Greathouse IV, Jan 29 2014
Terms are congruent to -1 mod 210. - David Radcliffe, Aug 06 2025

Examples

			a(1)=253679, with associated Cunningham chain 253679, 507359, 1014719, 2029439, all of which are the lower member of a pair of twin primes.
		

Crossrefs

Programs

  • PARI
    is(n)=n%210==209 && isprime(n) && isprime(n+2) && isprime(2*n+1) && isprime(2*n+3) && isprime(4*n+3) && isprime(4*n+5) && isprime(8*n+7) && isprime(8*n+9)
    forstep(n=419,1e9,[1470, 420, 420],if(is(n),print(n))) \\ Charles R Greathouse IV, Jan 29 2014
  • Python
    from sympy import isprime
    def is_A236443(n):
        return (isprime(n) and isprime(n+2) and isprime(2*n+1) and isprime(2*n+3) and
                isprime(4*n+3) and isprime(4*n+5) and isprime(8*n+7) and isprime(8*n+9))
    print([n for n in range(209, 10**9, 210) if is_A236443(n)]) # David Radcliffe, Aug 06 2025
    

Extensions

More terms from T. D. Noe, Jan 29 2014

A339581 Indices of records in A063377.

Original entry on oeis.org

1, 2, 89, 1122659, 19099919, 85864769, 26089808579, 554688278429, 4090932431513069, 95405042230542329
Offset: 1

Views

Author

N. J. A. Sloane, Dec 24 2020

Keywords

Comments

The records themselves begin 0,5,6,7,8,9,10,12,13,14.
a(11) <= 90616211958465842219 = A005602(15). Between a(10) and this upper bound could be another record which might not be listed in A005602.
a(n) == 9 mod 10 for n > 2 (see A063377). - Michael S. Branicky, Dec 24 2020

References

  • Carl Pomerance, Problem 81:21 (= 321), in R. K. Guy link.

Crossrefs

Formula

a(n) = A057331(n + 2) for n >= 2. - David A. Corneth, Dec 25 2020

Extensions

a(6) corrected and a(7) found by David A. Corneth, Dec 24 2020.
a(8)-a(10) were taken from A057331 and the bound on a(11) was taken from A005602. - David A. Corneth and Amiram Eldar, Dec 25 2020

A059688 Length of Cunningham chain containing prime(n) either as initial, internal or final term.

Original entry on oeis.org

5, 2, 5, 2, 5, 0, 0, 0, 5, 2, 0, 0, 3, 0, 5, 2, 2, 0, 0, 0, 0, 0, 3, 6, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 3, 2, 6, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 2, 0, 2, 4, 0, 0, 0, 0, 0, 2, 0, 0
Offset: 1

Views

Author

Labos Elemer, Feb 06 2001

Keywords

Comments

The length of a chain is measured by the total number of terms including the end points. a(n)=0 means that prime(n) is neither Sophie Germain nor a safe prime (i.e. it is in A059500).

Examples

			For all of {2,5,11,23,47}, i.e. at positions {j}={1,3,5,9,15} a(j)=5. Similarly for indices of all terms in {89,...,5759} a(i)=6. No chains are intelligible with length = 1 because the minimal chain enclose one Sophie Germain and also one safe prime. Dominant values are 0 and 2.
		

Crossrefs

Extensions

Offset and a(5) corrected by Sean A. Irvine, Oct 01 2022

A059767 Initial (unsafe) primes of Cunningham chains of first type with length exactly 7.

Original entry on oeis.org

1122659, 2164229, 2329469, 10257809, 10309889, 12314699, 14030309, 14145539, 23103659, 24176129, 28843649, 37088729, 42389519, 49160099, 50785439, 62800169, 68718059, 88174049, 95831189, 105388169, 121255889, 138140729, 155439419, 159938459, 173285999
Offset: 1

Views

Author

Labos Elemer, Feb 21 2001

Keywords

Comments

Special primes from A059453.
Primes p such that (2^k)*p+(2^k)-1 is also prime for k = 0, 1, 2, 3, 4, 5, 6 and is composite for k = -1 and k = 7.

Examples

			C7 prime chain is generated from prime a(10) = 24176129 with 2p+1 iterations: 24176129, 48352259, 96704519, 193409039, 386818079, 773636159, 1547272319, 3094544639.
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, p. 178 (Rev. ed. 1997).

Crossrefs

Programs

  • Mathematica
    Transpose[Select[{#, Length[NestWhileList[2#+1&, #, PrimeQ]]-1}&/@ Prime[Range[PrimePi[24177000]]], #[[2]]>6&]][[1]]
    Select[Prime[Range[10^6]], PrimeQ[a1=2*#+1]&&PrimeQ[a2=2*a1+1]&&PrimeQ[a3=2*a2+1]&&PrimeQ[a4=2*a3+1]&&PrimeQ[a5=2*a4+1]&&PrimeQ[a6=2*a5+1] &] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
  • PARI
    is(n)=n%30==29 && isprime(n) && isprime(2*n+1) && isprime(4*n+3) && isprime(8*n+7) && isprime(16*n+15) && isprime(32*n+31) && isprime(64*n+63) && !isprime(n\2) && !isprime(128*n+127) \\ Charles R Greathouse IV, Dec 01 2016

Extensions

Corrected and extended by Harvey P. Dale, Jul 10 2002
More terms from Vladimir Joseph Stephan Orlovsky, Jan 17 2009
Corrected by John Cerkan, Nov 30 2016

A176379 The smallest prime q which stays prime through at least two iterations of q -> := 2 * q + prime(n+1).

Original entry on oeis.org

2, 7, 2, 31, 2, 7, 11, 7, 19, 5, 5, 19, 2, 13, 13, 61, 11, 17, 61, 5, 5, 7, 139, 5, 19, 2, 103, 29, 7, 2, 109, 7, 59, 31, 41, 5, 5, 127, 13, 31, 5, 109, 2, 7, 41, 11, 2, 7, 101, 67, 79, 5, 31, 13, 37, 19, 11, 2, 109, 53, 7, 2, 19, 2, 127, 29, 5, 13, 59, 7, 19, 47, 47, 11, 13, 79, 17, 19, 89, 619
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 16 2010

Keywords

Comments

Such q are generalized Cunningham primes: prime numbers p(1), ..., p(n):
q, f(q) = 2 * q + prime(n+1), f(f(q)) = 4 * q + 3 * prime(n+1) must be primes.
n = 0 is omitted as the first iteration 2 * q + prime(1) = 2 * (q+1) is generally even.
List of (q, first iteration, second iteration):
(2,7,17) (7,19,43) (2,11,29) (31,73,157) (2,17,47)
(7,31,79) (11,41,101) (7,37,97) (19,67,163) (5,41,113)
(5,47,131) (19,79,199) (2,47,137) (13,73,193) (13,79,211)
(61,181,421) (11,83,227) (17,101,269) (61,193,457) (5,83,239)
(5,89,257) (7,97,277) (139,367,823) (5,107,311) (19,139,379)
(2,107,317) (103,313,733) (29,167,443) (7,127,367) (2,131,389)
(109,349,829) (7,151,439) (59,257,653) (31,211,571) (41,233,617)
(5,167,491) (5,173,509) (127,421,1009) (13,199,571) (31,241,661)
(5,191,563) (109,409,1009) (2,197,587) (7,211,619) (41,281,761)
(11,233,677) (2,227,677) (7,241,709) (101,431,1091) (67,367,967)

Examples

			n=1, prime(n+1) = 3: checking q=2: 2 * 2 + 3 = 7, 2 * 7 + 3 = 17, q=2 is first term.
n=2: checking q=7: 2 * 7 + 5 = 19, 2 * 19 + 5 = 43, 7 is 2nd term.
n=3: checking q=2: 2 * 2 + 7 = 11, 2 * 11 + 7 = 29, 2 is 3rd term.
		

References

  • Joe Buhler, Algorithmic Number Theory, Third International Symposium, ANTS-III, Springer New York, 1998.
  • R. K. Guy, Unsolved problems in number theory, Springer-Verlag, New York, 1994.
  • Paulo Ribenboim, Die Welt der Primzahlen, Geheimnisse und Rekorde, Springer-Verlag GmbH & Co. KG, 2006.

Crossrefs

Programs

  • Maple
    A176379 := proc(n)
        pk1 := ithprime(n+1) ;
        for pidx from 1 do
            p := ithprime(pidx) ;
            pitr := 2*p+pk1 ;
            if not isprime(pitr) then
                next ;
            end if;
            pitr := 2*pitr+pk1 ;
            if not isprime(pitr) then
                next ;
            else
                return p ;
            end if;
        end do:
    end proc:
    seq(A176379(n),n=1..20) ; # R. J. Mathar, May 21 2025

Formula

a(n) = smallest prime q such that 2*q+prime(n+1) is prime and 2*(2*q+prime(n+1))+prime(n+1) is also prime.

A249573 Smallest prime p that remains prime through exactly n iterations of the function f(x) = 5x + 2.

Original entry on oeis.org

2, 3, 13, 19, 373, 174877, 135859, 18235423, 26588257, 93112729, 376038903103, 7087694466289, 120223669028389
Offset: 0

Views

Author

Felix Fröhlich, Nov 01 2014

Keywords

Comments

Smallest p = prime(i) such that A280720(i) = n, where i is the index of p in A000040. - Felix Fröhlich, Jan 07 2017
From Jon E. Schoenfield, Jan 08 2017: (Start)
a(10) > 10^10.
It seems very likely that a(11) exists. But is it possible that this sequence is finite? Each row of the table below shows, for an interval of width 10^8, the number of primes p within the interval that remain prime through exactly 0 iterations, exactly 1 iteration, etc. E.g., in the interval [10^9, 10^9 + 10^8), there are 4437075 primes p that remain prime through exactly 0 iterations, 326699 that remain prime through exactly 1, 45062 that remain prime through exactly 2, etc.
---------------------------------------------------------------
Fixed interval width = 10^8
---------------------------------------------------------------
Start Number of successful iterations
of --------------------------------------------------------
intvl 0 1 2 3 4 5 6 7 8 9
===== ======= ====== ===== ===== ==== ==== ==== ==== ==== ====
1 5225638 450798 73434 10139 1308 114 17 4 2 1
10^ 8 4858227 391247 59352 7720 841 84 9 1 1 0
10^ 9 4437075 326699 45062 5438 605 45 10 2 0 0
10^10 4031707 271882 34218 3722 367 30 3 1 0 0
10^11 3689861 228960 26414 2649 251 20 6 0 0 0
10^12 3400459 194999 20675 1973 158 17 1 0 0 0
10^13 3155004 168786 16699 1489 108 6 1 0 0 0
10^14 2940881 147025 13535 1153 81 4 0 0 0 0
10^15 2752985 128743 11275 874 55 5 0 0 0 0
---------------------------------------------------------------
The numbers in column 0 drop at a rate that is not surprising, given that the way that the density of primes drops as numbers get larger. The numbers in the other columns drop more rapidly, in relative terms. Suppose a similar table were constructed using much wider intervals (perhaps with intervals starting not at 1, 10^8, 10^9, 10^10, etc., but at 1, 10^30, 10^31, 10^32, etc.), so that the numbers in, say, column 12 remained positive through several rows, but were dropping by a factor of more than 10 from one row to the next, making it likely that the total number of k-digit primes -- not just those from intervals of a fixed size -- that would remain prime through 12 iterations was actually decreasing as k increased. Would such an outcome suggest that the sequence might be finite? (End)

Examples

			With p = 13: 5 * 13 + 2 = 67, 5 * 67 + 2 = 337 and 5 * 337 + 2 = 1687. 67 and 337 are both prime, but 1687 is not, so 13 remains prime through exactly two iterations of 5 * x + 2 and is the smallest prime with this property, so a(2) = 13.
		

Crossrefs

Programs

  • Mathematica
    c[p_] := Block[{k = 1, q = 5*p+2}, While[ PrimeQ[q], q = 5*q+2; k++]; k]; a[n_] := Block[{p = 2}, While[c[p] != n, p = NextPrime@ p]; p]; Array[a, 7] (* Giovanni Resta, Mar 21 2017 *)
  • PARI
    for(n=0, 10, forprime(p=2, 1e20, i=0; a=p; while(ispseudoprime(5*a+2), a=5*a+2; i++); if(i==n, print1(p, ", "); break(1))))

Extensions

a(10) from Charles R Greathouse IV, Jan 13 2017
a(11) from John Cerkan, Mar 20 2017
a(12) from Giovanni Resta, Mar 21 2017

A339580 Indices of records in A339579.

Original entry on oeis.org

1, 3, 90, 1122660, 19099920, 85864770, 26089808580, 554688278430, 4090932431513070, 95405042230542330
Offset: 1

Views

Author

N. J. A. Sloane, Dec 24 2020

Keywords

Comments

The records themselves begin 4,5,6,7,8,9,10,12,13,14.
a(11) <= 90616211958465842220.

Examples

			90 is in the sequence as A339579(90) = 6 (90*2^k - 1 is prime for k = 0..5 and composite for k = 6) and A339579(m) < 6 for m < 90. - _David A. Corneth_, Dec 24 2020
		

References

  • Carl Pomerance, Problem 81:21 (= 321), in R. K. Guy problem list.

Crossrefs

Formula

a(n) = A339581(n) + 1 for n >= 2. - David A. Corneth, Dec 24 2020

Extensions

a(8)-a(10) were taken from A057331 and the bound on a(11) was taken from A005602. - David A. Corneth and Amiram Eldar, Dec 25 2020

A059690 Number of distinct Cunningham chains of first kind whose initial prime (cf. A059453) <= 2^n.

Original entry on oeis.org

1, 2, 2, 2, 3, 5, 7, 13, 20, 31, 52, 83, 142, 242, 412, 742, 1308, 2294, 4040, 7327, 13253, 24255, 44306, 81700, 150401, 277335, 513705, 954847, 1780466, 3325109, 6224282, 11676337, 21947583, 41327438
Offset: 1

Views

Author

Labos Elemer, Feb 06 2001

Keywords

Examples

			a(11)-a(10) = 21 means that between 1024 and 2048 exactly 21 primes introduce Cunningham chains: {1031, 1049, 1103, 1223, 1229, 1289, 1409, 1451, 1481, 1499, 1511, 1559, 1583, 1601, 1733, 1811, 1889, 1901, 1931, 1973, 2003}.
Their lengths are 2, 3 or 4. Thus the complete chains spread over more than one binary size-zone: {1409, 2819, 5639, 11279}. The primes 1439 and 2879 also form a chain but 1439 is not at the beginning of that chain, 89 is.
		

Crossrefs

Programs

  • Mathematica
    c = 0; k = 1; Do[ While[k <= 2^n, If[ PrimeQ[k] && !PrimeQ[(k - 1)/2] && PrimeQ[2k + 1], c++ ]; k++ ]; Print[c], {n, 1, 29}]
  • Python
    from itertools import count, islice
    from sympy import isprime, primerange
    def c(p): return not isprime((p-1)//2) and isprime(2*p+1)
    def agen():
        s = 1
        for n in count(2):
            yield s; s += sum(1 for p in primerange(2**(n-1)+1, 2**n) if c(p))
    print(list(islice(agen(), 20))) # Michael S. Branicky, Oct 09 2022

Extensions

Edited and extended by Robert G. Wilson v, Nov 23 2002
Title and a(30)-a(31) corrected, and a(32) from Sean A. Irvine, Oct 02 2022
a(33)-a(34) from Michael S. Branicky, Oct 09 2022
Previous Showing 21-30 of 39 results. Next