login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A093882
Sum of all the numbers formed by deleting one digit from n.
5
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10, 11, 12, 13, 14, 15
OFFSET
0,12
COMMENTS
Subsidiary sequence: Sum of the numbers formed by deleting all possible strings touching one end ( containing at least one of the LSB or MSB). A071980(123) = 123 + 12 + 1 + 23 + 3 = 162. A071980(1234) = 1 + 12 + 123 + 1234 + 234 + 34 + 4 = 1642.
This allows leading zeros are after deletion. If these are forbidden, the first change would be a(101) = 21 instead of 22. - Franklin T. Adams-Watters, Jul 27 2006
LINKS
EXAMPLE
a(123) = 12 + 13 + 23 = 48. [corrected by Harvey P. Dale, Jul 24 2017]
MAPLE
read("transforms"):
A093882 := proc(n)
local a, dgs, d, dgsred ;
a := 0 ;
dgs := convert(n, base, 10) ;
for d from 1 to nops(dgs) do
[op(1..d-1, dgs), op(d+1..nops(dgs), dgs)] ;
a := a+digcatL(%) ;
end do:
a ;
end proc: # R. J. Mathar, May 06 2019
# second Maple program:
a:= n-> (s-> add(parse(cat("0", s[..i-1],
s[i+1..])), i=1..length(s)))(""||n):
seq(a(n), n=0..123); # Alois P. Heinz, May 06 2019
MATHEMATICA
sn[n_]:=Module[{idn=IntegerDigits[n]}, Total[FromDigits/@Table[ Delete[ idn, i], {i, Length[idn]}]]]; Array[sn, 90, 0] (* Harvey P. Dale, Jul 24 2017 *)
PROG
(Python)
def a(n): s=str(n); return sum(int(s[:i]+s[i+1:]) for i in range(len(s))) if n > 9 else 0
print([a(n) for n in range(88)]) # Michael S. Branicky, Oct 27 2023
CROSSREFS
Cf. A007953.
Sequence in context: A297236 A103693 A117230 * A138953 A307629 A053392
KEYWORD
base,nonn,look
AUTHOR
Amarnath Murthy, Apr 22 2004
EXTENSIONS
Corrected and extended by Franklin T. Adams-Watters, Jul 27 2006
Offset corrected by Alois P. Heinz, May 06 2019
STATUS
approved