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.

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

This page as a plain text file.
%I A351598 #18 Jun 12 2022 06:14:10
%S A351598 49,8677,53543,141169,202055,755917
%N A351598 Digitally balanced numbers b (A031443) such that b^b is also digitally balanced.
%t A351598 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 A351598 (Python)
%o A351598 from itertools import count, islice
%o A351598 def isdb(n): b = bin(n)[2:]; return b.count("0") == b.count("1")
%o A351598 def agen(): yield from (b for b in count(1) if isdb(b) and isdb(b**b))
%o A351598 print(list(islice(agen(), 2))) # _Michael S. Branicky_, Jun 12 2022
%Y A351598 Cf. A031443, A353139.
%K A351598 nonn,base,hard,more
%O A351598 1,1
%A A351598 _Alex Ratushnyak_, May 02 2022
%E A351598 a(4)-a(6) from _Amiram Eldar_, May 03 2022