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 A029707 #56 Dec 04 2024 21:24:04 %S A029707 2,3,5,7,10,13,17,20,26,28,33,35,41,43,45,49,52,57,60,64,69,81,83,89, %T A029707 98,104,109,113,116,120,140,142,144,148,152,171,173,176,178,182,190, %U A029707 201,206,209,212,215,225,230,234,236,253,256,262,265,268,277 %N A029707 Numbers n such that the n-th and the (n+1)-st primes are twin primes. %C A029707 Numbers m such that prime(m)^2 == 1 mod (prime(m) + prime(m + 1)). - _Zak Seidov_, Sep 18 2013 %C A029707 First differences are A027833. The complement is A049579. - _Gus Wiseman_, Dec 03 2024 %H A029707 Robert G. Wilson v, <a href="/A029707/b029707.txt">Table of n, a(n) for n = 1..86027</a> %H A029707 Gus Wiseman, <a href="/A373403/a373403.txt">Four statistics for runs and antiruns of prime, nonprime, squarefree, and nonsquarefree numbers</a>. %F A029707 a(n) = A107770(n) - 1. - _Juri-Stepan Gerasimov_, Dec 16 2009 %p A029707 A029707 := proc(n) %p A029707 numtheory[pi](A001359(n)) ; %p A029707 end proc: %p A029707 seq(A029707(n),n=1..30); # _R. J. Mathar_, Feb 19 2017 %t A029707 Select[ Range@300, PrimeQ[ Prime@# + 2] &] (* _Robert G. Wilson v_, Mar 11 2007 *) %t A029707 Flatten[Position[Flatten[Differences/@Partition[Prime[Range[100]],2,1]], 2]](* _Harvey P. Dale_, Jun 05 2014 *) %o A029707 (Sage) %o A029707 def A029707(n) : %o A029707 a = [ ] %o A029707 for i in (1..n) : %o A029707 if (nth_prime(i+1)-nth_prime(i) == 2) : %o A029707 a.append(i) %o A029707 return(a) %o A029707 A029707(277) # _Jani Melik_, May 15 2014 %Y A029707 Cf. A014574, A027833 (first differences), A007508. Equals PrimePi(A001359) (cf. A000720). %Y A029707 The complement is A049579, first differences A251092 except first term. %Y A029707 Lengths of runs of terms differing by 2 are A179067. %Y A029707 The first differences have run-lengths A373820 except first term. %Y A029707 A000040 lists the primes, differences A001223 (run-lengths A333254, A373821). %Y A029707 A038664 finds the first prime gap of 2n. %Y A029707 A046933 counts composite numbers between primes. %Y A029707 For prime runs: A005381, A006512, A025584, A067774. %Y A029707 Cf. A006560, A006562, A037201, A107770, A122535, A155752, A175632, A176246, A373819. %K A029707 nonn %O A029707 1,1 %A A029707 _N. J. A. Sloane_, Dec 11 1999