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
Michel Marcus, Table of n, a(n) for n = 1..90
Biswarup Banerjee, The Staircase Sequence
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
N. J. A. Sloane, Jul 23 2016, based on an email from Biswarup Banerjee.
EXTENSIONS
More terms from Michel Marcus, Jul 23 2016
STATUS
approved