login
A361736
Semi-Lucas sequence: a(2*n) = a(n) and a(2*n+1) = a(2*n) + a(2*n-1), with a(1) = 2 and a(2) = 1.
3
2, 1, 3, 1, 4, 3, 7, 1, 8, 4, 12, 3, 15, 7, 22, 1, 23, 8, 31, 4, 35, 12, 47, 3, 50, 15, 65, 7, 72, 22, 94, 1, 95, 23, 118, 8, 126, 31, 157, 4, 161, 35, 196, 12, 208, 47, 255, 3, 258, 50, 308, 15, 323, 65, 388, 7, 395, 72, 467, 22, 489, 94, 583, 1, 584, 95, 679, 23, 702, 118
OFFSET
1,1
LINKS
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
Sequence in context: A290988 A165025 A225045 * A278575 A333879 A175126
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 22 2023
STATUS
approved