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

A020467 Primes that contain digits 5 and 7 only.

Original entry on oeis.org

5, 7, 557, 577, 757, 5557, 7577, 7757, 57557, 75557, 75577, 77557, 555557, 575557, 575777, 577757, 757577, 775757, 775777, 5555777, 5557757, 5575777, 5577577, 5755577, 5775557, 5777557, 7575577, 7577777, 55555777, 55575757, 55755757, 55757777, 57557557
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A030096, A260827-A260831, and A284380.

Programs

  • Magma
    [p: p in PrimesUpTo(55755757 ) | Set(Intseq(p)) subset [5, 7]];// Vincenzo Librandi, Jul 27 2012
    
  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{5,7},n],PrimeQ],{n,8}]]
  • Python
    from sympy import isprime
    from sympy.utilities.iterables import multiset_permutations
    def aupton(terms):
      n, digits, alst = 0, 1, []
      while len(alst) < terms:
        mpstr = "".join(d*digits for d in "57")
        for mp in multiset_permutations(mpstr, digits):
          t = int("".join(mp))
          if isprime(t): alst.append(t)
          if len(alst) == terms: break
        else: digits += 1
      return alst
    print(aupton(33)) # Michael S. Branicky, May 07 2021

A284379 Numbers k with digits 3 and 5 only.

Original entry on oeis.org

3, 5, 33, 35, 53, 55, 333, 335, 353, 355, 533, 535, 553, 555, 3333, 3335, 3353, 3355, 3533, 3535, 3553, 3555, 5333, 5335, 5353, 5355, 5533, 5535, 5553, 5555, 33333, 33335, 33353, 33355, 33533, 33535, 33553, 33555, 35333, 35335, 35353, 35355, 35533, 35535
Offset: 1

Views

Author

Jaroslav Krizek, Mar 26 2017

Keywords

Comments

Prime terms are in A020462.

Crossrefs

Numbers n with digits 5 and k only for k = 0 - 4 and 6 - 9: A169964 (k = 0), A276037 (k = 1), A072961 (k = 2), this sequence (k = 3), A256290 (k = 4), A256291 (k = 6), A284380 (k = 7), A284381 (k = 8), A284382 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {3, 5}];
  • Maple
    A:= 3,5: B:= [3,5];
    for i from 1 to 5 do
      B:= map(t -> (10*t+3,10*t+5), B);
      A:= A, op(B);
    od:
    A; # Robert Israel, Apr 13 2020
  • Mathematica
    Select[Range[35600], Times @@ Boole@ Map[MemberQ[{3, 5}, #] &, IntegerDigits@ #] > 0 &] (* or *)
    Table[FromDigits /@ Union@ Apply[Join, Map[Permutations@ # &, Tuples[{3, 5}, n]]], {n, 5}] // Flatten (* Michael De Vlieger, Mar 27 2017 *)

Formula

From Robert Israel, Apr 13 2020: (Start)
a(n) = 2*A007931(n)+A002275(n).
a(2n+1) = 10*a(n)+3.
a(2n+2) = 10*a(n)+5.
G.f. g(x) satisfies g(x) = 10*(x^2+x)*g(x^2) + (3*x+5*x^2)/(1-x^2). (End)

A284381 Numbers k with digits 5 and 8 only.

Original entry on oeis.org

5, 8, 55, 58, 85, 88, 555, 558, 585, 588, 855, 858, 885, 888, 5555, 5558, 5585, 5588, 5855, 5858, 5885, 5888, 8555, 8558, 8585, 8588, 8855, 8858, 8885, 8888, 55555, 55558, 55585, 55588, 55855, 55858, 55885, 55888, 58555, 58558, 58585, 58588, 58855, 58858
Offset: 1

Views

Author

Jaroslav Krizek, Mar 28 2017

Keywords

Comments

All terms except the first are composite.

Crossrefs

Numbers n with digits 5 and k only for k = 0 - 4 and 6 - 9: A169964 (k = 0), A276037 (k = 1), A072961 (k = 2), A284379 (k = 3), A256290 (k = 4), A256291 (k = 6), A284380 (k = 7), this sequence (k = 8), A284382 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 8}];
    
  • Mathematica
    Join @@ ((FromDigits /@ Tuples[{5, 8}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
  • Python
    def a(n): return int(bin(n+1)[3:].replace('0', '5').replace('1', '8'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 08 2021

Formula

a(n) = (A284380(n)+A284382(n))/2. - Robert Israel, Mar 28 2017

A284382 Numbers k with digits 5 and 9 only.

Original entry on oeis.org

5, 9, 55, 59, 95, 99, 555, 559, 595, 599, 955, 959, 995, 999, 5555, 5559, 5595, 5599, 5955, 5959, 5995, 5999, 9555, 9559, 9595, 9599, 9955, 9959, 9995, 9999, 55555, 55559, 55595, 55599, 55955, 55959, 55995, 55999, 59555, 59559, 59595, 59599, 59955, 59959
Offset: 1

Views

Author

Jaroslav Krizek, Mar 28 2017

Keywords

Comments

Prime terms are in A020468.

Crossrefs

Numbers n with digits 5 and k only for k = 0 - 4 and 6 - 9: A169964 (k = 0), A276037 (k = 1), A072961 (k = 2), A284379 (k = 3), A256290 (k = 4), A256291 (k = 6), A284380 (k = 7), A284381 (k = 8), this sequence (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 9}];
    
  • Mathematica
    Join @@ ((FromDigits /@ Tuples[{5, 9}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
  • Python
    def a(n): return int(bin(n+1)[3:].replace('0', '5').replace('1', '9'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 09 2021

A285011 Numbers with digits 7 and 9 only.

Original entry on oeis.org

7, 9, 77, 79, 97, 99, 777, 779, 797, 799, 977, 979, 997, 999, 7777, 7779, 7797, 7799, 7977, 7979, 7997, 7999, 9777, 9779, 9797, 9799, 9977, 9979, 9997, 9999, 77777, 77779, 77797, 77799, 77977, 77979, 77997, 77999, 79777, 79779, 79797, 79799, 79977, 79979
Offset: 1

Views

Author

Jaroslav Krizek, Apr 08 2017

Keywords

Crossrefs

Prime terms are in A020471.
Numbers with digits 7 and k only for k = 0 - 6 and 8 - 9: A204094 (k = 0), A276039 (k = 1), A284921 (k = 2), A143967 (k = 3), A284971 (k = 4), A284380 (k = 5), A256292 (k = 6), A256340 (k = 8), this sequence (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {7, 9}];
    
  • Mathematica
    Flatten@ Table[FromDigits /@ Tuples[{7, 9}, n], {n, 5}] (* Giovanni Resta, Apr 10 2017 *)
  • PARI
    a(n,{p=[7,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
    
  • Python
    def a(n): return int(bin(n+1)[3:].replace('0', '7').replace('1', '9'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jul 09 2021
Showing 1-5 of 5 results.