|
Search: id:A064834
|
|
|
| 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}|. |
|
+0 5
|
|
| 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; listen)
|
|
|
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 this_sequence A040163 A113608 A040115
Adjacent sequences: A064831 A064832 A064833 this_sequence 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
|
|
|
Search completed in 0.002 seconds
|