OFFSET
1,2
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A000040(n) mod (2*n).
EXAMPLE
a(1) = prime(1) mod even(1) = 2 mod 2 = 0.
a(5) = prime(5) mod even(5) = 11 mod 10 = 1.
MAPLE
A192327 := proc(n) modp(ithprime(n), 2*n) ; end proc:
seq(A192327(n), n=1..80) ; # R. J. Mathar, Jul 11 2011
MATHEMATICA
Table[Mod[Prime[n], 2n], {n, 50}] (* Alonso del Arte, Jun 29 2011 *)
PROG
(MATLAB) % n = number of computed terms of sequence
for i=1:n,
a(i) = mod(prime(i), even(i)) ;
end
(PARI) a(n)=prime(n)%(2*n) \\ Charles R Greathouse IV, Jun 29 2011
(Magma) A192327:=func< n | NthPrime(n) mod 2*n >; [ A192327(n): n in [1..80] ]; // Klaus Brockhaus, Jul 10 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Pasi Airikka, Jun 28 2011
STATUS
approved