OFFSET
1,2
COMMENTS
Nonnegative numbers k such that 12*k + 13 is a square. - Bruno Berselli, Feb 16 2018
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(n) ~ 0.75*n^2 (the sequence a(n)/n^2 has limit 3/4). - Stefan Steinerberger, Dec 10 2007
From R. J. Mathar, Oct 24 2008: (Start)
G.f.: x*(1 + 2*x + 4*x^2 - x^4)/((1 + x)^2*(1 - x)^3).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = -7/8 + 3*n*(n+1)/4 - (-1)^n*(1 + 2*n)/8. (End)
a(n) = (lcm(f(n), f(n) + 3) - 1)/3, where f(n) = floor((3*n - 1)/2). - Gary Detlefs, May 14 2011
MATHEMATICA
a = {1}; For[n = 2, n < 100, n++, If[OddQ[n], AppendTo[a, 2*n + a[[ -1]]], AppendTo[a, n + a[[ -1]]]]]; a (* Stefan Steinerberger, Dec 10 2007 *)
nxt[{n_, a_}]:={n+1, If[OddQ[n], a+n+1, a+2n+2]}; NestList[nxt, {1, 1}, 50][[All, 2]] (* Harvey P. Dale, May 17 2021 *)
PROG
(PARI) a(n)=lcm((3*n-1)\2, (3*n+5)\2)\3 \\ Charles R Greathouse IV, Dec 28 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Pierre CAMI, Dec 09 2007
EXTENSIONS
More terms from Stefan Steinerberger, Dec 10 2007
STATUS
approved