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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064834 If n (in base 10) is d_1 d_2 ... d_k then a(n) = Sum_{i = 1..[k/2] } |d_i - d_{k-i+1}|. 4
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2, 1, 0, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 0, 1, 2, 3 (list; graph; refs; listen; history; internal format)
OFFSET

0,14

LINKS

Matthew M. Conroy, Home page (listed instead of email address)

EXAMPLE

a(456) = | 4 - 6 | = 2, a(4567) = | 4 - 7 | + | 5 - 6 | = 4.

MATHEMATICA

f[n_] := (k = IntegerDigits[n]; l = Length[k]; Sum[ Abs[ k[[i]] - k[[l - i + 1]]], {i, 1, Floor[l/2] } ] ); Table[ f[n], {n, 0, 100} ]

CROSSREFS

Cf. A037904, A040163, A064844.

Sequence in context: A037904 A070615 A040114 * A040163 A113608 A040115

Adjacent sequences:  A064831 A064832 A064833 * A064835 A064836 A064837

KEYWORD

nonn,base,easy

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Oct 25 2001

EXTENSIONS

More terms from Vladeta Jovovic (vladeta(AT)eunet.rs), Matthew M. Conroy and Robert G. Wilson v (rgwv(AT)rgwv.com), Oct 26 2001

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 19:13 EST 2012. Contains 206085 sequences.