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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A351598 Digitally balanced numbers b (A031443) such that b^b is also digitally balanced. 0

%I #18 Jun 12 2022 06:14:10

%S 49,8677,53543,141169,202055,755917

%N Digitally balanced numbers b (A031443) such that b^b is also digitally balanced.

%t balQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ @ (m = Length @ d) && Count[d, 1] == m/2]; Select[Range[10000], balQ[#] && balQ[#^#] &] (* _Amiram Eldar_, May 03 2022 *)

%o (Python)

%o from itertools import count, islice

%o def isdb(n): b = bin(n)[2:]; return b.count("0") == b.count("1")

%o def agen(): yield from (b for b in count(1) if isdb(b) and isdb(b**b))

%o print(list(islice(agen(), 2))) # _Michael S. Branicky_, Jun 12 2022

%Y Cf. A031443, A353139.

%K nonn,base,hard,more

%O 1,1

%A _Alex Ratushnyak_, May 02 2022

%E a(4)-a(6) from _Amiram Eldar_, May 03 2022

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 22:54 EDT 2024. Contains 375146 sequences. (Running on oeis4.)