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.

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.