OFFSET
1,2
EXAMPLE
1^2 - 1 + 1 = 1, which is not prime, so a(1)=0;
2^2 - 2 + 1 = 3, which is prime, so a(2)=3;
3^3 - 3 + 1 = 7, which is prime, so a(3)=7.
MATHEMATICA
f[n_] := Block[{p = n^2 - n + 1}, If[ PrimeQ[p], p, 0]]; Table[ f[n], {n, 77}] (* Robert G. Wilson v, Jun 07 2005 *)
PROG
(PARI) vector(80, n, if (isprime(p=n^2-n+1), p, 0)) \\ Michel Marcus, Jul 31 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Pierre CAMI, Jun 06 2005
EXTENSIONS
More terms from Robert G. Wilson v, Jun 07 2005
STATUS
approved