OFFSET
0,2
COMMENTS
a(n) gives the number of 1's in row n of A243756.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16384
Tyler Ball, Tom Edgar, and Daniel Juda, Dominance Orders, Generalized Binomial Coefficients, and Kummer's Theorem, Mathematics Magazine, Vol. 87, No. 2, April 2014, pp. 135-143.
FORMULA
a(n) = Product_{i=0..k}(n_i+1) where n = Sum_{i=0..k}n_i*4^i.
EXAMPLE
The base-4 representation of 10 is (2,2) so a(10) = (2+1)*(2+1) = 9.
PROG
(Sage) [prod(x+1 for x in n.digits(4)) for n in [0..75]]
(PARI) a(n) = my(d=digits(n, 4)); prod(k=1, #d, d[k]+1); \\ Michel Marcus, Feb 05 2016
(Scheme) (define (A268444 n) (if (zero? n) 1 (let ((d (mod n 4))) (* (+ 1 d) (A268444 (/ (- n d) 4)))))) ;; For R6RS standard. Use modulo instead of mod in older Schemes like MIT/GNU Scheme. - Antti Karttunen, May 28 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Tom Edgar, Feb 04 2016
STATUS
approved