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-9 of 9 results.

A020452 Primes that contain digits 1 and 4 only.

Original entry on oeis.org

11, 41, 4111, 4441, 11411, 14411, 41141, 41411, 44111, 1114111, 1144141, 1144441, 1411141, 1411411, 1441411, 1444111, 1444411, 1444441, 4141441, 4414411, 4441111, 4441441, 11111141, 11141111, 11141441, 11441141, 11441411, 14111441, 14141411
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A032822.

Programs

  • Magma
    [p: p in PrimesUpTo(14141411) | Set(Intseq(p)) subset [1,4]]; // Bruno Berselli, Jul 27 2012
    
  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{1,4},n],PrimeQ],{n,8}]] (* 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, 4]):
            print(n)
    # Abhiram R Devesh, May 08 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

A284971 Numbers with digits 4 and 7 only.

Original entry on oeis.org

4, 7, 44, 47, 74, 77, 444, 447, 474, 477, 744, 747, 774, 777, 4444, 4447, 4474, 4477, 4744, 4747, 4774, 4777, 7444, 7447, 7474, 7477, 7744, 7747, 7774, 7777, 44444, 44447, 44474, 44477, 44744, 44747, 44774, 44777, 47444, 47447, 47474, 47477, 47744, 47747
Offset: 1

Views

Author

Jaroslav Krizek, Apr 07 2017

Keywords

Crossrefs

