login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052414 Numbers without 6 as a digit. 16

%I #39 Sep 08 2022 08:44:59

%S 0,1,2,3,4,5,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,27,28,

%T 29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,

%U 54,55,57,58,59,70,71,72,73,74,75,77,78,79,80,81,82,83,84,85,87,88,89

%N Numbers without 6 as a digit.

%H Reinhard Zumkeller, <a href="/A052414/b052414.txt">Table of n, a(n) for n = 1..10000</a>

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

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

%F a(n) = replace digits d > 5 by d + 1 in base-9 representation of n - 1. - _Reinhard Zumkeller_, Oct 07 2014

%F Sum_{k>1} 1/a(k) = A082835 = 22.205598... (Kempner series). - _Bernard Schott_, Jan 12 2020, edited by _M. F. Hasler_, Jan 13 2020

%p a:= proc(n) local l, m; l, m:= 0, n-1;

%p while m>0 do l:= (d->

%p `if`(d<6, d, d+1))(irem(m, 9, 'm')), l

%p od; parse(cat(l))/10

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 01 2016

%t Select[Range[0,100],DigitCount[#,10,6]==0&] (* _Harvey P. Dale_, Jun 20 2013 *)

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

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

%o (Haskell)

%o a052414 = f . subtract 1 where

%o f 0 = 0

%o f v = 10 * f w + if r > 5 then r + 1 else r where (w, r) = divMod v 9

%o -- _Reinhard Zumkeller_, Oct 07 2014

%o (PARI) lista(nn)=for (n=0, nn, if (!vecsearch(vecsort(digits(n),,8), 6), print1(n, ", "));); \\ _Michel Marcus_, Feb 22 2015

%o (PARI) /* See OEIS wiki page (cf. LINKS) for more programs */

%o apply( {A052414(n)=fromdigits(apply(d->d+(d>5),digits(n-1,9)))}, [1..99]) \\ a(n)

%o select( {is_A052414(n)=!setsearch(Set(digits(n)),6)}, [0..99]) \\ used in A038614

%o next_A052414(n, d=digits(n+=1))={for(i=1,#d, d[i]==6&&return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n, used in A038614. - _M. F. Hasler_, Jan 11 2020

%Y Cf. A004181, A004725, A038614 (subset of primes), A082835 (Kempner series).

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

%K base,easy,nonn

%O 1,3

%A _Henry Bottomley_, Mar 13 2000

%E Offset changed by _Reinhard Zumkeller_, Oct 07 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)