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 10 results.

A260223 Primes having only {3, 5, 0} as digits.

Original entry on oeis.org

3, 5, 53, 353, 503, 3533, 5003, 5303, 5333, 5503, 30553, 33053, 33353, 33503, 33533, 35053, 35353, 35533, 50033, 50053, 50333, 50503, 53003, 53353, 53503, 55333, 303053, 303553, 305033, 305353, 305533, 330053, 333503, 333533, 335033, 350003, 350033, 350503
Offset: 1

Views

Author

Vincenzo Librandi, Jul 20 2015

Keywords

Comments

A020462 is subsequence.

Crossrefs

Cf. Primes that contain only the digits (3,5,k): this sequence (k=0), A260224 (k=1), A214703 (k=2), A199345 (k=4), A260225 (k=6), A087363 (k=7), A260226 (k=8), A260227 (k=9).
Cf. A020462.

Programs

  • Magma
    [p: p in PrimesUpTo(600000) | Set(Intseq(p)) subset [3, 5, 0]];
  • Mathematica
    Select[Prime[Range[4 10^4]], Complement[IntegerDigits[#], {3, 5, 0}]=={} &]
    Select[FromDigits/@Tuples[{0,3,5},6],PrimeQ] (* Harvey P. Dale, Jul 19 2019 *)

A260225 Primes having only {3, 5, 6} as digits.

Original entry on oeis.org

3, 5, 53, 353, 563, 653, 3533, 5333, 5563, 5653, 6353, 6553, 6563, 6653, 33353, 33533, 33563, 35353, 35363, 35533, 36353, 36563, 36653, 53353, 53633, 53653, 55333, 55633, 55663, 56333, 56533, 56633, 56663, 63353, 63533, 65353, 65563, 65633, 66533, 66553
Offset: 1

Views

Author

Vincenzo Librandi, Jul 21 2015

Keywords

Comments

A020462 is subsequence.

Crossrefs

Cf. similar sequences listed in A260223.
Cf. A020462.

Programs

  • Magma
    [p: p in PrimesUpTo(70000) | Set(Intseq(p)) subset [3, 5, 6]];
  • Mathematica
    Select[Prime[Range[3 10^4]], Complement[IntegerDigits[#], {3, 5, 6}]=={} &]
    Table[Select[FromDigits/@Tuples[{3,5,6},n],PrimeQ],{n,5}]//Flatten (* Harvey P. Dale, Jan 23 2018 *)

A260226 Primes having only {3, 5, 8} as digits.

Original entry on oeis.org

3, 5, 53, 83, 353, 383, 853, 883, 3533, 3583, 3833, 3853, 5333, 8353, 33353, 33533, 35353, 35533, 38333, 38833, 53353, 55333, 83383, 83833, 85333, 85853, 88853, 88883, 333383, 333533, 335383, 335833, 338383, 353333, 353833, 355853, 383533, 383833, 533353
Offset: 1

Views

Author

Vincenzo Librandi, Jul 22 2015

Keywords

Comments

A020462 and A020464 are subsequences.

Crossrefs

Cf. similar sequences listed in A260223.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [3, 5, 8]];
  • Mathematica
    Select[Prime[Range[5 10^4]], Complement[IntegerDigits[#], {3, 5, 8}]=={} &]
    Select[Flatten[Table[FromDigits/@Tuples[{3,5,8},n],{n,6}]],PrimeQ] (* or  *) Join[{3,5},Select[10#+3&/@Flatten[Table[FromDigits/@Tuples[{3,5,8},n],{n,5}]],PrimeQ]] (* The second program is faster because it recognizes that, except only for 5, each such prime must end in 3. *) (* Harvey P. Dale, Jul 17 2020 *)

A260227 Primes having only {3, 5, 9} as digits.

Original entry on oeis.org

3, 5, 53, 59, 353, 359, 593, 599, 953, 3359, 3533, 3539, 3559, 3593, 5333, 5393, 5399, 5939, 5953, 9533, 9539, 33353, 33359, 33533, 33599, 35339, 35353, 35393, 35533, 35593, 35933, 35993, 35999, 39359, 39953, 53353, 53359, 53593, 53939, 53959, 53993
Offset: 1

Views

Author

Vincenzo Librandi, Jul 22 2015

Keywords

Comments

A020462 and A020468 are subsequences.

Crossrefs

Cf. similar sequences listed in A260223.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [3, 5, 9]];
  • Mathematica
    Select[Prime[Range[2 10^4]], Complement[IntegerDigits[#], {3, 5, 9}]=={} &]
    Select[Table[FromDigits/@Tuples[{3,5,9},n],{n,5}]//Flatten,PrimeQ] (* Harvey P. Dale, Sep 07 2018 *)

A260224 Primes having only {1, 3, 5} as digits.

Original entry on oeis.org

3, 5, 11, 13, 31, 53, 113, 131, 151, 311, 313, 331, 353, 1151, 1153, 1511, 1531, 1553, 3313, 3331, 3511, 3533, 5113, 5153, 5333, 5351, 5531, 11113, 11131, 11311, 11351, 11353, 11551, 13151, 13313, 13331, 13513, 13553, 15131, 15313, 15331, 15511, 15551
Offset: 1

Views

Author

Vincenzo Librandi, Jul 21 2015

Keywords

Crossrefs

Subsequence of A030096. A004022, A020451, A020453, and A020462 are subsequences.
Cf. similar sequences listed in A260223.

Programs

  • Magma
    [p: p in PrimesUpTo(40000) | Set(Intseq(p)) subset [3, 5, 1]];
    
  • Mathematica
    Select[Prime[Range[3 10^3]], Complement[IntegerDigits[#], {3, 5, 1}]=={} &]
    Select[Flatten[Table[FromDigits/@Tuples[{1,3,5},n],{n,5}]],PrimeQ] (* Harvey P. Dale, Mar 03 2020 *)
  • Python
    from gmpy2 import is_prime, mpz
    from itertools import product
    A260224_list = [int(''.join(x)) for n in range(1,10) for x in product('135',repeat=n) if is_prime(mpz(''.join(x)))] # Chai Wah Wu, Jul 21 2015

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)

A380906 Primes without {3, 5} as digits.

Original entry on oeis.org

2, 7, 11, 17, 19, 29, 41, 47, 61, 67, 71, 79, 89, 97, 101, 107, 109, 127, 149, 167, 179, 181, 191, 197, 199, 211, 227, 229, 241, 269, 271, 277, 281, 401, 409, 419, 421, 449, 461, 467, 479, 487, 491, 499, 601, 607, 617, 619, 641, 647, 661, 677, 691, 701, 709, 719, 727, 761, 769, 787, 797
Offset: 1

Views

Author

Vincenzo Librandi, Feb 09 2025

Keywords

Crossrefs

Intersection of A038611 and A038613.

Programs

  • Magma
    [p: p in PrimesUpTo(700) | not 3 in Intseq(p) and not 5 in Intseq(p) ];
    
  • Mathematica
    Select[Prime[Range[120]],DigitCount[#,10,3]==0&&DigitCount[#,10,5]==0&]
  • PARI
    isok(p) = if (isprime(p), my(d=digits(p)); (#select(x->(x==3), d)==0) && (#select(x->(x==5), d)==0)); \\ Michel Marcus, Feb 10 2025
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A380906_gen(): # generator of terms
        return filter(isprime,(int(oct(n)[2:].translate({51:52,52:54,53:55,54:56,55:57})) for n in count(1)))
    A380906_list = list(islice(A380906_gen(),20)) # Chai Wah Wu, Feb 12 2025

A036315 Composite numbers whose prime factors contain no digits other than 3 and 5.

Original entry on oeis.org

9, 15, 25, 27, 45, 75, 81, 125, 135, 159, 225, 243, 265, 375, 405, 477, 625, 675, 729, 795, 1059, 1125, 1215, 1325, 1431, 1765, 1875, 2025, 2187, 2385, 2809, 3125, 3177, 3375, 3645, 3975, 4293, 5295, 5625, 6075, 6561, 6625, 7155, 8427, 8825, 9375, 9531
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

Products of at least two terms of A020462. - David A. Corneth, Oct 09 2020

Crossrefs

Programs

  • Mathematica
    Select[Range[10000],SubsetQ[{3,5},Union[Flatten[IntegerDigits/@ FactorInteger[ #][[All,1]]]]]&&CompositeQ[#]&] (* Harvey P. Dale, May 30 2021 *)

Formula

Sum_{n>=1} 1/a(n) = Product_{p in A020462} (p/(p - 1)) - Sum_{p in A020462} 1/p - 1 = 0.3620363317... . - Amiram Eldar, May 22 2022

A036941 Smallest n-digit prime containing only digits 3 and 5, or 0 if no such prime exists.

Original entry on oeis.org

3, 53, 353, 3533, 33353, 333533, 3335533, 33335333, 333535333, 3333353533, 33333353533, 333333533353, 3333333353353, 33333333555553, 333333333353353, 3333333333333533, 33333333333355333, 333333333333353533
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Maple
    A:= proc(n) local j,x,t;
      x:= (10^n-1)/3;
      for t from 1 to 2^n do
        if isprime(x) then return x fi;
        j:= padic:-ordp(t,2);
        x:= x  - (x mod 10^j) + (7 * 10^j-1)/3;
      od:
      0
    end proc:
    seq(A(n),n=1..100); # Robert Israel, Apr 22 2016
  • Mathematica
    Table[SelectFirst[FromDigits/@(Join[#,{3}]&/@Tuples[{3,5},n]),PrimeQ],{n,0,20}](* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Oct 07 2014 *)

A138584 Palindromic primes using only digits 3 and 5.

Original entry on oeis.org

3, 5, 353, 33533, 35353, 3353533, 3553553, 333535333, 335333533, 355353553, 355555553, 33335353333, 33553335533, 35533333553, 35553535553, 3335535355333, 3335555555333, 3353353533533, 3353355533533, 3355535355533, 3533355533353, 3533533353353
Offset: 1

Views

Author

Paul Curtz, May 13 2008

Keywords

Crossrefs

Cf. A020462.

Programs

  • Maple
    revdigs:= proc(n) option remember;
        local b;
        if n < 10 then return n fi;
        b:= n mod 10;
        b*10^ilog10(n) + procname((n-b)/10);
    end proc:
    A:= {3,5}:
    B:= [0]:
    for d from 2 to 20 do
      if d::even then
        B:= map(t -> (10*t+3,10*t+5), B);
        A:= A union select(isprime, {seq(revdigs(b)+10^(d/2)*b,b=B)});
      else
        A:= A union select(isprime, {seq(seq(
             revdigs(b)+i*10^((d-1)/2)+10^((d+1)/2)*b, i = [3,5]),b=B)});
      fi
    od:
    sort(convert(A,list)); # Robert Israel, Dec 17 2015
  • Mathematica
    RevDigs[n_] := Module[{b}, If[n < 10, Return[n]];  b = Mod[n, 10]; b * 10^Floor[Log10[n]] + RevDigs[(n - b)/10]];A = {3, 5};B = {0};Do[  If[EvenQ[d], B = Flatten[Map[{10*# + 3, 10*# + 5} &, B]]; A = Union[A, Select[Map[RevDigs[#] + 10^(d/2)*# &, B], PrimeQ, Infinity]], A = Union[A, Select[Flatten[Table[RevDigs[b] + i*10^((d-1)/2) + 10^((d+1)/2)*b, {b, B}, {i, {3, 5}}]], PrimeQ, Infinity]];  ],  {d, 2, 20}];Sort[A] (* James C. McMahon, Jun 13 2025 *)
  • Python
    from itertools import product
    from sympy import isprime
    A138584_list = []
    for l in range(17):
        for d in product('35',repeat=l):
            s = ''.join(d)
            n = int(s+'3'+s[::-1])
            if isprime(n):
                A138584_list.append(n)
            n += 2*10**l
            if isprime(n):
                A138584_list.append(n) # Chai Wah Wu, Dec 17 2015

Extensions

More terms from Arkadiusz Wesolowski, Dec 31 2011
Showing 1-10 of 10 results.