OFFSET
0,3
COMMENTS
Nonnegative integers with no decimal digits > 5. - Karol Bacik, Sep 25 2012
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 0..10000
Wikipedia, Senary
R. G. Wilson, V, Letter to N. J. A. Sloane, Sep. 1992
FORMULA
a(0)=0, a(n) = 10*a(n/6) if n==0 (mod 6), and a(n) = a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
a(n) = Sum{d(i)*10^i: i=0,1,...,m}, where Sum{d(i)*6^i: i=1,2,...,m} = n, and d(i) in {0,1,...,5}. - Karol Bacik, Sep 25 2012
MAPLE
A007092 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 6): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007092(n), n=0..59); # Nathaniel Johnston, May 06 2011
MATHEMATICA
Table[ FromDigits[ IntegerDigits[n, 6]], {n, 0, 65}]
PROG
(PARI) a(n)=if(n%6, a(n-1)+1, if(n, 10*a(n/6), 0)) \\ corrected by Charles R Greathouse IV, Sep 25 2012
(PARI) a(n)=n=digits(n, 6); n[1]=Str(n[1]); eval(concat(n)) \\ Charles R Greathouse IV, Sep 25 2012
(PARI) apply( A007092(n)=fromdigits(digits(n, 6)), [0..66]) \\ M. F. Hasler, Nov 18 2019
(Haskell)
a007092 0 = 0
a007092 n = 10 * a007092 n' + m where (n', m) = divMod n 6
-- Reinhard Zumkeller, Mar 06 2015
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
STATUS
approved