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.

A011533 Numbers that contain a 3.

Original entry on oeis.org

3, 13, 23, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 43, 53, 63, 73, 83, 93, 103, 113, 123, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 143, 153, 163, 173, 183, 193, 203, 213, 223, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 243, 253
Offset: 1

Views

Author

Keywords

Crossrefs

Complement: A052405.
Cf. A016189.
Numbers that contain a digit k: A011531 (k=1), A011532 (k=2), A011534 (k=4), A011535 (k=5), A011536 (k=6), A011537 (k=7), A011538 (k=8), A011539 (k=9), A011540 (k=0).

Programs

  • GAP
    Filtered([1..260],n->3 in ListOfDigits(n)); # Muniru A Asiru, Feb 23 2019
  • Haskell
    a011533 n = a011533_list !! (n-1)
    a011533_list = filter ((elem '3') . show) [0..]
    -- Reinhard Zumkeller, Apr 10 2015
    
  • Magma
    [n: n in [0..500] | 3 in Intseq(n)]; // Vincenzo Librandi, Jan 11 2016
    
  • Maple
    M:= 3: # to get all terms of up to M digits
    B:= {3}: A:= {3}:
    for i from 2 to M do
       B:= map(t -> seq(10*t+j,j=0..9),B) union
          {seq(10*x+3,x=10^(i-2)..10^(i-1)-1)}:
       A:= A union B;
    od:
    sort(convert(A,list));# Robert Israel, Jan 11 2016
  • Mathematica
    Select[Range[600] - 1, DigitCount[#, 10, 3]>0 &] (* Vincenzo Librandi, Jan 11 2016 *)
  • PARI
    isok(n)=my(d=digits(n)); for (k=1, #d, if (d[k] == 3, return (1))); \\ Michel Marcus, Jan 11 2016
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Aug 28 2012
For m >= 1, a(10^m - 9^m) = 10^m-7, a(10^m - 9^m + 1) = 10^m + 3. - Robert Israel, Jan 11 2016