[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”).

a(n) = prime(2n+1) mod prime(n).
1

%I #19 Sep 08 2022 08:44:46

%S 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,

%T 39,51,55,59,57,53,51,57,69,55,65,65,63,67,73,73,77,67,75,73,89,77,63,

%U 69,89,97,93,105,97,93,91,93,101,99,99,111,105,95,105,113,117

%N a(n) = prime(2n+1) mod prime(n).

%H Charles R Greathouse IV, <a href="/A022459/b022459.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A031368(n+1) modulo A000040(n). - _Michel Marcus_, Sep 30 2013

%F For n > 8, a(n) = prime(2n+1) - 2*prime(n). - _Charles R Greathouse IV_, Sep 30 2013

%t Table[Mod[Prime[2*n + 1], Prime[n]], {n, 100}] (* _T. D. Noe_, Sep 30 2013 *)

%o (PARI) a(n) = prime(2*n+1) % prime(n); \\ _Michel Marcus_, Sep 30 2013

%o (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

%o (Magma) [NthPrime(2*n+1) mod NthPrime(n): n in [1..50]]; // _G. C. Greubel_, Feb 28 2018

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Missing term a(57) inserted by _Michel Marcus_, Sep 30 2013