OFFSET
0,4
COMMENTS
See A397794 for the definition of the canonical snowball representation of a number.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8192
FORMULA
a(2*n) = a(n).
a(n) = 1 iff n is a power of 2.
a(A200748(n)) = n (and this is the first occurrence of n in the sequence).
EXAMPLE
The first terms are:
n a(n) snowball(n)
-- ---- -----------
0 0 0
1 1 1
2 1 10
3 2 11
4 1 100
5 3 21
6 2 110
7 2 101
8 1 1000
9 3 111
10 3 210
11 4 121
12 2 1100
13 2 1001
14 2 1010
15 4 211
16 1 10000
PROG
(PARI) a(n) = { my (b = 2, s = 0, d); while (n, d = n % b; n \= b; s += d; b = 2+d; ); return (s); }
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
Rémy Sigrist, Jul 17 2026
STATUS
approved
