|
|
A078696
|
|
a(n+1)=a(n)+a(n-1) if a(n-1) odd, a(n+1)=a(n)+a(n-1)/2 if a(n-1) even.
|
|
1
|
|
|
1, 1, 2, 3, 4, 7, 9, 16, 25, 33, 58, 91, 120, 211, 271, 482, 753, 994, 1747, 2244, 3991, 5113, 9104, 14217, 18769, 32986, 51755, 68248, 120003, 154127, 274130, 428257, 565322, 993579, 1276240, 2269819, 2907939, 5177758, 8085697, 10674576
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
EXAMPLE
|
a(8)=16 even, a(9)=25, so a(10)=25+16/2=25+8=33 a(9)=25 odd, a(10)=33, so a(11)=25+33=58
|
|
MATHEMATICA
|
nxt[{a_, b_}]:={b, If[OddQ[a], a+b, a/2+b]}; NestList[nxt, {1, 1}, 40][[All, 1]] (* Harvey P. Dale, Dec 23 2022 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|