OFFSET
1,3
COMMENTS
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
EXAMPLE
Consider the number n = 351 so n^2 = 123201. The base-10 digit sums of 351 and 123201 are both 9. Moreover, 351 has binary representation 101011111 and 123201 has binary representation 11110000101000001 and both have base-2 digit sum = 7. Thus 351 is a term in the sequence.
MATHEMATICA
Select[Range[0, 180000], Total[IntegerDigits[#]]==Total[IntegerDigits[#^2]]&&Total[ IntegerDigits[ #, 2]]==Total[IntegerDigits[#^2, 2]]&] (* Harvey P. Dale, May 29 2023 *)
PROG
(Sage) [n for n in [0..200000] if sum((n).digits(2))==sum((n^2).digits(2)) and sum((n).digits())==sum((n^2).digits())]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Tom Edgar, Aug 27 2015
EXTENSIONS
Name (definition) and Example edited by Harvey P. Dale, May 29 2023
STATUS
approved