OFFSET
1,6
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..19683
FORMULA
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
AUTHOR
EXTENSIONS
Offset corrected by R. J. Mathar, Oct 19 2015
More terms from Antti Karttunen, Aug 11 2017
STATUS
approved