login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052413 Numbers without 5 as a digit. 17
0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

M. F. Hasler, Numbers avoiding certain digits, OEIS wiki, Jan 12 2020

Index entries for 10-automatic sequences.

FORMULA

a(n) = replace digits d > 4 by d + 1 in base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014

Sum_{k>1} 1/a(n) = A082834 = 21.8346008... (Kempner series). - Bernard Schott, Jan 12 2020, edited by M. F. Hasler, Jan 13 2020

MAPLE

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

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

        `if`(d<5, d, d+1))(irem(m, 9, 'm')), l

      od; parse(cat(l))/10

    end:

seq(a(n), n=1..100);  # Alois P. Heinz, Aug 01 2016

MATHEMATICA

Select[Range[100], !MemberQ[IntegerDigits[#], 5]&] (* Harvey P. Dale, Feb 20 2013 *)

PROG

(MAGMA) [ n: n in [0..89] | not 5 in Intseq(n) ]; // Bruno Berselli, May 28 2011

(sh) seq 0 1000 | grep -v 5; # Joerg Arndt, May 29 2011

(Haskell)

a052413 = f . subtract 1 where

f 0 = 0

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

-- Reinhard Zumkeller, Oct 07 2014

(PARI)

apply( {A052413(n)=fromdigits(apply(d->d+(d>4), digits(n-1, 9)))}, [1..99]) \\ a(n)

select( {is_A052413(n)=!setsearch(Set(digits(n)), 5)}, [0..99]) \\ used in A038613

next_A052413(n, d=digits(n+=1))={for(i=1, #d, d[i]==5&&return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n; used in A038613. - M. F. Hasler, Jan 11 2020

(Python) # see the OEIS wiki page (cf. LINKS) for more programs

def A052413(n): n-=1; return sum(n//9**e%9*6//5*10**e for e in range(math.ceil(math.log(n+1, 9)))) # M. F. Hasler, Jan 13 2020

CROSSREFS

Cf. A004180, A004724, A038613 (subset of primes), A082834 (Kempner series).

Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052406 (without 4), A052414 (without 6), A052419 (without 7), A052421 (without 8), A007095 (without 9).

Sequence in context: A340288 A132329 A230313 * A276389 A302058 A183302

Adjacent sequences:  A052410 A052411 A052412 * A052414 A052415 A052416

KEYWORD

base,easy,nonn

AUTHOR

Henry Bottomley, Mar 13 2000

EXTENSIONS

Offset changed by Reinhard Zumkeller, Oct 07 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 01:47 EDT 2021. Contains 343051 sequences. (Running on oeis4.)