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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338827 For any number with decimal representation (d(1), d(2), ..., d(k)), the decimal representation of a(n) is (abs(d(1)-d(k)), abs(d(2)-d(k-1)), ..., abs(d(k)-d(1))). 2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 11, 22, 33, 44, 55, 66, 77, 88, 22, 11, 0, 11, 22, 33, 44, 55, 66, 77, 33, 22, 11, 0, 11, 22, 33, 44, 55, 66, 44, 33, 22, 11, 0, 11, 22, 33, 44, 55, 55, 44, 33, 22, 11, 0, 11, 22, 33, 44, 66, 55, 44, 33, 22, 11, 0, 11, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,11

COMMENTS

Leading zeros are ignored.

All terms belong to A061917.

LINKS

Rémy Sigrist, Table of n, a(n) for n = 0..10000

FORMULA

a(n) = 0 iff n is a palindrome (A002113).

a(n) = A330240(n, A004086(n)).

EXAMPLE

For n = 1021:

- abs(1-1) = 0,

- abs(0-2) = 2,

- abs(2-0) = 2,

- abs(1-1) = 0,

- so a(1021) = 220.

MAPLE

a:= n-> (l-> (h-> add(h[j]*10^(j-1), j=1..nops(h)))([seq(

    abs(l[i]-l[-i]), i=1..nops(l))]))(convert(n, base, 10)):

seq(a(n), n=0..70);  # Alois P. Heinz, Nov 12 2020

PROG

(PARI) a(n, base=10) = my (d=digits(n, base)); fromdigits(abs(d-Vecrev(d)), base)

CROSSREFS

Cf. A002113, A004086, A056965, A061917, A175919 (binary analog), A330240, A338828 (ternary analog).

Sequence in context: A342123 A187553 A003621 * A055963 A127805 A256480

Adjacent sequences:  A338824 A338825 A338826 * A338828 A338829 A338830

KEYWORD

nonn,base,look,easy

AUTHOR

Rémy Sigrist, Nov 11 2020

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 April 13 02:47 EDT 2021. Contains 342934 sequences. (Running on oeis4.)