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

A020451 Primes that contain digits 1 and 3 only.

Original entry on oeis.org

3, 11, 13, 31, 113, 131, 311, 313, 331, 3313, 3331, 11113, 11131, 11311, 13313, 13331, 31333, 33113, 33311, 33331, 113111, 113131, 131111, 131113, 131311, 311111, 313133, 313331, 313333, 331333, 333131, 333331, 1111333, 1131113, 1131131, 1131133, 1131331
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A030096, A045429, and A032917.

Programs

  • Magma
    [p: p in PrimesUpTo(1131331) | Set(Intseq(p)) subset [1,3]]; // Bruno Berselli, Jul 27 2012
    
  • Maple
    N:= 8: # to get all a(n) with at most N digits
    S:= {}:
    for d from 1 to N do
      r:= (10^d-1)/9;
      S:= S union select(isprime,map(`+`,map(convert,combinat[powerset]
          ({seq(2*10^i,i=0..d-1)}),`+`),r));
    od:
    S; # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(S,list)); # Robert Israel, May 04 2015
  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{1,3},n],PrimeQ],{n,7}]] (* Vincenzo Librandi, Jul 27 2012 *)
  • Python
    from sympy import primerange
    def checkd(a, c):
        b =  set(int(i) for i in set(str(a)))
        return b.issubset(c)
    for n in primerange(2, 2000000):
        if checkd(n, [1, 3]):
            print(n)
    # Abhiram R Devesh, May 04 2015

A284293 Numbers using only digits 1 and 6.

Original entry on oeis.org

1, 6, 11, 16, 61, 66, 111, 116, 161, 166, 611, 616, 661, 666, 1111, 1116, 1161, 1166, 1611, 1616, 1661, 1666, 6111, 6116, 6161, 6166, 6611, 6616, 6661, 6666, 11111, 11116, 11161, 11166, 11611, 11616, 11661, 11666, 16111, 16116, 16161, 16166, 16611, 16616
Offset: 1

Views

Author

Jaroslav Krizek, Mar 25 2017

Keywords

Comments

Product of digits of n is a power of 6; subsequence of A276038.
Prime terms are in A020454.

Crossrefs

Cf. Numbers using only digits 1 and k for k = 0 and k = 2 - 9: A007088 (k = 0), A007931 (k = 2), A032917 (k = 3), A032822 (k = 4) , A276037 (k = 5), this sequence (k = 6), A276039 (k = 7), A213084 (k = 8), A284294 (k = 9).

