OFFSET
1,2
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
For n > 8, a(n) = prime(2n+1) - 2*prime(n). - Charles R Greathouse IV, Sep 30 2013
MATHEMATICA
Table[Mod[Prime[2*n + 1], Prime[n]], {n, 100}] (* T. D. Noe, Sep 30 2013 *)
PROG
(PARI) a(n) = prime(2*n+1) % prime(n); \\ Michel Marcus, Sep 30 2013
(PARI) v=vector(100, i, 1); p=2; q=5; for(n=2, #v, q=nextprime(nextprime(q+1) + 1); p=nextprime(p+1); v[n]=q%p); v \\ Charles R Greathouse IV, Sep 30 2013
(Magma) [NthPrime(2*n+1) mod NthPrime(n): n in [1..50]]; // G. C. Greubel, Feb 28 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Missing term a(57) inserted by Michel Marcus, Sep 30 2013
STATUS
approved