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 31 results. Next

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

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

A011534 Numbers that contain a 4.

Original entry on oeis.org

4, 14, 24, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 54, 64, 74, 84, 94, 104, 114, 124, 134, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 154, 164, 174, 184, 194, 204, 214, 224, 234, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 254
Offset: 1

Views

Author

Keywords

Crossrefs

Numbers that contain a digit k: A011531 (k=1), A011532 (k=2), A011533 (k=3), A011535 (k=5), A011536 (k=6), A011537 (k=7), A011538 (k=8), A011539 (k=9), A011540 (k=0).

Programs

Formula

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

A256786 Numbers which are divisible by prime(d) for all digits d in their decimal representation.

Original entry on oeis.org

12, 14, 42, 55, 154, 222, 228, 714, 1122, 1196, 1212, 1414, 2112, 2142, 2262, 3355, 4144, 4242, 5335, 5544, 5555, 6162, 9499, 11112, 11144, 11214, 11424, 11466, 11622, 11818, 11914, 12222, 12882, 14112, 15554, 16666, 21216, 21222, 21252, 21888, 22122, 22212
Offset: 1

Views

Author

Keywords

Comments

All terms are zerofree, cf. A052382;
there is no term containing digits 1 and 3 simultaneously;
a(n) contains at least one digit 1 iff a(n) is even, cf. A011531, A005843;
a(n) contains at least one digit 2 iff a(n) mod 3 = 0, cf. A011532, A008585;
a(n) contains at least one digit 3 iff a(n) mod 10 = 5, cf. A011533, A017329;
A020639(a(n)) <= 23.
The equivalent in base 2 is the empty sequence, in base 3 it is A191681\{0}; see A256874-A256879 for the base 4 - base 9 variant, and A256870 for a variant where digits 0 are allowed but divisibility by prime(d+1) is required instead. - M. F. Hasler, Apr 11 2015

Examples

			Smallest terms containing the nonzero decimal digits:
.  d | prime(d) |  n | a(n)
. ---+----------+--------------------------
.  1 |       2  |  1 |   12 = 2^2 * 3
.  2 |       3  |  1 |   12 = 2^2 * 3
.  3 |       5  | 16 | 3355 = 5 * 11 * 61
.  4 |       7  |  2 |   14 = 2 * 7
.  5 |      11  |  4 |   55 = 5 * 11
.  6 |      13  | 10 | 1196 = 2^2 * 13 * 23
.  7 |      17  |  8 |  714 = 2 * 3 * 7 * 17
.  8 |      19  |  7 |  228 = 2^2 * 3 * 19
.  9 |      23  | 10 | 1196 = 2^2 * 13 * 23 .
		

Crossrefs

