login
Numbers k such that sum of digits (k) and sum of digits (k^2) is 10.
1

%I #15 Sep 08 2022 08:46:24

%S 19,46,55,145,190,361,451,460,550,1450,1900,3610,4510,4600,5500,14500,

%T 19000,20251,36100,45100,46000,55000,145000,190000,202510,361000,

%U 451000,460000,550000,1450000,1900000,2025100,3610000,4510000,4600000,5500000,14500000

%N Numbers k such that sum of digits (k) and sum of digits (k^2) is 10.

%C Subsequence of A058369 (k and k^2 have same digit sum).

%C A007953(A058369(n)) begins with 1, 9, 1, 9, 10, 9, 10, 10, 9, 18, ...: the 1's come from A011557, the 9's come from A325450, and the 10's come from this sequence.

%e a(4) = 145 because 1+4+5 = 10, 145^2 = 21025, and 2+1+0+2+5 = 10.

%t Select[Range[2 10^7], Total[IntegerDigits[#]]==10 && Total[IntegerDigits[#^2]]==10 &]

%o (Magma) [n: n in [1..2*10^7] | &+Intseq(n^2) eq 10 and &+Intseq(n) eq 10];

%Y Cf. A004159, A007953, A058369, A325450.

%K nonn,base

%O 1,1

%A _Vincenzo Librandi_, May 10 2019