login
A050820
Odd numbers in the sequence generated by a(n)=|a(n-1)+2a(n-2)-n|.
0
1, 1, 3, 1, 3, 5, 11, 1, 5, 1, 5, 3, 3, 7, 1, 29, 7, 25, 11, 9, 11, 3, 11, 5, 9, 5, 17, 9, 7, 1, 41, 7, 11, 7, 23, 15, 21, 11, 1, 13, 57, 5, 25, 15, 9, 9, 45, 29, 35, 35, 65, 11, 15, 3, 67, 13, 9, 5, 81, 9, 33, 11, 23, 9, 53, 1, 21, 99, 57, 55, 81, 61, 73, 43, 45, 65, 127, 9, 89, 9, 9, 75
OFFSET
1,3
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, Abs[b+2a-n-1]}; Rest[Select[NestList[nxt, {2, 1, 1}, 180][[All, 2]], OddQ]] (* Harvey P. Dale, Dec 28 2021 *)
CROSSREFS
Cf. A005210.
Sequence in context: A234587 A339413 A114144 * A261869 A279697 A133179
KEYWORD
nonn,easy
EXTENSIONS
More terms from James A. Sellers
STATUS
approved