Prime terms are in A020465.
Numbers with digits 4 and k only for k = 0 - 3 and 5 - 9: A169967 (k = 0), A032822 (k = 1), A284920 (k = 2), A032834 (k = 3), A256290 (k = 5), A284634 (k = 6), this sequence (k = 7), A284972 (k = 8), A284973 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 7}]
    
  • Mathematica
    Flatten@ Table[FromDigits /@ Tuples[{4, 7}, n], {n, 5}] (* Giovanni Resta, Apr 08 2017 *)
  • PARI
    is(n) = my(x=Set([4, 7]), y=Set([0, 1, 2, 3, 5, 6, 8, 9])); if(#setintersect(Set(digits(n)), x) > 0 && #setintersect(Set(digits(n)), y)==0, return(1)); 0 \\ Felix Fröhlich, Apr 08 2017
    
  • Python
    def a(n):
      b = bin(n+1)[3:]
      return int("".join(b.replace("0", "4").replace("1", "7")))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Apr 07 2021

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

A284323 Numbers k such that product of digits of k is a power of 4.

Original entry on oeis.org

1, 4, 11, 14, 22, 28, 41, 44, 82, 88, 111, 114, 122, 128, 141, 144, 182, 188, 212, 218, 221, 224, 242, 248, 281, 284, 411, 414, 422, 428, 441, 444, 482, 488, 812, 818, 821, 824, 842, 848, 881, 884, 1111, 1114, 1122, 1128, 1141, 1144, 1182, 1188, 1212, 1218
Offset: 0

Views

Author

Jaroslav Krizek, Mar 25 2017

Keywords

Examples

			1111 is in the sequence because 1*1*1*1 = 1 = 4^0.
		

Crossrefs

Supersequence of A032822.
Cf. Numbers n such that product of digits of n is a power of k for k = 0 - 9: A284375 (k = 0), A002275 (k = 1), A028846 (k = 2), A174813 (k = 3), this sequence (k = 4), A276037 (k = 5), A276038 (k = 6), A276039 (k = 7), A284324 (k = 8), A284295 (k = 9).

Programs

  • Magma
    Set(Sort([n: n in [1..10000], k in [0..20] | &*Intseq(n) eq 4^k]));
  • Mathematica
    FromDigits /@ Select[Join @@ Map[Tuples[2^Range[0, 3], #] &, Range@ 4], IntegerQ@ Log[4, Times @@ #] &] (* Michael De Vlieger, Mar 25 2017 *)

A284973 Numbers with digits 4 and 9 only.

Original entry on oeis.org

4, 9, 44, 49, 94, 99, 444, 449, 494, 499, 944, 949, 994, 999, 4444, 4449, 4494, 4499, 4944, 4949, 4994, 4999, 9444, 9449, 9494, 9499, 9944, 9949, 9994, 9999, 44444, 44449, 44494, 44499, 44944, 44949, 44994, 44999, 49444, 49449, 49494, 49499, 49944, 49949
Offset: 1

Views

Author

Jaroslav Krizek, Apr 07 2017

Keywords

Crossrefs

Prime terms are in A020466.
Numbers with digits 4 and k only for k = 0 - 3 and 5 - 9: A169967 (k = 0), A032822 (k = 1), A284920 (k = 2), A032834 (k = 3), A256290 (k = 5), A284634 (k = 6), A284971 (k = 7), A284972 (k = 8), this sequence (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 9}]
    
  • PARI
    a(n,{p=[4,9]})={my(v=binary(n+1));fromdigits(vector(#v-1,i,p[2]*v[i+1]+p[1]*!v[i+1]))} \\ R. J. Cano, Apr 09 2017

A284922 Numbers with digits 2 and 8 only.

Original entry on oeis.org

2, 8, 22, 28, 82, 88, 222, 228, 282, 288, 822, 828, 882, 888, 2222, 2228, 2282, 2288, 2822, 2828, 2882, 2888, 8222, 8228, 8282, 8288, 8822, 8828, 8882, 8888, 22222, 22228, 22282, 22288, 22822, 22828, 22882, 22888, 28222, 28228, 28282, 28288, 28822, 28828
Offset: 1

Views

Author

Jaroslav Krizek, Apr 05 2017

Keywords

Comments

All terms are even.

Crossrefs

Cf. Numbers with digits 2 and k only for k = 0 - 1 and 3 - 9: A169965 (k = 0), A007931 (k = 1), A032810 (k = 3), A284920 (k = 4), A072961 (k = 5), A284632 (k = 6), A284921 (k = 7), this sequence (k = 8), A284923 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {2, 8}]
  • Mathematica
    Flatten@ Array[FromDigits /@ Tuples[{2, 8}, #] &, 5] (* Michael De Vlieger, Apr 06 2017 *)

Formula

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

A284972 Numbers with digits 4 and 8 only.

Original entry on oeis.org

4, 8, 44, 48, 84, 88, 444, 448, 484, 488, 844, 848, 884, 888, 4444, 4448, 4484, 4488, 4844, 4848, 4884, 4888, 8444, 8448, 8484, 8488, 8844, 8848, 8884, 8888, 44444, 44448, 44484, 44488, 44844, 44848, 44884, 44888, 48444, 48448, 48484, 48488, 48844, 48848
Offset: 1

Views

Author

Jaroslav Krizek, Apr 07 2017

Keywords

Comments

All terms are even.

Crossrefs

Numbers with digits 4 and k only for k = 0 - 3 and 5 - 9: A169967 (k = 0), A032822 (k = 1), A284920 (k = 2), A032834 (k = 3), A256290 (k = 5), A284634 (k = 6), A284971 (k = 7), this sequence (k = 8), A284973 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 8}]
    
  • Mathematica
    Flatten@ Table[FromDigits /@ Tuples[{4, 8}, n], {n, 5}] (* Giovanni Resta, Apr 07 2017 *)
  • PARI
    a(n) = my (b = binary(1+n)); b[1] = 0; return (4*(10^(#b-1)-1)/(10-1) + (8-4)*fromdigits(b)) \\ Rémy Sigrist, Apr 08 2017
    
  • PARI
    a(n)={my(v=binary(n+1));v[1]=0;v+=vector(#v,i,i>1);4*fromdigits(v)} \\ R. J. Cano, Apr 08 2017
    
  • PARI
    a(n,{p=[4,8]})={my(v=binary(n+1));fromdigits(vector(#v-1,i,p[2]*v[i+1]+p[1]*!v[i+1]))} \\ R. J. Cano, Apr 09 2017

Formula

a(n) = 2 * A284920(n) = 4 * A032822(n).
Showing 1-9 of 9 results.