login
A274945
The Staircase Sequence: 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, 1010, 1021, 1052, 1103, 1174, 1265, 1376, 1507, 1658, 1829, 2040, 2051, 2082, 2133, 2204, 2295, 2406, 2537, 2688, 2859, 3090, 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
OFFSET
1,1
COMMENTS
More precisely, numbers n = d_1 d_2 d_3 ... d_k such that (d_1)^2 + (d_k)^2 = d_2 d_3 ... d_{k-1}. The inner number d_2 d_3 ... d_{k-1} may begin with an initial string of zeros.
This sequence is infinite (it contains the numbers 1000...00010).
See A274944 for the (finite) version where d_2 may not be zero.
For k > 4, there are 90 terms in the sequence with k decimal digits. - Enrique Pérez Herrero, Jun 25 2017.
LINKS
FORMULA
a(n) = 11*a(n-90) - 10*a(n-180) for n > 263. - Chai Wah Wu, Jul 24 2016
From Enrique Pérez Herrero, Jun 25 2017: (Start)
a(n) = i(n)*10^(D_10(n)-1) + (i(n)^2+j(n)^2)*10 + j(n) for n > 83, where:
D_10(n) = floor((n+366)/90) is the number of decimal digits of a(n).
i(n) = 1+floor((n+366)/10)-9*D_10(n) is the first decimal digit of a(n).
j(n) = (n-4)-10*floor((n-4)/10) is the last decimal digit of a(n).
(End)
EXAMPLE
1174 is a term because 1^2 + 4^2 = 17.
81137 is a term because 8^2 + 7^2 = 113.
MATHEMATICA
Select[Range[10^2, 6000], First[#]^2 + Last[#]^2 == FromDigits@ Most@ Rest@ # &@ IntegerDigits@ # &] (* Michael De Vlieger, Jun 27 2017 *)
PROG
(Python)
A274945_list = [j*10**(i+1)+10*(j**2+k**2)+k for i in range(1, 10) for j in range(1, 10) for k in range(10) if j**2+k**2 < 10**i] # Chai Wah Wu, Jul 23 2016
(PARI) isokb(n) = {d = digits(n); if ((#d >=3), nd = vector(#d-2, k, d[k+1]); d[1]^2 + d[#d]^2 == subst(Pol(nd), x, 10); ); } \\ Michel Marcus, Jul 24 2016
CROSSREFS
Cf. A274944.
Sequence in context: A110735 A277622 A101317 * A274944 A275343 A059469
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jul 23 2016, based on an email from Biswarup Banerjee
STATUS
approved