The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A353140 Digitally balanced numbers (A031443) whose squares and cubes are also digitally balanced. 0
 3274, 13453, 13492, 13706, 14726, 15113, 15498, 15528, 52049, 52251, 52330, 52673, 52778, 53478, 53684, 53775, 53972, 54295, 54411, 54598, 54601, 55057, 55449, 55462, 55505, 55512, 55689, 56333, 58066, 58260, 58446, 58453, 58470, 58918, 59266, 59722, 59786 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Numbers x such that x, x^2 and x^3 are terms of A031443, that is, have the same number of 0's as 1's in their binary representations. LINKS Table of n, a(n) for n=1..37. MATHEMATICA balQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ @ (m = Length @ d) && Count[d, 1] == m/2]; Select[Range[60000], balQ[#] && balQ[#^2] && balQ[#^3] &] (* Amiram Eldar, Apr 26 2022 *) PROG (Python) from itertools import count, islice from sympy.utilities.iterables import multiset_permutations def isbalanced(n): b = bin(n)[2:]; return b.count("0") == b.count("1") def A031443gen(): yield from (int("1"+"".join(p), 2) for n in count(1) for p in multiset_permutations("0"*n+"1"*(n-1))) def agen(): for k in A031443gen(): if isbalanced(k**2) and isbalanced(k**3): yield k print(list(islice(agen(), 40))) # Michael S. Branicky, Apr 26 2022 CROSSREFS Cf. A031443, A345397, A353139. Sequence in context: A184204 A031820 A048959 * A237085 A260410 A223430 Adjacent sequences: A353137 A353138 A353139 * A353141 A353142 A353143 KEYWORD nonn,base AUTHOR Alex Ratushnyak, Apr 26 2022 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 27 22:31 EDT 2023. Contains 362991 sequences. (Running on oeis4.)