OFFSET
1,1
COMMENTS
Motivated by the fact that the first 32 terms of this sequence are primes. This has an explanation through Heegener numbers, similar to Euler's prime-generating polynomial (cf. A002837 and related crossrefs).
See also A007635 for the primes in this sequence, A260678 for indices k for which a(k) is composite.
Sequence provides all numbers m for which 4*m-67 is a square. [Bruno Berselli, Nov 16 2015]
LINKS
FORMULA
G.f.: x*(257 - 544*x + 289*x^2)/(1 - x)^3.
MATHEMATICA
Table[n + (17 - n)^2, {n, 70}] (* Vincenzo Librandi, Nov 16 2015 *)
LinearRecurrence[{3, -3, 1}, {257, 227, 199}, 60] (* Harvey P. Dale, May 12 2019 *)
PROG
(PARI) for(n=1, 99, print1(n+(17-n)^2, ", "))
(Magma) [n+(17-n)^2: n in [1..70]]; // Vincenzo Librandi, Nov 16 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, Nov 15 2015
STATUS
approved