login
a(n) = prime(2n) mod prime(n).
5

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

%S 1,1,3,5,7,11,9,15,15,13,17,15,19,21,19,25,21,29,29,31,35,35,33,45,35,

%T 37,45,49,53,55,39,49,43,59,51,57,59,57,63,63,63,71,61,71,69,81,69,57,

%U 67,83,91,91,95,91,87,87,81,99,93,97,107,97,87,97,107,109,95

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

%H G. C. Greubel, <a href="/A022457/b022457.txt">Table of n, a(n) for n = 1..10000</a>

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

%p A022457 := proc(n)

%p modp(ithprime(2*n),ithprime(n)) ;

%p end proc:

%p seq(A022457(n),n=1..67) ; # _R. J. Mathar_, Sep 02 2016

%t Table[Mod[Prime[2*n], Prime[n]], {n, 1, 50}] (* _G. C. Greubel_, Feb 28 2018 *)

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

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

%Y Cf. A000040, A031215, A066066.

%K nonn

%O 1,3

%A _Clark Kimberling_