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

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.

A173766 a(n) = (10^n+11)/3.

Original entry on oeis.org

7, 37, 337, 3337, 33337, 333337, 3333337, 33333337, 333333337, 3333333337, 33333333337, 333333333337, 3333333333337, 33333333333337, 333333333333337, 3333333333333337, 33333333333333337, 333333333333333337, 3333333333333333337, 33333333333333333337
Offset: 1

Views

Author

Vincenzo Librandi, Feb 24 2010

Keywords

Examples

			For n=2, a(2)=10*7-33=37; n=3, a(3)=10*37-33=337; n=4, a(4)=10*337-33=3337.
		

Crossrefs

Cf. A093168.
Cf. A086574, A163449. - Bruno Berselli, Jun 09 2010

Programs

  • Mathematica
    NestList[10#-33&,7,20] (* Harvey P. Dale, Aug 01 2022 *)

Formula

a(n) = 10*a(n-1)-33 (with a(1) = 7).
From Bruno Berselli, Jun 09 2010: (Start)
G.f.: x*(7-40*x)/((1-x)*(1-10*x)).
a(n)-11*a(n-1)+10*a(n-2) = 0 for n>2. (End)

Extensions

I reduced the fraction in the definition to "(10^n+11)/3". The factor 3 was simply irrelevant. - Ivan Panchenko, Jun 05 2010

A099411 Numbers k such that 3*R_k + 4 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

1, 2, 3, 6, 46, 394, 978, 2586, 2811, 2968, 3642, 4827, 4918, 5592, 5706, 10683, 12891, 14118, 74350, 88680, 162138, 279978
Offset: 1

Views

Author

Robert G. Wilson v, Oct 14 2004

Keywords

Comments

Also numbers k such that (10^k + 11)/3 is prime.
a(21) > 10^5. - Robert Price, Nov 02 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 3(10^n - 1)/9 + 4], Print[n]], {n, 10000}]

Formula

a(n) = A056680(n) + 1.

Extensions

a(16)-a(20) from Robert Price, Nov 02 2014
a(21)-a(22) from Kamada data by Tyler Busby, May 03 2024

A056680 Numbers k such that 30*R_k + 7 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

0, 1, 2, 5, 45, 393, 977, 2585, 2810, 2967, 3641, 4826, 4917, 5591, 5705, 10682, 12890, 14117, 74349, 88679
Offset: 1

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Also numbers k such that (10^(k+1)+11)/3 is prime.
a(21) > 10^5. - Robert Price, Nov 02 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[30*(10^n - 1)/9 + 7], Print[n]], {n, 0, 10000}]

Formula

a(n) = A099411(n) - 1. - Robert Price, Nov 02 2014

Extensions

a(16)-a(20) derived from A099411 by Robert Price, Nov 02 2014
Showing 1-4 of 4 results.