Programs

  • Magma
    [n: n in [1..20000] | Set(IntegerToSequence(n, 10)) subset {1, 6}];
    
  • Mathematica
    Join @@ (FromDigits /@ Tuples[{1,6}, #] & /@ Range[5]) (* Giovanni Resta, Mar 25 2017 *)
  • Python
    def A284293(n): return 5*int(bin(n+1)[3:])+(10**((n+1).bit_length()-1)-1)//9 # Chai Wah Wu, Jun 28 2025

A284632 Numbers n with digits 2 and 6 only.

Original entry on oeis.org

2, 6, 22, 26, 62, 66, 222, 226, 262, 266, 622, 626, 662, 666, 2222, 2226, 2262, 2266, 2622, 2626, 2662, 2666, 6222, 6226, 6262, 6266, 6622, 6626, 6662, 6666, 22222, 22226, 22262, 22266, 22622, 22626, 22662, 22666, 26222, 26226, 26262, 26266, 26622, 26626
Offset: 1

Views

Author

Jaroslav Krizek, Mar 30 2017

Keywords

Comments

All terms after 2 are composite.

Crossrefs

Cf. A032917.
Numbers n with digits 6 and k only for k = 0..5 and 7..9: A204093 (k = 0), A284293 (k = 1), this sequence (k = 2), A284633 (k = 3), A284634 (k = 4), A256291 (k = 5), A256292 (k = 7), A284635 (k = 8), A284636 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {2, 6}]
  • Mathematica
    Table[Map[FromDigits, Tuples[{2, 6}, {k}]], {k, 5}] // Flatten (* Michael De Vlieger, Mar 30 2017 *)

Formula

a(n) = 2 * A032917(n).

A213973 List of imprimitive words over the alphabet {1,3}.

Original entry on oeis.org

11, 33, 111, 333, 1111, 1313, 3131, 3333, 11111, 33333, 111111, 113113, 131131, 131313, 133133, 311311, 313131, 313313, 331331, 333333, 1111111, 3333333, 11111111, 11131113, 11311131, 11331133, 13111311, 13131313, 13311331, 13331333, 31113111, 31133113, 31313131
Offset: 1

Views

Author

N. J. A. Sloane, Jun 30 2012

Keywords

Comments

A word w is primitive if it cannot be written as u^k with k>1; otherwise it is imprimitive.
The {0,1} version of this sequence is
00, 11, 000, 111, 0000, 0101, 1010, 1111, 00000, 11111, 000000, 001001, 010010, 010101, 011011, 100100, 101010, 101101, 110110, 111111
but this cannot be included as a sequence in the OEIS since it contains nonzero "numbers" beginning with 0.
This sequence results from A213972 by replacing all digits 2 by 3, and from A213974 by replacing all digits 2 by 1. - M. F. Hasler, Mar 10 2014

References

  • A. de Luca and S. Varricchio, Finiteness and Regularity in Semigroups and Formal Languages, Monographs in Theoretical Computer Science, Springer-Verlag, Berlin, 1999. See p. 10.

Crossrefs

Programs

  • PARI
    for(n=1, 8, p=2*vector(n, i, 10^(n-i))~; forvec(d=vector(n, i, [1, 3]/2), is_A239017(m=d*p)||print1(m", ")))

Formula

A213973 = A032917 intersect A239018. - M. F. Hasler, Mar 10 2014

Extensions

More terms from M. F. Hasler, Mar 10 2014

A239019 Numbers which are not primitive words over the alphabet {0,...,9} (when written in base 10).

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 222, 333, 444, 555, 666, 777, 888, 999, 1010, 1111, 1212, 1313, 1414, 1515, 1616, 1717, 1818, 1919, 2020, 2121, 2222, 2323, 2424, 2525, 2626, 2727, 2828, 2929, 3030, 3131, 3232, 3333, 3434, 3535, 3636, 3737, 3838, 3939, 4040, 4141, 4242, 4343, 4444, 4545, 4646, 4747, 4848, 4949
Offset: 1

Views

Author

M. F. Hasler, Mar 08 2014

Keywords

Comments

A word is primitive iff it is not a power, i.e., repetition, of a subword. The only non-primitive words with a prime number of letters (here: digits) are the repdigit numbers. Thus, the first nontrivial terms of this sequence are 1010,1212,...
This sequence does *not* contain all non-primitive words over the alphabet {0,...,9}, namely, it excludes those which would be numbers with leading zeros: 00,000,0000,0101,0202,...
Lists of non-primitive words over a sub-alphabet of {1...9}, like A213972, A213973, A213974, A239018, ... are given as intersection of this with the set of all words in that alphabet, e.g., A007931, A032810, A032917, A007932, ...

Programs

  • Maple
    F:= proc(d) local p,R,q;
      R:= {seq(x*(10^d-1)/9, x=1..9)};
      for p in numtheory:-factorset(d) minus {d} do
        q:= d/p;
        R:= R union {seq(x*(10^d-1)/(10^q-1),x=10^(q-1)..10^q-1)};
      od:
      sort(convert(R,list))
    end proc:
    [seq(op(F(i)),i=2..4)]; # Robert Israel, Nov 14 2017
  • PARI
    is_A239019(n)=fordiv(#n=digits(n),L,L<#n && n==concat(Col(vector(#n/L,i,1)~*vecextract(n,2^L-1))~)&&return(1))

A213084 Numbers consisting of ones and eights.

Original entry on oeis.org

1, 8, 11, 18, 81, 88, 111, 118, 181, 188, 811, 818, 881, 888, 1111, 1118, 1181, 1188, 1811, 1818, 1881, 1888, 8111, 8118, 8181, 8188, 8811, 8818, 8881, 8888, 11111, 11118, 11181, 11188, 11811, 11818, 11881, 11888, 18111, 18118, 18181, 18188, 18811, 18818
Offset: 1

Views

Author

Jens Ahlström, Jun 05 2012

Keywords

Comments

One and eight begin with vowels. The subsequence of primes begins 11, 181, 811, 1181, 1811, 8111. - Jonathan Vos Post, Jun 14 2012

Crossrefs

Cf. A020456 (primes in this sequence).
Cf. numbers consisting of 1s and ks: A007088 (k=0), A007931 (k=2), A032917 (k=3), A032822 (k=4), A276037 (k=5), A284293 (k=6), A276039 (k=7), A284294 (k=9).

Programs

  • Mathematica
    Flatten[Table[FromDigits/@Tuples[{1,8},n],{n,5}]] (* Harvey P. Dale, Aug 27 2014 *)
  • PARI
    is(n) = #setintersect(vecsort(digits(n), , 8), [0, 2, 3, 4, 5, 6, 7, 9])==0 \\ Felix Fröhlich, Sep 09 2019
  • Python
    res = []
    i = 0
    while len (res) < 260:
        for c in str(i):
            if c in '18':
                continue
            else:
                break
        else:
            res.append(i)
        i = i + 1
    print(res)
    
  • Python
    def a(n): return int(bin(n+1)[3:].replace('1', '8').replace('0', '1'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jun 26 2025
    

A284294 Numbers using only digits 1 and 9.

Original entry on oeis.org

1, 9, 11, 19, 91, 99, 111, 119, 191, 199, 911, 919, 991, 999, 1111, 1119, 1191, 1199, 1911, 1919, 1991, 1999, 9111, 9119, 9191, 9199, 9911, 9919, 9991, 9999, 11111, 11119, 11191, 11199, 11911, 11919, 11991, 11999, 19111, 19119, 19191, 19199, 19911, 19919
Offset: 1

Views

Author

Jaroslav Krizek, Mar 25 2017

Keywords

Comments

Product of digits of terms is a power of 9; subsequence of A284295.
Prime terms are in A020457.

Crossrefs

Cf. Numbers using only digits 1 and k for k = 0 and k = 2 - 9: A007088 (k = 0), A007931 (k = 2), A032917 (k = 3), A032822 (k = 4) , A276037 (k = 5), A284293 (k = 6), A276039 (k = 7), A213084 (k = 8), this sequence (k = 9).

Programs

  • Magma
    [n: n in [1..20000] | Set(IntegerToSequence(n, 10)) subset {1, 9}];
  • Mathematica
    Join @@ (FromDigits /@ Tuples[{1,9}, #] & /@ Range[5]) (* Giovanni Resta, Mar 25 2017 *)

Formula

The sum of first 2^n terms is (5*20^n + 38*10^n - 95*2^n + 1420)/171. - Giovanni Resta, Mar 25 2017

A032913 Numbers whose set of base-6 digits is {1,3}.

Original entry on oeis.org

1, 3, 7, 9, 19, 21, 43, 45, 55, 57, 115, 117, 127, 129, 259, 261, 271, 273, 331, 333, 343, 345, 691, 693, 703, 705, 763, 765, 775, 777, 1555, 1557, 1567, 1569, 1627, 1629, 1639, 1641, 1987, 1989, 1999, 2001, 2059, 2061, 2071, 2073
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..2500] | Set(IntegerToSequence(n, 6)) subset {1, 3}]; // Vincenzo Librandi, Jun 01 2012
    
  • Mathematica
    Flatten[Table[FromDigits[#,6]&/@Tuples[{1,3},n],{n,5}]] (* Harvey P. Dale, Nov 16 2011 *)
  • Python
    def A032913(n): return (int(bin(m:=n+1)[3:],6)<<1) + (6**(m.bit_length()-1)-1)//5 # Chai Wah Wu, Oct 13 2023

A032914 Numbers whose set of base-7 digits is {1,3}.

Original entry on oeis.org

1, 3, 8, 10, 22, 24, 57, 59, 71, 73, 155, 157, 169, 171, 400, 402, 414, 416, 498, 500, 512, 514, 1086, 1088, 1100, 1102, 1184, 1186, 1198, 1200, 2801, 2803, 2815, 2817, 2899, 2901, 2913, 2915, 3487, 3489, 3501, 3503, 3585, 3587
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..4000] | Set(IntegerToSequence(n, 7)) subset {1, 3}]; // Vincenzo Librandi, Jun 01 2012
    
  • Mathematica
    Flatten[Table[FromDigits[#,7]&/@Tuples[{1,3},n],{n,5}]] (* Vincenzo Librandi, Jun 01 2012 *)
  • Python
    def A032914(n): return (int(bin(m:=n+1)[3:],7)<<1) + (7**(m.bit_length()-1)-1)//6 # Chai Wah Wu, Oct 13 2023

A032915 Numbers whose set of base-8 digits is {1,3}.

Original entry on oeis.org

1, 3, 9, 11, 25, 27, 73, 75, 89, 91, 201, 203, 217, 219, 585, 587, 601, 603, 713, 715, 729, 731, 1609, 1611, 1625, 1627, 1737, 1739, 1753, 1755, 4681, 4683, 4697, 4699, 4809, 4811, 4825, 4827, 5705, 5707, 5721, 5723, 5833, 5835
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..6000] | Set(IntegerToSequence(n, 8)) subset {1, 3}]; // Vincenzo Librandi, Jun 01 2012
    
  • Mathematica
    Flatten[Table[FromDigits[#,8]&/@Tuples[{1,3},n],{n,5}]] (* Vincenzo Librandi, Jun 01 2012 *)
  • Python
    def A032915(n): return (int(bin(m:=n+1)[3:],8)<<1) + ((1<<3*(m.bit_length()-1))-1)//7 # Chai Wah Wu, Oct 13 2023
Showing 1-10 of 13 results. Next