A125303 Each number in this sequence is the reversal of the sum of its proper substrings.
891, 941, 2931, 5401, 78281, 861761, 67304951, 77171861, 757603751, 6346449411, 6517798231
Offset: 1
Examples
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.
Programs
-
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
Extensions
More terms from Paul Richards, Sep 25 2007
a(7)-a(11) from Donovan Johnson, Nov 30 2008