login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037885 a(n)=(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*8^i) is the base 8 representation of n and e(i) are the digits d(i) in nondecreasing order. 2
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 1, 2, 3, 4, 5, 6, 1, 1, 1, 2, 3, 4, 5, 6, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,11

LINKS

Table of n, a(n) for n=1..90.

MAPLE

A037885 := proc(n)

    local a, dgs, dgsE ;

    a := 0 ;

    dgs := convert(n, base, 8);

    dgsE := sort(dgs) ;

    for i from 1 to nops(dgs) do

        a := a+ abs(op(i, dgs)-op(i, dgsE)) ;

    end do:

    a/2 ;

end proc: # R. J. Mathar, Oct 19 2015

CROSSREFS

Sequence in context: A266449 A265536 A037849 * A031007 A010876 A309958

Adjacent sequences:  A037882 A037883 A037884 * A037886 A037887 A037888

KEYWORD

nonn,base

AUTHOR

Clark Kimberling

EXTENSIONS

Definition swapped with A037876. - R. J. Mathar, Oct 19 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 19 15:37 EST 2020. Contains 331049 sequences. (Running on oeis4.)