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.

Showing 1-10 of 33 results. Next

A011531 Numbers that contain a digit 1 in their decimal representation.

Original entry on oeis.org

1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 41, 51, 61, 71, 81, 91, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133
Offset: 1

Views

Author

Keywords

Comments

A121042(a(n)) = 1. - Reinhard Zumkeller, Jul 21 2006
See A043493 for numbers that contain a single digit '1'. A subsequence of numbers having a digit that divides all other digits, A263314. - M. F. Hasler, Jan 11 2016

Crossrefs

Programs

  • GAP
    Filtered([1..140],n->1 in ListOfDigits(n)); # Muniru A Asiru, Feb 23 2019
    
  • Haskell
    a011531 n = a011531_list !! (n-1)
    a011531_list = filter ((elem '1') . show) [0..]
    -- Reinhard Zumkeller, Feb 05 2012
    
  • Magma
    [n: n in [0..500] | 1 in Intseq(n) ]; // Vincenzo Librandi, Jan 11 2016
    
  • Maple
    M:= 3: # to get all terms of up to M digits
    B:= {1}: A:= {1}:
    for i from 2 to M do
       B:= map(t -> seq(10*t+j,j=0..9),B) union
          {seq(10*x+1,x=2*10^(i-2)..10^(i-1)-1)}:
       A:= A union B;
    od:
    sort(convert(A,list)); # Robert Israel, Jan 10 2016
    # second program:
    A011531 := proc(n)
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if nops(convert(convert(a,base,10),set) intersect {1}) > 0 then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 31 2016
  • Mathematica
    Select[Range[600] - 1, DigitCount[#, 10, 1] > 0 &] (* Vincenzo Librandi, Jan 11 2016 *)
  • PARI
    is_A011531(n)=setsearch(Set(digits(n)),1) \\ M. F. Hasler, Jan 10 2016
    
  • Python
    def aupto(nn): return [m for m in range(1, nn+1) if '1' in str(m)]
    print(aupto(133)) # Michael S. Branicky, Jan 10 2021
  • Scala
    (0 to 119).filter(.toString.indexOf('1') > -1) // _Alonso del Arte, Jan 12 2020
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Nov 02 2022

A121041 Number of divisors of n that are also contained in the decimal representation of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 3, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 2, 3, 2, 3, 2, 3, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Examples

			a(22) = #{2, 22} = 2;
a(23) = #{23} = 1;
a(24) = #{2, 4, 24} = 3.
		

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a121041 n = length $ filter (\d -> n `mod` d == 0
                                       && show d `isInfixOf` show n) [1..n]
    -- Reinhard Zumkeller, Feb 11 2011
    
  • Mathematica
    A121041[n_] := DivisorSum[n, 1 &, StringContainsQ[IntegerString[n], IntegerString[#]] &]; Array[A121041, 150] (* Paolo Xausa, Feb 25 2024 *)
  • PARI
    substr(a,b)=a=digits(a); b=digits(b); for(i=0,#a-#b, for(j=1,#b, if(a[i+j]!=b[j], next(2))); return(1)); 0
    a(n)=sumdiv(n,d, substr(n,d)) \\ Charles R Greathouse IV, Mar 31 2016
    
  • Python
    from sympy import divisors
    def a(n):
        s = str(n)
        return sum(1 for d in divisors(n, generator=True) if str(d) in s)
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Jul 11 2022

Formula

a(n) = 1 iff A121042(n) = n.
a(A155005(n)) = n and a(m) < n for m < A155005(n). - Reinhard Zumkeller, Jan 18 2009

A121022 Even numbers containing a 2 in their decimal representation.

Original entry on oeis.org

2, 12, 20, 22, 24, 26, 28, 32, 42, 52, 62, 72, 82, 92, 102, 112, 120, 122, 124, 126, 128, 132, 142, 152, 162, 172, 182, 192, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Crossrefs

Programs

  • Haskell
    a121022 n = a121022_list !! (n-1)
    a121022_list = filter (('2' `elem`) . show) [0, 2 ..]
    -- Reinhard Zumkeller, Nov 08 2013
    
  • Mathematica
    Select[2*Range[200],DigitCount[#,10,2]>0&] (* Harvey P. Dale, Nov 04 2013 *)
  • PARI
    is(n) = n%2==0 && setsearch(vecsort(digits(n)), 2) \\ Felix Fröhlich, Nov 22 2020

Formula

a(n) ~ 2n. - Charles R Greathouse IV, Mar 30 2022

A121040 Multiples of 20 containing a 20 in their decimal representation.

Original entry on oeis.org

20, 120, 200, 220, 320, 420, 520, 620, 720, 820, 920, 1020, 1120, 1200, 1220, 1320, 1420, 1520, 1620, 1720, 1820, 1920, 2000, 2020, 2040, 2060, 2080, 2120, 2200, 2220, 2320, 2420, 2520, 2620, 2720, 2820, 2920, 3020, 3120, 3200, 3220, 3320, 3420, 3520
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Comments

Not the same as A044352.

Crossrefs

Programs

  • Mathematica
    Select[20*Range[200],SequenceCount[IntegerDigits[#],{2,0}]>0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Nov 27 2015 *)
  • PARI
    is(n)=if(n%20, return(0)); while(n>19, if(n%100==20, return(1)); n\=10); 0 \\ Charles R Greathouse IV, Feb 12 2017

Formula

a(n) ~ 20n. - Charles R Greathouse IV, Feb 12 2017

Extensions

Corrected by T. D. Noe, Oct 25 2006

A121025 Multiples of 5 containing a 5 in their decimal representation.

Original entry on oeis.org

5, 15, 25, 35, 45, 50, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 150, 155, 165, 175, 185, 195, 205, 215, 225, 235, 245, 250, 255, 265, 275, 285, 295, 305, 315, 325, 335, 345, 350, 355, 365, 375, 385, 395, 405, 415, 425, 435, 445, 450, 455, 465, 475, 485
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Crossrefs

Programs

  • GAP
    Filtered([1..500],n-> n mod 5 = 0 and 5 in ListOfDigits(n)); # Muniru A Asiru, Feb 23 2019
  • Mathematica
    Select[5*Range[200], MemberQ[IntegerDigits[#], 5] &] (* Paolo Xausa, Feb 25 2024 *)
  • PARI
    is(n)=n%5==0 && setsearch(Set(digits(n)), 5) \\ Charles R Greathouse IV, Feb 12 2017
    

Formula

a(n) ~ 5n. - Charles R Greathouse IV, Feb 12 2017

Extensions

Typo in comment fixed by Reinhard Zumkeller, May 01 2011

A121030 Multiples of 10 containing a 10 in their decimal representation.

Original entry on oeis.org

10, 100, 110, 210, 310, 410, 510, 610, 710, 810, 910, 1000, 1010, 1020, 1030, 1040, 1050, 1060, 1070, 1080, 1090, 1100, 1110, 1210, 1310, 1410, 1510, 1610, 1710, 1810, 1910, 2010, 2100, 2110, 2210, 2310, 2410, 2510, 2610, 2710, 2810, 2910, 3010, 3100
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[10*Range[1000], StringContainsQ[IntegerString[#], "10"] &] (* Paolo Xausa, Feb 25 2024 *)

Formula

a(n) ~ 10n. - Charles R Greathouse IV, Feb 12 2017

A121032 Multiples of 12 containing a 12 in their decimal representation.

Original entry on oeis.org

12, 120, 312, 612, 912, 1128, 1200, 1212, 1224, 1236, 1248, 1260, 1272, 1284, 1296, 1512, 1812, 2112, 2124, 2412, 2712, 3012, 3120, 3312, 3612, 3912, 4128, 4212, 4512, 4812, 5112, 5124, 5412, 5712, 6012, 6120, 6312, 6612, 6912, 7128, 7212, 7512, 7812
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a121032 n = a121032_list !! (n-1)
    a121032_list = filter ((isInfixOf "12") . show) a008594_list
    -- Reinhard Zumkeller, Dec 12 2012
    
  • Mathematica
    Select[12*Range[700],SequenceCount[IntegerDigits[#],{1,2}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 25 2017 *)
  • PARI
    is(n)=if(n%12, return(0)); while(n>11, if(n%100==12, return(1)); n\=10); 0 \\ Charles R Greathouse IV, Feb 12 2017

Formula

a(n) ~ 12n. - Charles R Greathouse IV, Nov 02 2022

Extensions

Data fixed by Reinhard Zumkeller, Dec 12 2012

A121023 Multiples of 3 containing a 3 in their decimal representation.

Original entry on oeis.org

3, 30, 33, 36, 39, 63, 93, 123, 132, 135, 138, 153, 183, 213, 231, 234, 237, 243, 273, 300, 303, 306, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 354, 357, 360, 363, 366, 369, 372, 375, 378, 381, 384, 387, 390, 393, 396, 399
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Comments

Intersection of A008585 and A011533.
The graph of this sequence is (roughly) self-similar: it has the same appearance when the scale is multiplied by 10. - M. F. Hasler, Mar 09 2014

Crossrefs

Programs

  • Mathematica
    Select[3*Range[500], MemberQ[IntegerDigits[#],3] &] (* Paolo Xausa, Feb 25 2024 *)
  • PARI
    is(n)=!(n%3)&&setsearch(Set(digits(n)),3) \\ M. F. Hasler, Mar 09 2014
    
  • PARI
    c=0;forstep(n=3,3e4,3,is(n)&write("/tmp/b121023.txt",c++" "n))

Formula

a(n) ~ 3n. - Charles R Greathouse IV, Mar 31 2016

Extensions

Typo in comment fixed by Reinhard Zumkeller, May 01 2011

A121024 Multiples of 4 containing a 4 in their decimal representation.

Original entry on oeis.org

4, 24, 40, 44, 48, 64, 84, 104, 124, 140, 144, 148, 164, 184, 204, 224, 240, 244, 248, 264, 284, 304, 324, 340, 344, 348, 364, 384, 400, 404, 408, 412, 416, 420, 424, 428, 432, 436, 440, 444, 448, 452, 456, 460, 464, 468, 472, 476, 480, 484, 488, 492, 496
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Comments

Intersection of A008586 and A011534.

Crossrefs

Programs

  • Mathematica
    Select[4Range[150],DigitCount[#,10,4]>0&] (* Harvey P. Dale, Jun 11 2011 *)
  • PARI
    is(n)=if(n%4,return(0));n=eval(Vec(Str(n)));for(i=1,#n,if(n[i]==4,return(1)));0 \\ Charles R Greathouse IV, Jul 16 2011

Formula

a(n) ~ 4n. - Charles R Greathouse IV, Jul 16 2011

Extensions

Typo in comment fixed by Reinhard Zumkeller, May 01 2011

A121027 Multiples of 7 containing a 7 in their decimal representation.

Original entry on oeis.org

7, 70, 77, 147, 175, 217, 273, 287, 357, 371, 378, 427, 476, 497, 567, 574, 637, 672, 679, 700, 707, 714, 721, 728, 735, 742, 749, 756, 763, 770, 777, 784, 791, 798, 847, 875, 917, 973, 987, 1057, 1071, 1078, 1127, 1176, 1197, 1267, 1274, 1337, 1372, 1379
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[7*Range[500], MemberQ[IntegerDigits[#], 7] &] (* Paolo Xausa, Feb 25 2024 *)
  • PARI
    is(n)=n%7==0 && setsearch(Set(digits(n)), 7) \\ Charles R Greathouse IV, Feb 12 2017

Formula

a(n) ~ 7n. - Charles R Greathouse IV, Feb 12 2017

Extensions

Typo in comment fixed by Reinhard Zumkeller, May 01 2011
Showing 1-10 of 33 results. Next