OFFSET
0,7
COMMENTS
Value 0 is treated as empty bit string.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..32768
FORMULA
a(n) = (a(n-1)*A062383(a(n-2)) + a(n-2)) mod n if n > 1, a(n) = n if n < 2.
EXAMPLE
a(18) = 5 = 239 mod 18, where 239 = 11101111_2 is the binary concatenation 1110_2 = 14 = a(17) and 1111_2 = 15 = a(16).
MAPLE
a:= proc(n) option remember; `if`(n<2, n, (t-> a(n-1)*
`if`(t=0, 1, 2^(ilog2(t)+1))+t)(a(n-2)) mod n)
end:
seq(a(n), n=0..100);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Mar 21 2020
STATUS
approved