A029707 Numbers n such that the n-th and the (n+1)-st primes are twin primes.
2, 3, 5, 7, 10, 13, 17, 20, 26, 28, 33, 35, 41, 43, 45, 49, 52, 57, 60, 64, 69, 81, 83, 89, 98, 104, 109, 113, 116, 120, 140, 142, 144, 148, 152, 171, 173, 176, 178, 182, 190, 201, 206, 209, 212, 215, 225, 230, 234, 236, 253, 256, 262, 265, 268, 277
Offset: 1
Keywords
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..86027
- Gus Wiseman, Four statistics for runs and antiruns of prime, nonprime, squarefree, and nonsquarefree numbers.
Crossrefs
Programs
-
Maple
A029707 := proc(n) numtheory[pi](A001359(n)) ; end proc: seq(A029707(n),n=1..30); # R. J. Mathar, Feb 19 2017
-
Mathematica
Select[ Range@300, PrimeQ[ Prime@# + 2] &] (* Robert G. Wilson v, Mar 11 2007 *) Flatten[Position[Flatten[Differences/@Partition[Prime[Range[100]],2,1]], 2]](* Harvey P. Dale, Jun 05 2014 *)
-
Sage
def A029707(n) : a = [ ] for i in (1..n) : if (nth_prime(i+1)-nth_prime(i) == 2) : a.append(i) return(a) A029707(277) # Jani Melik, May 15 2014
Formula
a(n) = A107770(n) - 1. - Juri-Stepan Gerasimov, Dec 16 2009
Comments