login
Can express a(n) with the digits of a(n)^2 in order, only adding plus signs.
5

%I #29 Oct 06 2021 17:58:23

%S 0,1,9,10,36,45,55,82,91,99,100,235,297,369,370,379,414,657,675,703,

%T 756,792,909,918,945,964,990,991,999,1000,1296,1702,1782,2223,2728,

%U 3366,3646,3682,4132,4879,4906,4950,5050,5149,5292,6832,7191,7272,7389

%N Can express a(n) with the digits of a(n)^2 in order, only adding plus signs.

%C Every term is congruent to 0 or 1 modulo 9.

%H Max Alekseyev and Giovanni Resta, <a href="/A038206/b038206.txt">Table of n, a(n) for n = 1..3200</a> (first 408 terms from Max Alekseyev)

%F a(n) = sqrt(A104113(n)). - _Andrea Tarantini_, Sep 27 2021

%e 82^2 = 6724 and 6+72+4 = 82.

%o (Python)

%o def expr(t, d): # can you express target t with digits d, only adding +'s

%o if t < 0: return False

%o if t == int(d): return True

%o return any(expr(t-int(d[:i]), d[i:]) for i in range(1, len(d)))

%o def ok(n): return expr(n, str(n*n))

%o print(list(filter(ok, range(7500)))) # _Michael S. Branicky_, Sep 27 2021

%Y Cf. A104113 (squared).

%K nonn,base

%O 1,3

%A _Erich Friedman_

%E Offset corrected and b-file added by _Max Alekseyev_, Jun 08 2018