OFFSET
1,1
COMMENTS
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.
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.
Property of the sequence:
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.
The prime of the sequence are {379, 9901, ...} union {A093177}.
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.
Example: 235^2 = 55225 (abcde) = 55225 => {a,b,{c,d,e}} = {5,5,{2,2,5}} => {5,5,225} and 5+5+225 = 235.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..400
EXAMPLE
36^2 = 1296 and 1 + 29 + 6 = 36;
235^2 = 55225 and 5 + 5 + 225 = 235;
1782^2 = 3175524 and 3 + 1755 + 24 = 1782;
12727^2 = 161976529 and 1 + 6197 + 6529 = 12727.
PROG
(Python)
from itertools import combinations
A254648_list, n, n2 = [], 10, 100
while n < 10**4:
m = str(n2)
for a in combinations(range(1, len(m)), 2):
x, y, z = int(m[:a[0]]), int(m[a[0]:a[1]]), int(m[a[1]:])
if y != 0 and z != 0 and x+y+z == n:
A254648_list.append(n)
break
n += 1
n2 += 2*n-1 # Chai Wah Wu, Aug 27 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Feb 04 2015
EXTENSIONS
Removed terms 4879 and 5292 by Chai Wah Wu, Aug 27 2017
STATUS
approved