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 A176379 #10 May 21 2025 12:58:22 %S A176379 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, %T A176379 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, %U A176379 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 %N A176379 The smallest prime q which stays prime through at least two iterations of q -> := 2 * q + prime(n+1). %C A176379 Such q are generalized Cunningham primes: prime numbers p(1), ..., p(n): %C A176379 q, f(q) = 2 * q + prime(n+1), f(f(q)) = 4 * q + 3 * prime(n+1) must be primes. %C A176379 n = 0 is omitted as the first iteration 2 * q + prime(1) = 2 * (q+1) is generally even. %C A176379 List of (q, first iteration, second iteration): %C A176379 (2,7,17) (7,19,43) (2,11,29) (31,73,157) (2,17,47) %C A176379 (7,31,79) (11,41,101) (7,37,97) (19,67,163) (5,41,113) %C A176379 (5,47,131) (19,79,199) (2,47,137) (13,73,193) (13,79,211) %C A176379 (61,181,421) (11,83,227) (17,101,269) (61,193,457) (5,83,239) %C A176379 (5,89,257) (7,97,277) (139,367,823) (5,107,311) (19,139,379) %C A176379 (2,107,317) (103,313,733) (29,167,443) (7,127,367) (2,131,389) %C A176379 (109,349,829) (7,151,439) (59,257,653) (31,211,571) (41,233,617) %C A176379 (5,167,491) (5,173,509) (127,421,1009) (13,199,571) (31,241,661) %C A176379 (5,191,563) (109,409,1009) (2,197,587) (7,211,619) (41,281,761) %C A176379 (11,233,677) (2,227,677) (7,241,709) (101,431,1091) (67,367,967) %D A176379 Joe Buhler, Algorithmic Number Theory, Third International Symposium, ANTS-III, Springer New York, 1998. %D A176379 R. K. Guy, Unsolved problems in number theory, Springer-Verlag, New York, 1994. %D A176379 Paulo Ribenboim, Die Welt der Primzahlen, Geheimnisse und Rekorde, Springer-Verlag GmbH & Co. KG, 2006. %F A176379 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. %e A176379 n=1, prime(n+1) = 3: checking q=2: 2 * 2 + 3 = 7, 2 * 7 + 3 = 17, q=2 is first term. %e A176379 n=2: checking q=7: 2 * 7 + 5 = 19, 2 * 19 + 5 = 43, 7 is 2nd term. %e A176379 n=3: checking q=2: 2 * 2 + 7 = 11, 2 * 11 + 7 = 29, 2 is 3rd term. %p A176379 A176379 := proc(n) %p A176379 pk1 := ithprime(n+1) ; %p A176379 for pidx from 1 do %p A176379 p := ithprime(pidx) ; %p A176379 pitr := 2*p+pk1 ; %p A176379 if not isprime(pitr) then %p A176379 next ; %p A176379 end if; %p A176379 pitr := 2*pitr+pk1 ; %p A176379 if not isprime(pitr) then %p A176379 next ; %p A176379 else %p A176379 return p ; %p A176379 end if; %p A176379 end do: %p A176379 end proc: %p A176379 seq(A176379(n),n=1..20) ; # _R. J. Mathar_, May 21 2025 %Y A176379 Cf. A005602, A059761, A059762, A110024. %K A176379 base,nonn %O A176379 1,1 %A A176379 Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 16 2010