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
Chai Wah Wu, Table of n, a(n) for n = 1..10073
Biswarup Banerjee, The Staircase Sequence
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
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jul 23 2016, based on an email from Biswarup Banerjee
STATUS
approved