OFFSET
0,4
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8192
EXAMPLE
PROG
(PARI) b(n) = if(n, bitneg(3*n, exponent(3*n)+1), 1)
a(n) = { my (v=b(n)); while (n, my (x=exponent(n)); if (b(n-2^x)==v, n-=2^x, break)); return (n) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 23 2022
STATUS
approved