A230147 Record values in A165959.
2, 3, 5, 11, 15, 27, 33, 37, 65, 67, 75, 77, 95, 137, 147, 151, 153, 169, 191, 219, 247, 249, 251, 291, 297, 303, 307, 319, 415, 429, 441, 465, 495
Offset: 1
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.
a001223 n = a001223_list !! (n-1) a001223_list = zipWith (-) (tail a000040_list) a000040_list -- Reinhard Zumkeller, Oct 29 2011
[(NthPrime(n+1) - NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Apr 02 2011
with(numtheory): for n from 1 to 500 do printf(`%d,`,ithprime(n+1) - ithprime(n)) od:
Differences[Prime[Range[100]]] (* Harvey P. Dale, May 15 2011 *)
diff(v)=vector(#v-1,i,v[i+1]-v[i]); diff(primes(100)) \\ Charles R Greathouse IV, Feb 11 2011
forprime(p=1, 1e3, print1(nextprime(p+1)-p, ", ")) \\ Felix Fröhlich, Sep 06 2014
from sympy import prime def A001223(n): return prime(n+1)-prime(n) # Chai Wah Wu, Jul 07 2022
differences(prime_range(1000)) # Joerg Arndt, May 15 2011
For n=10, the n-th Ramanujan prime is A104272(n)= 97, the value of k = 25, so i is >= 26, i-n >= 16, the i-n prime is 53, and 2*53 = 106. This leaves the range [97, 106] for the 26th prime which is 101. In this example, 53 is the small associated Ramanujan prime.
nn = 100; t = Table[0, {nn}]; Do[m = PrimePi[2n] - PrimePi[n]; If[0 < m <= nn, t[[m]] = n], {n, 15 nn}]; A084139 = Join[{1}, t]; a[n_] := NextPrime[A084139[[n]]]; Array[a, nn] (* Jean-François Alcover, Nov 07 2018, after T. D. Noe in A084139 *)
use ntheory ":all"; say next_prime((nth_ramanujan_prime($)+1) >> 1) for 1..100; # _Dana Jacobsen, Mar 02 2016
a(4) = pi(A214757(4)) - pi(A214756(4)) = 10 - 7 = 3
Comments