OFFSET
0,12
LINKS
Zak Seidov and Christian N. K. Anderson, Table of n, a(n) for n = 0..10000 (first 1000 terms from Zak Seidov)
FORMULA
a(n) = A071980(n) - n. [R. J. Mathar, Jul 06 2009]
Note: Mathar's formula works for numbers with 1, 2 or 3 digits, but thereafter only for numbers whose internal digits are zeros. [Christian N. K. Anderson, May 13 2013]
EXAMPLE
One-digit numbers have no substring, hence a(0..9)=0;
a(10) = 1+0 = 1,
a(123) = 1+2+3+12+23 = 41,
a(150) = 1+5+0+15+50 = 71.
MATHEMATICA
Table[id=IntegerDigits[n]; Total[Flatten[Table[FromDigits/@ Partition[id, k, 1], {k, Length[id]-1}]]], {n, 0, 150}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Apr 04 2008
STATUS
approved