login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A037897
(Greatest base 3 digit of n)-(least base 3 digit of n).
4
0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 2, 1, 0, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
OFFSET
1,6
LINKS
FORMULA
a(n) = A190592(n) - A290825(n). - Antti Karttunen, Aug 12 2017
MAPLE
A037897 := proc(n)
local dgs ;
dgs := convert(n, base, 3);
max(op(dgs))-min(op(dgs)) ;
end proc: # R. J. Mathar, Oct 19 2015
PROG
(PARI) A037897(n) = (vecmax(digits(n, 3)) - vecmin(digits(n, 3))); \\ Antti Karttunen, Aug 11 2017
CROSSREFS
KEYWORD
nonn,base
EXTENSIONS
Offset corrected by R. J. Mathar, Oct 19 2015
More terms from Antti Karttunen, Aug 11 2017
STATUS
approved