OFFSET
1,2
COMMENTS
a(n) = a(-8-n) for all n in Z using the formula. - Michael Somos, Apr 05 2024
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).
FORMULA
a(n)=n+floor(sqrt(8n-1/2))=A186346(n).
b(n)=n+floor((n^2+1/2)/8)=A186347(n).
G.f.: x*(1 + x^2 - x^4)/((1 - x)^2 * (1 - x^4)). - Michael Somos, Apr 05 2024
EXAMPLE
MATHEMATICA
(* See A186346. *)
PROG
(PARI) a(n) = (n + 4)^2\8 - 2; \\ Michael Somos, Apr 05 2024
(PARI) a(n)=n^2\8 + n \\ Charles R Greathouse IV, Apr 11 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 20 2011
STATUS
approved