OFFSET
0,5
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
First differences: a(n+1)-a(n)= 2*A113405(n).
O.g.f.: (1-x-x^2)/((1+x)(1-x+x^2)(1-2x)). - R. J. Mathar, Jul 16 2008
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[MemberQ[{1, 2, 3}, Mod[n+1, 6]], 2a-1, 2a+1]}; NestList[ nxt, {0, 1}, 40][[All, 2]] (* Harvey P. Dale, Jul 06 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Nov 17 2007
EXTENSIONS
Edited and extended by R. J. Mathar, Jul 16 2008
STATUS
approved