OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)=1 because prime(1) + 1*(-1)^1 = 1.
MAPLE
A176624 := proc(n) ithprime(n)+n*(-1)^n ; end proc: seq(A176624(n), n=1..120) ; # R. J. Mathar, Apr 27 2010
MATHEMATICA
Table[Prime[n]+(-1)^n*n, {n, 60}] (* G. C. Greubel, Jul 01 2021 *)
PROG
(Magma) [NthPrime(n) +(-1)^n*n: n in [1..60]]; // G. C. Greubel, Jul 01 2021
(Sage) [nth_prime(n) +(-1)^n*n for n in (1..60)] # G. C. Greubel, Jul 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Apr 22 2010
EXTENSIONS
Entries checked by R. J. Mathar, Apr 27 2010
STATUS
approved