login
Numbers n whose square representation in base 10 can be split into three parts whose sum is n.
1

%I #22 Aug 27 2017 19:24:35

%S 36,82,91,235,379,414,675,756,792,909,918,964,991,1296,1702,1782,3366,

%T 3646,3682,4132,4906,5149,6832,7543,8416,8767,8856,9208,9325,9586,

%U 9621,9765,9901,9945,9955,9991,12222,12727,17271,22231

%N Numbers n whose square representation in base 10 can be split into three parts whose sum is n.

%C Extension of the Kaprekar numbers (A006886) where the number of parts of n^2 is two. It is probably possible to generalize this property with the division of n^2 into m parts.

%C By convention, the second and third parts may start with the digit 0, but must be positive. For example, 991 is in the sequence because 991^2 = 982081, which can be split into 982, 08 and 1, and 982 + 08 + 1 = 991. But 100 is not; although 100^2 = 10000 and 100 + 0 + 0 = 100, the second and the third part here are not positive. The number 99 is not in the sequence although 99^2 = 9801 and 98 + 0 + 1 = 99.

%C Property of the sequence:

%C The sequence is infinite because the numbers of the form 10^n-9 = 91, 991, 991, ... (A170955) are in the sequence: if m = 99...91 with k digits "9", then m^2 = 99...98200...081 with k-1 digits "9" and k-1 digits "0", and 99...982 + 00...8 + 1 = 99...91 = m.

%C The prime of the sequence are {379, 9901, ...} union {A093177}.

%C Calculation method: For each class of squares having k-digit numbers, the number of partitions into 3 parts is n(n+1)/2 (A000217). For instance, if the numbers are of the form (abcde) with k = 5, the 6 partitions into 3 subsets are {a,b,{c,d,e}}, {a,{b,c},{d,e}}, {a,{b,c,d},e}, {{a,b},c,{d,e}}, {{a,b},{c,d},e}, {{a,b,c},d,e} and then we compute the corresponding numbers.

%C Example: 235^2 = 55225 (abcde) = 55225 => {a,b,{c,d,e}} = {5,5,{2,2,5}} => {5,5,225} and 5+5+225 = 235.

%H Chai Wah Wu, <a href="/A254648/b254648.txt">Table of n, a(n) for n = 1..400</a>

%e 36^2 = 1296 and 1 + 29 + 6 = 36;

%e 235^2 = 55225 and 5 + 5 + 225 = 235;

%e 1782^2 = 3175524 and 3 + 1755 + 24 = 1782;

%e 12727^2 = 161976529 and 1 + 6197 + 6529 = 12727.

%o (Python)

%o from itertools import combinations

%o A254648_list, n, n2 = [], 10, 100

%o while n < 10**4:

%o m = str(n2)

%o for a in combinations(range(1,len(m)),2):

%o x, y, z = int(m[:a[0]]), int(m[a[0]:a[1]]), int(m[a[1]:])

%o if y != 0 and z != 0 and x+y+z == n:

%o A254648_list.append(n)

%o break

%o n += 1

%o n2 += 2*n-1 # _Chai Wah Wu_, Aug 27 2017

%Y Cf. A000217, A006886, A093177, A170955.

%K nonn,base

%O 1,1

%A _Michel Lagneau_, Feb 04 2015

%E Removed terms 4879 and 5292 by _Chai Wah Wu_, Aug 27 2017