cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A052419 Numbers without 7 as a digit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 80, 81, 82, 83, 84, 85, 86, 88, 89
Offset: 1

Views

Author

Henry Bottomley, Mar 13 2000

Keywords

Crossrefs

Cf. A004182, A004726, A038615 (subset of primes), A082836 (Kempner series).
Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052421 (without 8), A007095 (without 9).

Programs

  • Haskell
    a052419 = f . subtract 1 where
    f 0 = 0
    f v = 10 * f w + if r > 6 then r + 1 else r where (w, r) = divMod v 9
    -- Reinhard Zumkeller, Oct 07 2014
    
  • Magma
    [ n: n in [0..89] | not 7 in Intseq(n) ]; // Bruno Berselli, May 28 2011
    
  • Maple
    a:= proc(n) local l, m; l, m:= 0, n-1;
          while m>0 do l:= (d->
            `if`(d<7, 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],DigitCount[#,10,7]==0&] (* Harvey P. Dale, Aug 23 2011 *)
  • PARI
    lista(nn)=for (n=0, nn, if (!vecsearch(vecsort(digits(n),,8), 7), print1(n, ", "));); \\ Michel Marcus, Feb 22 2015
    
  • PARI
    /* See OEIS wiki page for more programs. */
    apply( {A052419(n)=fromdigits(apply(d->d+(d>6),digits(n-1,9)))}, [1..99]) \\ a(n)
    select( {is_A052419(n)=!setsearch(Set(digits(n)),7)}, [0..99]) \\ used in A038615
    next_A052419(n, d=digits(n+=1))={for(i=1,#d, d[i]==7&&return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n. Used in A038615. - M. F. Hasler, Jan 11 2020
    
  • Python
    from gmpy2 import digits
    def A052419(n): return int(digits(n-1,9).replace('8','9').replace('7','8')) # Chai Wah Wu, Jun 28 2025
  • sh
    seq 0 1000 | grep -v 7; # Joerg Arndt, May 29 2011
    

Formula

a(n) = replace digits d > 6 by d + 1 in base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014
Sum_{n>1} 1/a(n) = A082836 = 22.493475... (Kempner series). - Bernard Schott, Jan 12 2020, edited by M. F. Hasler, Jan 13 2020

Extensions

Offset changed by Reinhard Zumkeller, Oct 07 2014