|
|
A274944
|
|
Numbers with at least three digits and with the property that the sum of the squares of the first and last digits equals the number obtained when the first and last digits are deleted.
|
|
3
|
|
|
110, 121, 152, 240, 251, 282, 390, 1103, 1174, 1265, 1376, 1507, 1658, 1829, 2133, 2204, 2295, 2406, 2537, 2688, 2859, 3101, 3132, 3183, 3254, 3345, 3456, 3587, 3738, 3909, 4160, 4171, 4202, 4253, 4324, 4415, 4526, 4657, 4808, 4979, 5250, 5261, 5292, 5343, 5414, 5505, 5616
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
More precisely, numbers n = d_1 d_2 d_3 ... d_k such that d_2 is not zero, and (d_1)^2 + (d_k)^2 = d_2 d_3 ... d_{k-1}.
This version differs from Banerjee's because he does allow d_2 to be zero (we do not) and he starts with 5-digit numbers.
See A274945 for the version where d_2 may be zero.
|
|
LINKS
|
|
|
EXAMPLE
|
1174 is a term because 1^2+4^2 = 17.
81137 is a term because 8^2+7^2 = 113.
91629 is the largest term, since the middle digits cannot be larger than 2*9^2 = 162.
|
|
PROG
|
(PARI) isok(n) = {d = digits(n); if ((#d >=3) && d[2], nd = vector(#d-2, k, d[k+1]); d[1]^2 + d[#d]^2 == subst(Pol(nd), x, 10); ); } \\ Michel Marcus, Jul 23 2016
(Python)
A274944_list = [j*10**(i+1)+10*(j**2+k**2)+k for i in range(1, 4) for j in range(1, 10) for k in range(10) if 10**(i-1) <= j**2+k**2 < 10**i] # Chai Wah Wu, Jul 23 2016
(Python)
A274944_list = sorted([int(str(i)+str(i**2+j**2)+str(j)) for i in range(1, 10) for j in range(10)]) # slightly shorter implementation Chai Wah Wu, Jul 24 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,fini,full
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|