OFFSET
0,3
COMMENTS
Numbers without any base-6 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. 6.
FORMULA
a(n) = Sum_{i=0..m} d(i)*6^i, where Sum_{i=0..m} d(i)*2^i is the base-2 representation of n.
a(n) = A097252(n)/5.
a(2n) = 6*a(n), a(2n+1) = a(2n)+1.
a(n) = Sum_{k>=0} A030308(n,k)*6^k. - Philippe Deléham, Oct 20 2011
G.f.: (1/(1 - x))*Sum_{k>=0} 6^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jun 04 2017
MATHEMATICA
t = Table[FromDigits[RealDigits[n, 2], 6], {n, 0, 100}] (* Clark Kimberling, Aug 02 2012 *)
FromDigits[#, 6]&/@Tuples[{0, 1}, 6] (* Harvey P. Dale, Mar 31 2016 *)
PROG
(PARI) A033043(n, b=6)=subst(Pol(binary(n)), 'x, b) \\ M. F. Hasler, Feb 01 2016
(PARI) a(n)=fromdigits(binary(n), 6) \\ Charles R Greathouse IV, Jan 11 2017
(Julia)
function a(n)
m, r, b = n, 0, 1
while m > 0
m, q = divrem(m, 2)
r += b * q
b *= 6
end
r end; [a(n) for n in 0:46] |> println # Peter Luschny, Jan 03 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
Extended by Ray Chandler, Aug 03 2004
STATUS
approved