login
Numbers in base 9.
(Formerly M0490)
308

%I M0490 #70 Sep 08 2022 08:44:35

%S 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,

%T 28,30,31,32,33,34,35,36,37,38,40,41,42,43,44,45,46,47,48,50,51,52,53,

%U 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

%N Numbers in base 9.

%C Also numbers without 9 as a digit.

%C Complement of A011539: A102683(a(n)) = 0; A068505(a(n)) != a(n)). - _Reinhard Zumkeller_, Dec 29 2011

%D Julian Havil, Gamma, Exploring Euler's Constant, Princeton University Press, Princeton and Oxford, 2003, page 34.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Nathaniel Johnston, <a href="/A007095/b007095.txt">Table of n, a(n) for n = 0..10000</a>

%H M. F. Hasler, <a href="/wiki/Numbers_avoiding_certain_digits">Numbers avoiding certain digits</a>, OEIS wiki, Jan 12 2020

%H R. G. Wilson, V, <a href="/A007088/a007088.pdf">Letter to N. J. A. Sloane, Sep. 1992</a>

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.

%F 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

%F Sum_{n>1} 1/a(n) = A082838 = 22.92067... (Kempner series). - _Bernard Schott_, Dec 29 2018; edited by _M. F. Hasler_, Jan 13 2020

%p 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

%t Table[ FromDigits[ IntegerDigits[n, 9]], {n, 0, 75}]

%o (PARI) a(n)=if(n<1,0,if(n%9,a(n-1)+1,10*a(n/9)))

%o (PARI) A007095(n)=fromdigits(digits(n, 9)) \\ _Michel Marcus_, Dec 29 2018

%o (Magma) [ n: n in [0..74] | not 9 in Intseq(n) ]; // _Bruno Berselli_, May 28 2011

%o (sh) seq 0 1000 | grep -v 9; # _Joerg Arndt_, May 29 2011

%o (Haskell)

%o a007095 = f . subtract 1 where

%o f 0 = 0

%o f v = 10 * f w + r where (w, r) = divMod v 9

%o -- _Reinhard Zumkeller_, Oct 07 2014, Dec 29 2011

%o (Python) # and others: see OEIS Wiki page (cf. LINKS).

%Y Cf. A000042 (base 1), A007088 (base 2), A007089 (base 3), A007090 (base 4), A007091 (base 5), A007092 (base 6), A007093 (base 7), A007094 (base 8); A057104, A037479.

%Y Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8).

%Y Cf. A031076, A031087.

%Y Cf. A082838.

%K nonn,easy,base

%O 0,3

%A _N. J. A. Sloane_, _Robert G. Wilson v_