OFFSET
1,3
COMMENTS
P_4(i) = the i-th square.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Grady D. Bullington, The Connell Sum Sequence, J. Integer Seq. 10 (2007), Article 07.2.6. (includes direct formula for a(n))
Douglas E. Iannucci and Donna Mills-Taylor, On Generalizing the Connell Sequence, J. Integer Sequences, Vol. 2, 1999, #99.1.7.
FORMULA
a(n) = A045928(n)-n+1.
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[IntegerQ[Sqrt[n+1]], a, a+2]}; NestList[nxt, {0, 1}, 100][[All, 2]] (* Harvey P. Dale, Jan 01 2020 *)
PROG
(PARI) lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! issquare(i), aa = aa + 2); ); } \\ Michel Marcus, Apr 01 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006
STATUS
approved