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

A019546 Primes whose digits are primes; primes having only {2, 3, 5, 7} as digits.

Original entry on oeis.org

2, 3, 5, 7, 23, 37, 53, 73, 223, 227, 233, 257, 277, 337, 353, 373, 523, 557, 577, 727, 733, 757, 773, 2237, 2273, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3373, 3527, 3533, 3557, 3727, 3733, 5227, 5233, 5237, 5273, 5323, 5333, 5527, 5557
Offset: 1

Views

Author

R. Muller

Keywords

Comments

Intersection of A046034 and A000040; A055642(a(n)) = A193238(a(n)). - Reinhard Zumkeller, Jul 19 2011
Ribenboim mentioned in 2000 the following number as largest known term: 72323252323272325252 * (10^3120 - 1) / (10^20 - 1) + 1. It has 3120 digits, and was discovered by Harvey Dubner in 1992. Larger terms are 22557252272*R(15600)/R(10) and 2255737522*R(15600) where R(n) denotes the n-th repunit (see A002275): Both have 15600 digits and were found in 2002, also by Dubner (see Weisstein link). David Broadhurst reports in 2003 an even longer number with 82000 digits: (10^40950+1) * (10^20055+1) * (10^10374 + 1) * (10^4955 + 1) * (10^2507 + 1) * (10^1261 + 1) * (3*R(1898) + 555531001*10^940 - R(958)) + 1, see link. - Reinhard Zumkeller, Jan 13 2012
The smallest and largest primes that use exactly once the four prime decimal digits are respectively a(27)= 2357 and a(54) = 7523. - Bernard Schott, Apr 27 2023

References

  • Paulo Ribenboim, Prime Number Records (Chap 3), in 'My Numbers, My Friends', Springer-Verlag 2000 NY, page 76.

Crossrefs

Cf. A020463 (subsequence).
A093162, A093164, A093165, A093168, A093169, A093672, A093674, A093675, A093938 and A093941 are subsequences. - XU Pingya, Apr 20 2017

