login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055017 Difference between sums of alternate digits of n starting with the last, i.e. (Sum of ultimate digit of n, antepenultimate digit of n,...)-(sum of penultimate digit of n, preantepenultimate digit of n,...). 11
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, -8, -7, -6, -5, -4, -3 (list; graph; refs; listen; history; internal format)
OFFSET

0,3

COMMENTS

n is divisible by 11 iff a(n) is a multiple of 11

Digital sum with alternating signs starting with a positive sign for the rightmost digit. - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 18 2007

For n<100 equal to (n mod 10 - floor(n/10)) = -A076313(n). - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 18 2007

FORMULA

a(n)=n+11*sum{k>0,(-1)^k*floor(n/10^k)}. - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 18 2007

a(10n+k)=k-a(n), 0<=k<10. - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 18 2007

G.f. g(x)=sum{k>0, (x^k-x^(k+10^k)+(-1)^k*11*x^(10^k))/(1-x^(10^k))}/(1-x). - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 18 2007

a(n)=n+11*sum{10<=k<=n, sum{j|k,j>=10, (-1)^floor(log_10(j))*(floor(log_10(j))-floor(log_10(j-1)))}}. - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 18 2007

G.f. expressed in terms of Lambert series: g(x)=(x/(1-x)+11*L[b(k)](x))/(1-x) where L[b(k)](x)=sum{k>=0, b(k)*x^k/(1-x^k)} is a Lambert series with b(k)=(-1)^floor(log_10(k)), if k>1 is a power of 10, else b(k)=0. - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 25, 2007

G.f.: g(x)=sum{k>0, (1+11*c(k))*x^k}/(1-x), where c(k)=sum{j>1,j|k, (-1)^floor(log_10(j))*(floor(log_10(j))-floor(log_10(j-1)))}. - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 25, 2007

EXAMPLE

a(123)=3-2+1=2, a(9875)=5-7+8-9=-3.

MAPLE

sumodigs := proc(n) local dg; dg := convert(n, base, 10) ; add(op(1+2*i, dg), i=0..floor(nops(dg)-1)/2) ; end proc:

sumedigs := proc(n) local dg; dg := convert(n, base, 10) ; add(op(2+2*i, dg), i=0..floor(nops(dg)-2)/2) ; end proc:

A055017 := proc(n) sumodigs(n)-sumedigs(n) ; end proc: # R. J. Mathar, Aug 26 2011

CROSSREFS

Unsigned version differs from A040114 and A040115 when n=100 and from A040997 when n=101.

Cf. A076313, A076314, A007953, A003132.

Sequence in context: A189823 A001073 A076313 * A040997 A177894 A175398

Adjacent sequences:  A055014 A055015 A055016 * A055018 A055019 A055020

KEYWORD

base,easy,sign

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), May 31 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 23:08 EST 2012. Contains 206085 sequences.