|
|
A038206
|
|
Can express a(n) with the digits of a(n)^2 in order, only adding plus signs.
|
|
5
|
|
|
0, 1, 9, 10, 36, 45, 55, 82, 91, 99, 100, 235, 297, 369, 370, 379, 414, 657, 675, 703, 756, 792, 909, 918, 945, 964, 990, 991, 999, 1000, 1296, 1702, 1782, 2223, 2728, 3366, 3646, 3682, 4132, 4879, 4906, 4950, 5050, 5149, 5292, 6832, 7191, 7272, 7389
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Every term is congruent to 0 or 1 modulo 9.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
82^2 = 6724 and 6+72+4 = 82.
|
|
PROG
|
(Python)
def expr(t, d): # can you express target t with digits d, only adding +'s
if t < 0: return False
if t == int(d): return True
return any(expr(t-int(d[:i]), d[i:]) for i in range(1, len(d)))
def ok(n): return expr(n, str(n*n))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|