login
A125303
Each number in this sequence is the reversal of the sum of its proper substrings.
1
891, 941, 2931, 5401, 78281, 861761, 67304951, 77171861, 757603751, 6346449411, 6517798231
OFFSET
1,1
EXAMPLE
For example, the sum of the proper substrings of 891 is 8 + 9 + 1 + 89 + 91 = 198 and 198 reversed is the number itself.
5401 is included because 540 + 401 + 54 + 40 + 5 + 4 + 0 + 1 = 1045, which is 5401 backwards.
PROG
(Python)
def ok(n):
w = str(n)
ss = set(int(w[i:j+1]) for i in range(len(w)) for j in range(i, len(w)))
return n > 9 and n == int(str(sum(s for s in ss if s != n))[::-1])
print([k for k in range(80000) if ok(k)]) # Michael S. Branicky, Apr 02 2022
CROSSREFS
Sequence in context: A204366 A266915 A124666 * A087672 A284842 A083827
KEYWORD
base,more,nonn
AUTHOR
Tanya Khovanova, Dec 09 2006
EXTENSIONS
More terms from Paul Richards, Sep 25 2007
a(7)-a(11) from Donovan Johnson, Nov 30 2008
STATUS
approved