A143585 a(n) is the prime index of A146214(n).
2, 28, 530, 7793, 97255, 1175775, 13804822, 157523559, 1768264167, 19589296501, 214795459468
Offset: 0
Extensions
Offset corrected by Amiram Eldar, Sep 05 2024
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.
a001359 n = a001359_list !! (n-1) a001359_list = filter ((== 1) . a010051' . (+ 2)) a000040_list -- Reinhard Zumkeller, Feb 10 2015
[n: n in PrimesUpTo(1610) | IsPrime(n+2)]; // Bruno Berselli, Feb 28 2011
select(k->isprime(k+2),select(isprime,[$1..1616])); # Peter Luschny, Jul 21 2009 A001359 := proc(n) option remember; if n = 1 then 3; else p := nextprime(procname(n-1)) ; while not isprime(p+2) do p := nextprime(p) ; end do: p ; end if; end proc: # R. J. Mathar, Sep 03 2011
Select[Prime[Range[253]], PrimeQ[# + 2] &] (* Robert G. Wilson v, Jun 09 2005 *) a[n_] := a[n] = (p = NextPrime[a[n - 1]]; While[!PrimeQ[p + 2], p = NextPrime[p]]; p); a[1] = 3; Table[a[n], {n, 51}] (* Jean-François Alcover, Dec 13 2011, after R. J. Mathar *) nextLesserTwinPrime[p_Integer] := Block[{q = p + 2}, While[NextPrime@ q - q > 2, q = NextPrime@ q]; q]; NestList[nextLesserTwinPrime@# &, 3, 50] (* Robert G. Wilson v, May 20 2014 *) Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]]==2&][[All,1]] (* Harvey P. Dale, Jan 04 2021 *) q = Drop[Prepend[p = Prime[Range[100]], 2], -1]; Flatten[q[[#]] & /@ Position[p - q, 2]] (* Horst H. Manninger, Mar 28 2021 *)
A001359(n,p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0,); p-2} /* The following gives a reasonably good estimate for any value of n from 1 to infinity; compare to A146214. */ A001359est(n) = solve( x=1,5*n^2/log(n+1), 1.320323631693739*intnum(t=2.02,x+1/x,1/log(t)^2)-log(x) +.5 - n) /* The constant is A114907; the expression in front of +.5 is an estimate for A071538(x) */ \\ M. F. Hasler, Dec 10 2008
from sympy import primerange, isprime print([n for n in primerange(1, 2001) if isprime(n + 2)]) # Indranil Ghosh, Jul 20 2017
Comments