OFFSET
0,3
COMMENTS
Numbers without any base-12 digits greater than 1.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1023
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 45.
Eric Weisstein's World of Mathematics, Duodecimal
Wikipedia, Duodecimal
FORMULA
a(n) = Sum_{i=0..m} d(i)*12^i, where Sum_{i=0..m} d(i)*2^i is the base-2 representation of n.
a(n) = A097258(n)/11.
a(2n) = 12*a(n), a(2n+1) = a(2n)+1.
G.f.: (1/(1 - x))*Sum_{k>=0} 12^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jun 04 2017
MATHEMATICA
With[{k = 12}, Map[FromDigits[#, k] &, Tuples[{0, 1}, 6]]] (* Michael De Vlieger, Oct 28 2022 *)
PROG
(PARI) {maxn=37;
for(vv=0, maxn,
bvv=binary(vv);
ll=length(bvv); texp=0; btod=0;
forstep(i=ll, 1, -1, btod=btod+bvv[i]*12^texp; texp++);
print1(btod, ", "))}
\\ Douglas Latimer, Apr 16 2012
(PARI) a(n)=fromdigits(binary(n), 12) \\ Charles R Greathouse IV, Jan 11 2017
(Haskell)
import Data.List (unfoldr)
a033048 n = a033048_list !! (n-1)
a033048_list = filter (all (< 2) . unfoldr (\x ->
if x == 0 then Nothing else Just $ swap $ divMod x 12)) [1..]
-- Reinhard Zumkeller, Apr 17 2011
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
Extended by Ray Chandler, Aug 03 2004
STATUS
approved