OFFSET
0,3
REFERENCES
Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 67.
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
R. G. Wilson, V, Letter to N. J. A. Sloane, Sep. 1992
FORMULA
a(0) = 0, a(n) = 10*a(n/7) if n==0 (mod 7), a(n) = a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
MAPLE
A007093 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 7): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007093(n), n=0..63); # Nathaniel Johnston, May 06 2011
MATHEMATICA
Table[ FromDigits[ IntegerDigits[n, 7]], {n, 0, 66}]
PROG
(PARI) a(n)=if(n<1, 0, if(n%7, a(n-1)+1, 10*a(n/7)))
(PARI) a(n) = fromdigits(digits(n, 7)); \\ Michel Marcus, Aug 12 2018
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
STATUS
approved