Programs

  • Haskell
    a019546 n = a019546_list !! (n-1)
    a019546_list = filter (all (`elem` "2357") . show )
                          ([2,3,5] ++ (drop 2 a003631_list))
    -- Or, much more efficient:
    a019546_list = filter ((== 1) . a010051) $
                          [2,3,5,7] ++ h ["3","7"] where
       h xs = (map read xs') ++ h xs' where
         xs' = concat $ map (f xs) "2357"
         f xs d = map (d :) xs
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Magma
    [p: p in PrimesUpTo(5600) | Set(Intseq(p)) subset [2,3,5,7]]; // Bruno Berselli, Jan 13 2012
    
  • Mathematica
    Select[Prime[Range[700]], Complement[IntegerDigits[#], {2, 3, 5, 7}] == {} &] (* Alonso del Arte, Aug 27 2012 *)
    Select[Prime[Range[700]], AllTrue[IntegerDigits[#], PrimeQ] &] (* Ivan N. Ianakiev, Jun 23 2018 *)
    Select[Flatten[Table[FromDigits/@Tuples[{2,3,5,7},n],{n,4}]],PrimeQ] (* Harvey P. Dale, Apr 05 2025 *)
  • PARI
    is_A019546(n)=isprime(n) & !setminus(Set(Vec(Str(n))),Vec("2357")) \\ M. F. Hasler, Jan 13 2012
    
  • PARI
    print1(2); for(d=1,4, forstep(i=1,4^d-1,[1,1,2], p=sum(j=0,d-1,10^j*[2,3,5,7][(i>>(2*j))%4+1]); if(isprime(p), print1(", "p)))) \\ Charles R Greathouse IV, Apr 29 2015
    
  • Python
    from itertools import product
    from sympy import isprime
    A019546_list = [2,3,5,7]+[p for p in (int(''.join(d)+e) for l in range(1,5) for d in product('2357',repeat=l) for e in '37') if isprime(p)] # Chai Wah Wu, Jun 04 2021

Extensions

More terms from Cino Hilliard, Aug 06 2006
Thanks to Charles R Greathouse IV and T. D. Noe for massive editing support.

A020458 Primes that contain digits 2 and 3 only.

Original entry on oeis.org

2, 3, 23, 223, 233, 2333, 3323, 23333, 32233, 32323, 33223, 222323, 232333, 233323, 323233, 323333, 333233, 333323, 2222333, 2223233, 2232323, 2233223, 2332333, 2333323, 3222223, 3223223, 3223333, 3233323, 3233333, 3332233, 3333233, 22222223, 22223323, 22232233
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{2,3},n],PrimeQ],{n,7}]] (* Harvey P. Dale, Jul 13 2012 *)
  • PARI
    go(n)=my(v=List([2]),x,t); for(d=1,n, x=10^d\9*2; forstep(i=1,2^d-1,2, if(ispseudoprime(t=x+fromdigits(binary(i))), listput(v,t)))); Vec(v) \\ Charles R Greathouse IV, Sep 14 2015
    
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def agen(): # generator of terms
        yield from [2, 3]
        for d in count(2):
            for first in product("23", repeat=d-1):
                t = int("".join(first) + "3")
                if isprime(t): yield t
    print(list(islice(agen(), 34))) # Michael S. Branicky, Jun 08 2022

Extensions

Edited by N. J. A. Sloane, Jul 27 2008 at the suggestion of Dmitry Kamenetsky.
Edited by Charles R Greathouse IV, Mar 17 2010

A260378 Primes having only {0, 3, 7} as digits.

Original entry on oeis.org

3, 7, 37, 73, 307, 337, 373, 733, 773, 3037, 3307, 3373, 3733, 7307, 7333, 7703, 30307, 30703, 30707, 30773, 33037, 33073, 33377, 33703, 33773, 37003, 37307, 37337, 70003, 70373, 73037, 73303, 77003, 77377, 77773, 300007, 300073, 300733, 303007, 303073, 303307
Offset: 1

Views

Author

Vincenzo Librandi, Jul 24 2015

Keywords

Comments

A020463 is a subsequence.

Crossrefs

Cf. Primes that contain only the digits (k,3,7): this sequence (k=0), A260379 (k=1), A214704 (k=2), A199347 (k=4), A087363 (k=5), A260380 (k=6), A260381 (k=8), A260382 (k=9).
Subsequence of A155055.

Programs

  • Magma
    [p: p in PrimesUpTo(5*10^5) | Set(Intseq(p)) subset [0, 3, 7]];
  • Mathematica
    Select[Prime[Range[4 10^4]], Complement[IntegerDigits[#],{0, 3, 7}]=={} &]

A260379 Primes having only {1, 3, 7} as digits.

Original entry on oeis.org

3, 7, 11, 13, 17, 31, 37, 71, 73, 113, 131, 137, 173, 311, 313, 317, 331, 337, 373, 733, 773, 1117, 1171, 1373, 1733, 1777, 3137, 3313, 3331, 3371, 3373, 3733, 7177, 7331, 7333, 7717, 11113, 11117, 11131, 11171, 11173, 11177, 11311, 11317, 11717, 11731, 11777
Offset: 1

Views

Author

Vincenzo Librandi, Jul 24 2015

Keywords

Crossrefs

Subsequence of A030096 and A155055. A020451, A020455, and A020463 are subsequences.
Cf. similar sequences listed in A260378.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^4) | Set(Intseq(p)) subset [1, 3, 7]];
  • Mathematica
    Select[Prime[Range[2 10^3]], Complement[IntegerDigits[#], {1, 3, 7}]=={} &]

A260380 Primes having only {3, 6, 7} as digits.

Original entry on oeis.org

3, 7, 37, 67, 73, 337, 367, 373, 673, 677, 733, 773, 3373, 3637, 3673, 3677, 3733, 3767, 6337, 6367, 6373, 6637, 6673, 6733, 6737, 6763, 7333, 7673, 33377, 33637, 33767, 33773, 36373, 36637, 36677, 36767, 37337, 37363, 37633, 37663, 63337, 63367, 63377, 63667
Offset: 1

Views

Author

Vincenzo Librandi, Aug 01 2015

Keywords

Comments

A020463 and A020469 are subsequences.

Crossrefs

Cf. similar sequences listed in A260378.

Programs

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

A260381 Primes having only {3, 7, 8} as digits.

Original entry on oeis.org

3, 7, 37, 73, 83, 337, 373, 383, 733, 773, 787, 877, 883, 887, 3373, 3733, 3833, 3877, 7333, 7873, 7877, 7883, 8377, 8387, 8737, 8783, 8837, 8887, 33377, 33773, 37337, 37783, 38333, 38377, 38737, 38783, 38833, 38873, 73387, 73783, 73877, 73883, 77377, 77383
Offset: 1

Views

Author

Vincenzo Librandi, Aug 01 2015

Keywords

Comments

A020463, A020464 and A020470 are subsequences.

Crossrefs

Cf. similar sequences listed in A260378.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [3, 7, 8]];
  • Mathematica
    Select[Prime[Range[2 10^4]], Complement[IntegerDigits[#], {3, 7, 8}]=={} &]

A260382 Primes having only {3, 7, 9} as digits.

Original entry on oeis.org

3, 7, 37, 73, 79, 97, 337, 373, 379, 397, 733, 739, 773, 797, 937, 977, 997, 3373, 3733, 3739, 3779, 3793, 3797, 7333, 7393, 7793, 7933, 7937, 7993, 9337, 9377, 9397, 9733, 9739, 9973, 33377, 33739, 33773, 33797, 33937, 33997, 37337, 37339, 37379, 37397
Offset: 1

Views

Author

Vincenzo Librandi, Aug 01 2015

Keywords

Comments

A020463 and A020471 are subsequences.

Crossrefs

Cf. similar sequences listed in A260378.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [3,7,9]];
  • Mathematica
    Select[Prime[Range[5*10^3]], Complement[IntegerDigits[#], {3, 7, 9}]=={} &]

A143967 Numbers containing only digits 3 or 7 in decimal representation.

Original entry on oeis.org

3, 7, 33, 37, 73, 77, 333, 337, 373, 377, 733, 737, 773, 777, 3333, 3337, 3373, 3377, 3733, 3737, 3773, 3777, 7333, 7337, 7373, 7377, 7733, 7737, 7773, 7777, 33333, 33337, 33373, 33377, 33733, 33737, 33773, 33777, 37333, 37337, 37373, 37377
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 06 2008

Keywords

Comments

See A020463 for primes.

Crossrefs

Programs

  • Haskell
    a143967 = f 0 . (+ 1) where
       f y 1 = a004086 y
       f y x = f (10 * y + 3 + 4 * r) x' where (x', r) = divMod x 2
    -- Reinhard Zumkeller, Mar 18 2015
  • Mathematica
    Table[FromDigits/@Tuples[{3,7},n],{n,5}]//Flatten (* Harvey P. Dale, Aug 28 2017 *)

Formula

a(n) = f(n+1, 0) with f(n, x) = if n=1 then A004086(x) else f(floor(n/2), 10*x + 3 + 4*(n mod 2)).

A036316 Composite numbers whose prime factors contain no digits other than 3 and 7.

Original entry on oeis.org

9, 21, 27, 49, 63, 81, 111, 147, 189, 219, 243, 259, 333, 343, 441, 511, 567, 657, 729, 777, 999, 1011, 1029, 1119, 1323, 1369, 1533, 1701, 1813, 1971, 2187, 2199, 2319, 2331, 2359, 2401, 2611, 2701, 2997, 3033, 3087, 3357, 3577, 3969, 4107, 4599, 5103
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

All terms are a product of at least two terms of A020463. - David A. Corneth, Oct 09 2020

Crossrefs

Programs

  • Magma
    [n: n in [9..6000] | not IsPrime(n) and forall{f: f in PrimeDivisors(n) | Intseq(f) subset [3,7]}]; // Bruno Berselli, Aug 26 2013
  • Mathematica
    dpfQ[n_]:=Module[{d=Union[Flatten[IntegerDigits/@Transpose[FactorInteger[n]][[1]]]]}, !PrimeQ[n]&&(d == {3}||d == {7}||d == {3, 7})]; Select[Range[6000], dpfQ] (* Vincenzo Librandi, Aug 25 2013 *)

Formula

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

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

Original entry on oeis.org

3, 37, 337, 3373, 33377, 333337, 3333373, 33333373, 333337777, 3333733373, 33333333377, 333333733333, 3333333377377, 33333333373777, 333333333337337, 3333333333373777, 33333333333337337, 333333333333337333
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Showing 1-10 of 11 results. Next