[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A022459
a(n) = prime(2n+1) mod prime(n).
1
1, 2, 2, 2, 9, 2, 13, 2, 21, 15, 21, 23, 21, 23, 33, 31, 31, 35, 33, 37, 45, 39, 45, 49, 39, 39, 51, 55, 59, 57, 53, 51, 57, 69, 55, 65, 65, 63, 67, 73, 73, 77, 67, 75, 73, 89, 77, 63, 69, 89, 97, 93, 105, 97, 93, 91, 93, 101, 99, 99, 111, 105, 95, 105, 113, 117
OFFSET
1,2
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A031368(n+1) modulo A000040(n). - Michel Marcus, Sep 30 2013
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
Sequence in context: A075097 A138056 A340080 * A060804 A086364 A260662
KEYWORD
nonn
EXTENSIONS
Missing term a(57) inserted by Michel Marcus, Sep 30 2013
STATUS
approved