|
|
A007095
|
|
Numbers in base 9.
(Formerly M0490)
|
|
307
|
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Also numbers without 9 as a digit.
|
|
REFERENCES
|
Julian Havil, Gamma, Exploring Euler's Constant, Princeton University Press, Princeton and Oxford, 2003, page 34.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
a(0) = 0, a(n) = 10*a(n/9) if n==0 (mod 9), a(n) = a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
|
|
MAPLE
|
A007095 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 9): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007095(n), n=0..67); # Nathaniel Johnston, May 06 2011
|
|
MATHEMATICA
|
Table[ FromDigits[ IntegerDigits[n, 9]], {n, 0, 75}]
|
|
PROG
|
(PARI) a(n)=if(n<1, 0, if(n%9, a(n-1)+1, 10*a(n/9)))
(Magma) [ n: n in [0..74] | not 9 in Intseq(n) ]; // Bruno Berselli, May 28 2011
(sh) seq 0 1000 | grep -v 9; # Joerg Arndt, May 29 2011
(Haskell)
a007095 = f . subtract 1 where
f 0 = 0
f v = 10 * f w + r where (w, r) = divMod v 9
(Python) # and others: see OEIS Wiki page (cf. LINKS).
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|