A107770 Index of greater of twin primes in the primes.
3, 4, 6, 8, 11, 14, 18, 21, 27, 29, 34, 36, 42, 44, 46, 50, 53, 58, 61, 65, 70, 82, 84, 90, 99, 105, 110, 114, 117, 121, 141, 143, 145, 149, 153, 172, 174, 177, 179, 183, 191, 202, 207, 210, 213, 216, 226, 231, 235, 237, 254, 257, 263, 266, 269, 278, 287
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A062301.
Programs
-
Magma
[n: n in [1..450]| IsPrime(NthPrime(n)-2)]; // Vincenzo Librandi, Apr 04 2018
-
Maple
select(n->ithprime(n)-ithprime(n-1)=2, [$2..300]); # Muniru A Asiru, Apr 05 2018
-
Mathematica
a = Flatten[Table[If[Prime[j] - Prime[j - 1] == 2, j, {}], {j, 2, 200}]] Flatten[Position[Partition[Prime[Range[400]],2,1],?(#[[2]]-#[[1]] == 2&),{1},Heads->False]]+1 (* _Harvey P. Dale, Jun 10 2014 *)
-
PARI
for(n=3, 1e3, if(isprime(prime(n)-2), print1(n, ", "))); \\ Altug Alkan, Apr 05 2018
Formula
a(n) = A029707(n) + 1. - Juri-Stepan Gerasimov, Dec 16 2009
Extensions
Incorrect comment removed by Charles R Greathouse IV, Mar 19 2010
More terms from Harvey P. Dale, Jun 10 2014
Comments