login
Numbers k such that decimal expansion of k^2 can be split into two parts whose sum is a number with repeated digits.
1

%I #30 Oct 06 2019 12:46:00

%S 4,5,6,9,10,11,20,22,30,33,44,55,57,66,77,99,100,111,159,171,200,222,

%T 300,333,444,555,666,704,889,999,1000,1111,1149,1578,1755,2000,2025,

%U 2222,2618,3000,3111,3333,6666,7777,9999,10000,11111,20000,22222,22568,22972,30000,30297,33333

%N Numbers k such that decimal expansion of k^2 can be split into two parts whose sum is a number with repeated digits.

%H Seiichi Manyama, <a href="/A328173/b328173.txt">Table of n, a(n) for n = 1..127</a>

%e 4^2 = 16, 1 + 6 = 7.

%e 5^2 = 25, 2 + 5 = 7.

%e 6^2 = 36, 3 + 6 = 9.

%e 9^2 = 81, 8 + 1 = 9.

%e 10^2 = 100, 1 + 0 = 1.

%e 11^2 = 121, 1 + 21 = 22.

%e 20^2 = 400, 4 + 0 = 4.

%e 22^2 = 484, 4 + 84 = 88.

%e 30^2 = 900, 9 + 0 = 9.

%e 33^2 = 1089, 10 + 89 = 99.

%e 44^2 = 1936, 19 + 36 = 55.

%e 55^2 = 3025, 30 + 25 = 55.

%e 57^2 = 3249, 324 + 9 = 333.

%e 66^2 = 4356, 43 + 56 = 99.

%e 77^2 = 5929, 59 + 29 = 88.

%e 99^2 = 9801, 98 + 1 = 99.

%o (Ruby)

%o def A(str)

%o (0..str.size - 2).any?{|i| (str[0..i].to_i + str[i + 1..-1].to_i).to_s.split('').uniq.size == 1}

%o end

%o p (0..10 ** 4).select{|i| A((i * i).to_s)}

%Y Cf. A000290, A010785, A248353.

%K nonn,base

%O 1,1

%A _Seiichi Manyama_, Oct 06 2019