A233822 a(n) = 2*R(n) - R(n+1), where R(n) is the n-th Ramanujan prime.
-7, 5, 5, 17, 35, 35, 51, 63, 45, 93, 95, 87, 105, 147, 135, 155, 177, 135, 225, 225, 227, 237, 219, 257, 257, 255, 303, 275, 345, 331, 361, 345, 393, 399, 407, 429, 427, 417, 435, 483, 479, 437, 567, 555, 581, 587, 597, 595, 573, 639, 639, 641, 647
Offset: 1
Keywords
Examples
The only negative term is a(1) = 2*R(1) - R(2) = 2*2 - 11 = -7.
Links
- Dana Jacobsen, Table of n, a(n) for n = 1..10000
- Baris Paksoy, Derived Ramanujan primes: R'_n, arXiv:1210.6991 [math.NT], 2012.
Programs
-
Mathematica
nn = 100; R = Table[0, {nn}]; s = 0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s + 1]] = k], {k, Prime[3*nn]}]; R = R + 1; Most[2 R - RotateLeft[R]] (* Jean-François Alcover, Dec 06 2018, after T. D. Noe in A104272 *)
-
Perl
use ntheory ":all"; say 2*nth_ramanujan_prime($)-nth_ramanujan_prime($+1) for 1..10 # Dana Jacobsen, Sep 02 2017
Comments