cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A033043 Sums of distinct powers of 6.

This page as a plain text file.
%I A033043 #64 Apr 04 2025 23:42:12
%S A033043 0,1,6,7,36,37,42,43,216,217,222,223,252,253,258,259,1296,1297,1302,
%T A033043 1303,1332,1333,1338,1339,1512,1513,1518,1519,1548,1549,1554,1555,
%U A033043 7776,7777,7782,7783,7812,7813,7818,7819,7992,7993,7998,7999,8028,8029,8034
%N A033043 Sums of distinct powers of 6.
%C A033043 Numbers without any base-6 digits greater than 1.
%H A033043 T. D. Noe, <a href="/A033043/b033043.txt">Table of n, a(n) for n = 0..1023</a>
%H A033043 Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, p. 6.
%F A033043 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.
%F A033043 a(n) = A097252(n)/5.
%F A033043 a(2n) = 6*a(n), a(2n+1) = a(2n)+1.
%F A033043 a(n) = Sum_{k>=0} A030308(n,k)*6^k. - _Philippe Deléham_, Oct 20 2011
%F A033043 G.f.: (1/(1 - x))*Sum_{k>=0} 6^k*x^(2^k)/(1 + x^(2^k)). - _Ilya Gutkovskiy_, Jun 04 2017
%p A033043 S:= {0,1}:
%p A033043 for i from 1 to 6 do S:= S union (S +~ 6^i) od:
%p A033043 sort(convert(S,list)); # _Robert Israel_, Apr 04 2025
%t A033043 t = Table[FromDigits[RealDigits[n, 2], 6], {n, 0, 100}] (* _Clark Kimberling_, Aug 02 2012 *)
%t A033043 FromDigits[#,6]&/@Tuples[{0,1},6] (* _Harvey P. Dale_, Mar 31 2016 *)
%o A033043 (PARI) A033043(n,b=6)=subst(Pol(binary(n)),'x,b) \\ _M. F. Hasler_, Feb 01 2016
%o A033043 (PARI) a(n)=fromdigits(binary(n), 6) \\ _Charles R Greathouse IV_, Jan 11 2017
%o A033043 (Julia)
%o A033043 function a(n)
%o A033043     m, r, b = n, 0, 1
%o A033043     while m > 0
%o A033043         m, q = divrem(m, 2)
%o A033043         r += b * q
%o A033043         b *= 6
%o A033043     end
%o A033043 r end; [a(n) for n in 0:46] |> println # _Peter Luschny_, Jan 03 2021
%o A033043 (Python)
%o A033043 def A033043(n): return int(bin(n)[2:],6) # _Chai Wah Wu_, Apr 04 2025
%Y A033043 Cf. A000695, A005836, A030308, A033043-A033052, A097252.
%Y A033043 Row 6 of array A104257.
%K A033043 nonn,base,easy
%O A033043 0,3
%A A033043 _Clark Kimberling_
%E A033043 Extended by _Ray Chandler_, Aug 03 2004