The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338828 For any number with ternary representation (t(1), t(2), ..., t(k)), the ternary representation of a(n) is (abs(t(1)-t(k)), abs(t(2)-t(k-1)), ..., abs(t(k)-t(1))). 2
0, 0, 0, 4, 0, 4, 8, 4, 0, 10, 0, 10, 10, 0, 10, 10, 0, 10, 20, 10, 0, 20, 10, 0, 20, 10, 0, 28, 0, 28, 40, 12, 40, 52, 24, 52, 40, 12, 40, 28, 0, 28, 40, 12, 40, 52, 24, 52, 40, 12, 40, 28, 0, 28, 56, 28, 0, 68, 40, 12, 80, 52, 24, 68, 40, 12, 56, 28, 0, 68 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Leading zeros are ignored.
LINKS
FORMULA
a(n) = 0 iff n is a palindrome in base 3 (A014190).
MAPLE
a:= n-> (l-> (h-> add(h[j]*3^(j-1), j=1..nops(h)))([seq(
abs(l[i]-l[-i]), i=1..nops(l))]))(convert(n, base, 3)):
seq(a(n), n=0..70); # Alois P. Heinz, Nov 12 2020
PROG
(PARI) a(n, base=3) = my (d=digits(n, base)); fromdigits(abs(d-Vecrev(d)), base)
CROSSREFS
Cf. A014190, A175919 (binary analog), A338827 (decimal analog).
Sequence in context: A028602 A111767 A111511 * A298518 A021251 A160207
KEYWORD
nonn,base,look
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 2 00:37 EDT 2024. Contains 373032 sequences. (Running on oeis4.)