Programs

  • Haskell
    a256786 n = a256786_list !! (n-1)
    a256786_list = filter f a052382_list where
       f x = g x where
         g z = z == 0 || x `mod` a000040 d == 0 && g z'
               where (z', d) = divMod z 10
    
  • Mathematica
    Select[Range@22222,FreeQ[IntegerDigits[#],0]&&Total[Mod[#,Prime[IntegerDigits[#]]]]==0&] (* Ivan N. Ianakiev, Apr 11 2015 *)
  • PARI
    is_A256786(n)=!for(i=1,#d=Set(digits(n)),(!d[i]||n%prime(d[i]))&&return) \\ M. F. Hasler, Apr 11 2015
    
  • Python
    primes = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23]
    def ok(n):
        s = str(n)
        return "0" not in s and all(n%primes[int(d)] == 0 for d in s)
    print([k for k in range(22213) if ok(k)]) # Michael S. Branicky, Dec 14 2021

A217394 Numbers starting with 2.

Original entry on oeis.org

2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/18 and 10/27, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[300], IntegerDigits[#][[1]] == 2 &] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def agen():
      yield 2
      digits, adder = 1, 20
      while True:
        for i in range(10**digits): yield adder + i
        digits, adder = digits+1, adder*10
    g = agen()
    print([next(g) for i in range(54)]) # Michael S. Branicky, Feb 20 2021
    
  • Python
    def A217394(n): return n+(17*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

a(n) = n + (17*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 15 2023

A293869 Square array whose n-th row lists all numbers having n as a substring, n >= 1; read by falling antidiagonals.

Original entry on oeis.org

1, 10, 2, 11, 12, 3, 12, 20, 13, 4, 13, 21, 23, 14, 5, 14, 22, 30, 24, 15, 6, 15, 23, 31, 34, 25, 16, 7, 16, 24, 32, 40, 35, 26, 17, 8, 17, 25, 33, 41, 45, 36, 27, 18, 9, 18, 26, 34, 42, 50, 46, 37, 28, 19, 10, 19, 27, 35, 43, 51, 56, 47, 38, 29, 100, 11
Offset: 1

Views

Author

M. F. Hasler, Oct 18 2017

Keywords

Examples

			The array starts:
   [ 1  10  11  12  13  14  15  16  17  18  19  21  31 ...] = A011531
   [ 2  12  20  21  22  23  24  25  26  27  28  29  32 ...] = A011532
   [ 3  13  23  30  31  32  33  34  35  36  37  38  39 ...] = A011533
   [ 4  14  24  34  40  41  42  43  44  45  46  47  48 ...] = A011534
   [ 5  15  25  35  45  50  51  52  53  54  55  56  57 ...] = A011535
   [ 6  16  26  36  46  56  60  61  62  63  64  65  66 ...] = A011536
   [ 7  17  27  37  47  57  67  70  71  72  73  74  75 ...] = A011537
   [ 8  18  28  38  48  58  68  78  80  81  82  83  84 ...] = A011538
   [ 9  19  29  39  49  59  69  79  89  90  91  92  93 ...] = A011539
   [10 100 101 102 103 104 105 106 107 108 109 110 210 ...] = A293870
   [11 110 111 112 113 114 115 116 117 118 119 211 311 ...] = A293871
   [12 112 120 121 122 123 124 125 126 127 128 129 212 ...] = A293872
   [   ...             ...             ...             ...]
		

Crossrefs

Cf. A072484, A292690 (variant starting with row 0).
Cf. A292451, A292731 (both partially coincide with row 11, but no inclusion relation holds).

Programs

  • Mathematica
    Block[{d = 15, q, a, s}, a = Table[q = n-1; s = IntegerString[n]; Table[While[StringFreeQ[IntegerString[++q], s]]; q, d-n+1], {n, d}]; Table[a[[n, k-n+1]], {k, d}, {n, k}]] (* Paolo Xausa, Mar 01 2024 *)
  • PARI
    has=(n,p,m=10^#Str(p))->until(p>n\=10,n%m==p&&return(1))
    Mat(vectorv(12,n,a=[];for(k=n,oo,has(k,n)||next;a=concat(a,k);#a>12&&break);a))
    
  • Perl
    See Links section.

Formula

T(n, k) = A072484(n, k) for any n > 0 and k = 1..n. - Rémy Sigrist, Jan 29 2021

A292690 Square array whose n-th row lists all numbers having n as a substring, read by falling antidiagonals, n >= 0.

Original entry on oeis.org

0, 10, 1, 20, 10, 2, 30, 11, 12, 3, 40, 12, 20, 13, 4, 50, 13, 21, 23, 14, 5, 60, 14, 22, 30, 24, 15, 6, 70, 15, 23, 31, 34, 25, 16, 7, 80, 16, 24, 32, 40, 35, 26, 17, 8, 90, 17, 25, 33, 41, 45, 36, 27, 18, 9, 100, 18, 26, 34, 42, 50, 46, 37, 28, 19, 10
Offset: 0

Views

Author

M. F. Hasler, Oct 18 2017

Keywords

Comments

This array starts with row 0, see A293869 for the variant which starts with row 1.

Examples

			The array starts:
   [ 0  10  20  30  40  50  60  70  80  90 100 101 102 ...] = A011540
   [ 1  10  11  12  13  14  15  16  17  18  19  21  31 ...] = A011531
   [ 2  12  20  21  22  23  24  25  26  27  28  29  32 ...] = A011532
   [ 3  13  23  30  31  32  33  34  35  36  37  38  39 ...] = A011533
   [ 4  14  24  34  40  41  42  43  44  45  46  47  48 ...] = A011534
   [ 5  15  25  35  45  50  51  52  53  54  55  56  57 ...] = A011535
   [ 6  16  26  36  46  56  60  61  62  63  64  65  66 ...] = A011536
   [ 7  17  27  37  47  57  67  70  71  72  73  74  75 ...] = A011537
   [ 8  18  28  38  48  58  68  78  80  81  82  83  84 ...] = A011538
   [ 9  19  29  39  49  59  69  79  89  90  91  92  93 ...] = A011539
   [10 100 101 102 103 104 105 106 107 108 109 110 210 ...] = A293870
   [11 110 111 112 113 114 115 116 117 118 119 211 311 ...] = A293871
   [12 112 120 121 122 123 124 125 126 127 128 129 212 ...] = A293872
   [   ...             ...             ...             ...]
		

Crossrefs

Programs

  • Mathematica
    Block[{d = 15, q, a, s}, a = Table[q = n-1; s = IntegerString[n]; Table[While[StringFreeQ[IntegerString[++q], s]]; q, d-n], {n, 0, d-1}]; Table[a[[n+1, k-n]], {k, d}, {n, 0, k-1}]] (* Paolo Xausa, Mar 01 2024 *)
  • PARI
    has(n,p,m=10^#Str(p))=until(p+!p>n\=10,n%m==p&&return(1))
    Mat(vectorv(12,n,a=[];for(k=n--,oo,has(k,n)||next;a=concat(a,k);#a>12&&break);a))
    for(i=1,11,for(j=1,i,print1(%[j,i-j+1]","))) \\ Read by antidiagonals

A293871 Numbers having 11 as substring of their digits.

Original entry on oeis.org

11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 211, 311, 411, 511, 611, 711, 811, 911, 1011, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131
Offset: 1

Views

Author

M. F. Hasler, Oct 18 2017

Keywords

Crossrefs

Row 11 of A292690 and A293869.
Cf. A292451, A292731 (both partially coincide with this sequence, but no inclusion relation holds).
Cf. A011540, A011531, A011532, A011533, A011534, A011535, A011536, A011537, A011538, A011539: analog for substrings '0' through '9'.
Cf. A293870, A293872, A293873, A293874, A293875, A293876, A293877, A293878, A293879, A293880: same for substrings '10' - '20'.
Cf. A121031: subsequence of terms divisible by 11.
Numbers divisible by k and having k as a substring: A121022 (2), A121023 (3), A121024 (4), A121025 (5), A121026 (6), A121027 (7), A121028 (8), A121029 (9), A121030 (10), A121031 (11), A121032 (12), A121033 (13), A121034 (14), A121035 (15), A121036 (16), A121037 (17), A121038 (18), A121039 (19), A121040 (20).
Cf. A121041.

Programs

  • Mathematica
    Select[Range[2000], StringContainsQ[IntegerString[#], "11"] &] (* Paolo Xausa, Feb 25 2024 *)
  • PARI
    is_A293871 = has(n,p=11,m=10^#Str(p))=until(p>n\=10,n%m==p&&return(1))

Formula

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

A293872 Numbers having '12' as a substring of their digits.

Original entry on oeis.org

12, 112, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 212, 312, 412, 512, 612, 712, 812, 912, 1012, 1112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218
Offset: 1

Views

Author

M. F. Hasler, Oct 18 2017

Keywords

Comments

Row 12 of A292690 and A293869. A121032 is the subsequence of multiples of 12.

Crossrefs

Cf. A121041, A121022, A121023, A121024, A121025, A121026, A121027, A121028, A121029, A121030, A121031, A121032, A121033, A121034, A121035, A121036, A121037, A121038, A121039, A121040: subsequences of the above, containing only multiples of the pattern p.

Programs

  • Maple
    f:= proc(d) local i,x,y;
      sort(convert({seq(seq(seq(x+10^i*12+10^(i+2)*y, y=10^(d-3-i)..10^(d-2-i)-1),x=0..10^i-1),i=0..d-3),
    seq(12*10^(d-2)+x,x=0..10^(d-2)-1)},list))
    end proc:
    seq(op(f(d)),d=2..4); # Robert Israel, Nov 20 2017
  • Mathematica
    Select[Range@ 1220, SequenceCount[IntegerDigits[#], {1, 2}] > 0 &] (* Michael De Vlieger, Nov 20 2017 *)
  • PARI
    is_A293872 = has(n, p=12, m=10^#Str(p))=until(p>n\=10, n%m==p&&return(1))

Formula

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

A293877 Numbers having '17' as substring of their digits / decimal expansion.

Original entry on oeis.org

17, 117, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 217, 317, 417, 517, 617, 717, 817, 917, 1017, 1117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1217, 1317, 1417, 1517, 1617, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713
Offset: 1

Views

Author

M. F. Hasler, Oct 18 2017

Keywords

Comments

Row 17 of A292690 and A293869. A121037 lists the terms which are divisible by 17.

Crossrefs

Cf. A121041, A121022, A121023, A121024, A121025, A121026, A121027, A121028, A121029, A121030, A121031, A121032, A121033, A121034, A121035, A121036, A121037, A121038, A121039, A121040: subsequences of the above, containing only multiples of the pattern p.

Programs

  • Mathematica
    Select[Range[2000], StringContainsQ[IntegerString[#], "17"] &] (* Paolo Xausa, Feb 25 2024 *)
  • PARI
    is_A293877 = has(n, p=17, m=10^#Str(p))=until(p>n\=10, n%m==p&&return(1))

Formula

a(n) ~ n. - Charles R Greathouse IV, Nov 02 2022
Showing 1-10 of 31 results. Next