%I #45 Sep 08 2022 08:44:50
%S 29,34,36,36,36,40,42,42,44,42,42,42,42,46,50,48,44,46,42,42,54,52,54,
%T 50,52,50,54,56,58,60,52,50,54,54,48,48,54,60,60,56,54,58,50,58,60,64,
%U 58,48,50,52,50,54,66,60,56,54,62,66,70,68,70,66,60,62,66,66,58
%N a(n) = prime(n+10) - prime(n).
%C In principle, moderate values should appear infinitely many times, by analogy with twin primes hypothesis. For example, a(n) = 44 for n = 9, 17, 206, 1604467, 12905293, 18008874, 26545460, 32655424, 57848470, 58313630, 59022635, 66275281, 81581956, 123780499, 160884754, 167797255, 179786560, 181569324, 239542290, ... - _Zak Seidov_, Sep 14 2014, edited by _M. F. Hasler_, Dec 03 2018
%C According to the k-tuple conjecture, any admissible k-tuple of primes occurs with calculable nonzero asymptotic density, i.e., in particular, infinitely many times. For k = 11, number of primes in the interval [prime(n), prime(n+10)], the smallest possible diameter of a k-tuple is A008407(11) = 36, and there are A008409(11) = 2 such constellations: {0, 4, 6, 10, 16, 18, 24, 28, 30, 34, 36}, first occurring at A213646(1) = 1418575498573, and {0, 2, 6, 8, 12, 18, 20, 26, 30, 32, 36}, first occurring at A213647(1) = 11. The combined list { prime(n) | a(n) = 36 } is A257129. - _M. F. Hasler_, Dec 03 2018
%H Zak Seidov, <a href="/A031172/b031172.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A000040(n+10) - A000040(n). - _Wesley Ivan Hurt_, Sep 14 2014
%p A031172:=n->ithprime(n+10)-ithprime(n): seq(A031172(n), n=1..50);
%t Table[Prime[n + 10] - Prime[n], {n, 50}] (* _Wesley Ivan Hurt_, Sep 14 2014 *)
%o (Magma) [NthPrime(n+10)-NthPrime(n): n in [1..100] ]; // _Vincenzo Librandi_, Apr 23 2011
%o (Haskell) a031172_list = zipWith (-) (drop 10 a000040_list) a000040_list
%o a031172 n = a031172_list !! (n-1) -- _Reinhard Zumkeller_, Aug 23 2015
%o (PARI) A031172(n)=prime(n+10)-prime(n) \\ _M. F. Hasler_, Dec 03 2018
%o (Sage) [(nth_prime(n+10) - nth_prime(n)) for n in (1..100)] # _G. C. Greubel_, Dec 04 2018
%o (Python)
%o from sympy import prime
%o for n in range(1,100): print(prime(n+10)-prime(n)) # _Stefano Spezia_, Dec 06 2018
%o (GAP) P:=Filtered([1..400],IsPrime);; a:=List([1..Length(P)-10],n->P[n+10]-P[n]); # _Muniru A Asiru_, Dec 06 2018
%Y Cf. A000040.
%Y Cf. A001223, A031131, A031165, A031166, A031167, A031168, A031169, A031170, A031171.
%Y Cf. A008407, A008409, A213646, A213647, A257129.
%K nonn
%O 1,1
%A _Jeff Burch_
%E Offset changed from 2 to 1; added a(1)=29 by _Vincenzo Librandi_, Apr 23 2011