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.

A135124 Numbers such that the digital sums in base 2, base 4 and base 8 are all equal.

Original entry on oeis.org

1, 64, 65, 4096, 4097, 4160, 4161, 262144, 262145, 262208, 262209, 266240, 266241, 266304, 266305, 16777216, 16777217, 16777280, 16777281, 16781312, 16781313, 16781376, 16781377, 17039360, 17039361, 17039424, 17039425, 17043456
Offset: 1

Views

Author

Hieronymus Fischer, Dec 31 2007, Dec 31 2008

Keywords

Comments

Written as base 64 numbers the sequence is 1,10,11,100,101,110,111,1000,1001, ... (cf. A007088)

Examples

			a(7)=4161, since ds_2(4161 )=ds_4(4161 )=ds_8(4161 ), where ds_x=digital sum base x.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500000], Total[IntegerDigits[#, 2]] == Total[IntegerDigits[#, 4]] == Total[IntegerDigits[#, 8]] &] (* G. C. Greubel, Sep 26 2016 *)
    With[{k = 64}, Rest@ Map[FromDigits[#, k] &, Tuples[{0, 1}, 5]]] (* Michael De Vlieger, Oct 28 2022 *)
    Select[Range[171*10^5],Length[Union[Total/@IntegerDigits[#,{2,4,8}]]]==1&] (* Harvey P. Dale, May 14 2025 *)
  • PARI
    a(n) = fromdigits(binary(n),64); \\ Kevin Ryde, Apr 02 2025

Formula

a(n) = (1/2)*Sum_{k=0..floor(log_2(n))} (1-(-1)^floor(n/2^k))*64^k.
G.f.: (1/(1-x))*Sum_{k>=0} 64^k*x^(2^k)/(1+x^(2^k)).

Extensions

Edited by N. J. A. Sloane, Jan 17 2009