OFFSET
1,1
LINKS
Winston de Greef, Table of n, a(n) for n = 1..10000
Cristina Ballantine and George Beck, Partitions enumerated by self-similar sequences, arXiv:2303.11493 [math.CO], 2023. See p. 27.
MAPLE
a:= proc(n) option remember; `if`(n<3, 3-n,
`if`(n::even, a(n/2), a(n-1)+a(n-2)))
end:
seq(a(n), n=1..70); # Alois P. Heinz, Mar 22 2023
PROG
(PARI) a(n) = if (n <= 2, 3-n, if (n%2, a(n-1)+a(n-2), a(n/2)));
(PARI) lista(nn) = if(nn <=2, [2, 1][1..nn], my(r=vector(nn)); r[1] = 2; r[2] = 1; for(n=3, nn, r[n] = if(n%2, r[n-1]+r[n-2], r[n/2])); r) \\ Winston de Greef, Mar 22 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 22 2023
STATUS
approved