OFFSET
1,2
FORMULA
EXAMPLE
a(1) = prime(1^2) - 1^2 = prime(1) - 1 = 2 - 1 = 1;
a(2) = prime(2^2) - 2^2 = prime(4) - 4 = 7 - 4 = 3.
MATHEMATICA
Table[n2=n^2; Prime[n2]-n2, {n, 50}] (* Harvey P. Dale, Apr 20 2012 *)
PROG
(PARI) a(n) = prime(n^2) - n^2; \\ Michel Marcus, Feb 18 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jul 31 2008
EXTENSIONS
Corrected and extended by D. S. McNeil, Mar 21 2009
STATUS
approved