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.

A136020 Smallest prime of the form (2*n+1)*prime(k)-2*n, any k.

This page as a plain text file.
%I A136020 #12 May 13 2013 01:54:09
%S A136020 7,11,29,19,23,53,31,103,191,43,47,101,109,59,311,67,71,149,79,83,173,
%T A136020 181,283,197,103,107,331,229,709,367,127,131,269,139,853,293,151,463,
%U A136020 317,163,167,1021,349,179,547,373,191,389,199,607,619,211,643,1091,223
%N A136020 Smallest prime of the form (2*n+1)*prime(k)-2*n, any k.
%C A136020 The associated prime(k) are in A136019.
%H A136020 Charles R Greathouse IV, <a href="/A136020/b136020.txt">Table of n, a(n) for n = 1..10000</a>
%e A136020 a(1)=7 because 7 is smallest prime p such that (p+2)/3 is prime
%e A136020 a(2)=11 because 11 is smallest prime p such that (p+4)/5 is prime
%e A136020 a(3)=29 because 29 is smallest prime p such that (p+6)/7 is prime
%t A136020 a = {}; Do[k = 1; While[ !PrimeQ[(Prime[k] + 2n)/(2n + 1)], k++ ]; AppendTo[a, Prime[k]], {n, 1, 100}]; a
%t A136020 Reap[Do[k = PrimePi[2n+1]; While[ !PrimeQ[((p=Prime[k]) + 2n)/(2n + 1)], k++ ]; Sow[p], {n, 100}]][[2,1]] (* _Zak Seidov_, Mar 04 2013 *)
%o A136020 (PARI) a(n)=my(t);n+=n;forprime(p=2,default(primelimit),if(isprime(t=(n+1)*p-n),return(t))) \\ _Charles R Greathouse IV_, Feb 13 2011
%Y A136020 Cf. A136019, A136026, A136027.
%K A136020 nonn,easy
%O A136020 1,1
%A A136020 _Artur Jasinski_, Dec 10 2007
%E A136020 Edited by _R. J. Mathar_, May 17 2009