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

A084986 Duplicate of A034844.

Original entry on oeis.org

11, 19, 41, 61, 89, 101, 109, 149, 181, 191, 199, 401, 409, 419, 449, 461, 491, 499, 601
Offset: 1

Views

Author

Keywords

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.

A084984 Numbers containing no prime digits.

Original entry on oeis.org

0, 1, 4, 6, 8, 9, 10, 11, 14, 16, 18, 19, 40, 41, 44, 46, 48, 49, 60, 61, 64, 66, 68, 69, 80, 81, 84, 86, 88, 89, 90, 91, 94, 96, 98, 99, 100, 101, 104, 106, 108, 109, 110, 111, 114, 116, 118, 119, 140, 141, 144, 146, 148, 149, 160, 161, 164, 166, 168, 169
Offset: 1

Views

Author

Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 27 2003

Keywords

Comments

Complement of A118950. - Reinhard Zumkeller, Jul 19 2011
If n-1 is represented as a base-6 number (see A007092) according to n-1=d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n)= sum_{j=0..m} c(d(j))*10^j, where c(k)=0,1,4,6,8,9 for k=0..5. - Hieronymus Fischer, May 30 2012

Examples

			166 has digits 1 and 6 and they are nonprime digits.
a(1000) = 8686.
a(10^4) = 118186
a(10^5) = 4090986.
a(10^6) = 66466686.
		

Crossrefs

Programs

  • Haskell
    a084984 n = a084984_list !! (n-1)
    a084984_list = filter (not . any (`elem` "2357") . show ) [0..]
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Magma
    [n: n in [0..169] | forall{d: d in [2,3,5,7] | d notin Set(Intseq(n))}];  // Bruno Berselli, Jul 19 2011
    
  • Mathematica
    npdQ[n_]:=And@@Table[FreeQ[IntegerDigits[n],i],{i,{2,3,5,7}}]; Select[ Range[ 0,200],npdQ] (* Harvey P. Dale, Jul 22 2013 *)
  • PARI
    is(n)=isprime(eval(Vec(Str(n))))==0 \\ Charles R Greathouse IV, Feb 20 2012
    
  • PARI
    my(table=[0,1,4,6,8,9]); \
    a(n) = fromdigits([table[d+1] |d<-digits(n-1,6)]); \\ Kevin Ryde, May 27 2025

Formula

A193238(a(n)) = 0. - Reinhard Zumkeller, Jul 19 2011
a(n) >> n^1.285. - Charles R Greathouse IV, Feb 20 2012
From Hieronymus Fischer, May 30 and Jun 25 2012: (Start)
a(n) = ((2*b_m(n)+1) mod 10 + floor((b_m(n)+4)/5) - floor((b_m(n)+1)/5))*10^m + sum_{j=0..m-1} ((2*b_j(n))) mod 12 + floor(b_j(n)/6) - floor((b_j(n)+1)/6) + floor((b_j(n)+4)/6) - floor((b_j(n)+5)/6)))*10^j, where n>1, b_j(n)) = floor((n-1-6^m)/6^j), m = floor(log_6(n-1)).
Special values:
a(1*6^n+1) = 1*10^n.
a(2*6^n+1) = 4*10^n.
a(3*6^n+1) = 6*10^n.
a(4*6^n+1) = 8*10^n.
a(5*6^n+1) = 9*10^n.
a(2*6^n) = 2*10^n - 1.
a(n) = 10^log_6(n-1) for n=6^k+1, k>0.
Inequalities:
a(n) < 10^log_6(n-1) for 6^k+10.
a(n) > 10^log_6(n-1) for 2*6^k=0.
a(n) <= 4*10^(log_6(n-1)-log_6(2)) = 1.641372618*10^(log_6(n-1)), equality holds for n=2*6^k+1, k>=0.
a(n) > 2*10^(log_6(n-1)-log_6(2)) = 0.820686309*10^(log_6(n-1)).
a(n) = A007092(n-1) iff the digits of A007092(n-1) are 0 or 1, a(n)>A007092(n-1), else.
a(n) >= A202267(n), equality holds if the representation of n-1 as a base-6 number has only digits 0 or 1.
Lower and upper limits:
lim inf a(n)/10^log_6(n) = 2/10^log_6(2) = 0.820686309, for n --> inf.
lim sup a(n)/10^log_6(n) = 4/10^log_6(2) = 1.641372618, for n --> inf.
where 10^log_6(n) = n^1.2850972089...
G.f.: g(x) = (x/(1-x))*sum_{j>=0} 10^j*x^6^j * (1-x^6^j)*((1+x^6^j)^4 + 4(1+2x^6^j) * x^(3*6^j))/(1-x^6^(j+1)).
Also: g(x) = (x/(1-x))*(h_(6,1)(x) + 3*h_(6,2)(x) + 2*h_(6,3)(x) + 2*h_(6,4)(x) + h_(6,5)(x) - 9*h_(6,6)(x)), where h_(6,k)(x) = sum_{j>=0} 10^j*x^(k*6^j)/(1-x^6^(j+1)). (End)
Sum_{n>=2} 1/a(n) = 3.614028405471074989720026361356036456697082276983705341077940360653303099111... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024

Extensions

0 added by N. J. A. Sloane, Feb 02 2009
100 added by Arkadiusz Wesolowski, Mar 10 2011
Examples for n>=10^3 added by Hieronymus Fischer, May 30 2012

A033274 Primes that do not contain any other prime as a proper substring.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 41, 61, 89, 101, 109, 149, 181, 401, 409, 449, 491, 499, 601, 691, 809, 881, 991, 1009, 1049, 1069, 1481, 1609, 1669, 1699, 1801, 4001, 4049, 4481, 4649, 4801, 4909, 4969, 6091, 6469, 6481, 6869, 6949, 8009, 8069, 8081, 8609, 8669, 8681
Offset: 1

Views

Author

Keywords

Comments

If there is more than one digit, all digits must be nonprime numbers.
A179335(n) = prime(n) iff prime(n) is in this sequence. For n > 4, prime(n) is in this sequence iff A109066(n) = 0. - Reinhard Zumkeller, Jul 11 2010, corrected by M. F. Hasler, Aug 27 2012
A079066(n) = 0 iff prime(n) is in this sequence. [Corrected by M. F. Hasler, Aug 27 2012]
What are the asymptotics of this sequence? - Charles R Greathouse IV, Aug 27 2012

Examples

			149 is a term as 1, 4, 9, 14, 49 are all nonprimes.
199 is not a term as 19 is a prime.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a033274 n = a033274_list !! (n-1)
    a033274_list = map (a000040 . (+ 1)) $ elemIndices 0 a079066_list
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Mathematica
    f[n_] := Block[ {id = IntegerDigits@n}, len = Length@ id - 1; Count[ PrimeQ@ Union[ FromDigits@# & /@ Flatten[ Table[ Partition[ id, k, 1], {k, len}], 1]], True] + 1]; Select[ Prime@ Range@ 1100, f@# == 1 &] (* Robert G. Wilson v, Aug 01 2010 *)
    Select[Prime[Range[1100]],NoneTrue[Flatten[Table[FromDigits/@Partition[IntegerDigits[#],d,1],{d,IntegerLength[#]-1}]],PrimeQ]&] (* Harvey P. Dale, Apr 19 2025 *)
  • Python
    from sympy import isprime
    def ok(n):
        if n in {2, 3, 5, 7}: return True
        s = str(n)
        if set(s) & {"2", "3", "5", "7"} or not isprime(n): return False
        ss2 = set(s[i:i+l] for i in range(len(s)-1) for l in range(2, len(s)))
        return not any(isprime(int(ss)) for ss in ss2)
    print([k for k in range(9000) if ok(k)]) # Michael S. Branicky, Jun 29 2022

Extensions

Edited by N. J. A. Sloane at the suggestion of Luca Colucci, Apr 03 2008

A092621 Primes with exactly one prime digit.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 29, 31, 43, 47, 59, 67, 71, 79, 83, 97, 103, 107, 113, 131, 139, 151, 163, 167, 179, 193, 197, 211, 241, 269, 281, 311, 349, 389, 421, 431, 439, 443, 463, 467, 479, 487, 509, 541, 569, 599, 607, 613, 617, 631, 643, 647, 659, 683, 701, 709
Offset: 1

Views

Author

Jani Melik, Apr 11 2004

Keywords

Examples

			13 is prime and it has one prime digit, 3;
103 is prime and it has one prime digit, 3.
		

Crossrefs

Cf. A239037 (prime digit in A092621(n)). - Zak Seidov, Mar 10 2014

Programs

  • Maple
    stev_sez:=proc(n) local i, tren, st, ans, anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i,ans) ]; od; RETURN(anstren); end: ts_stpf:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i,ans))='true') then stpf:=stpf+1; # number of prime digits fi od; RETURN(stpf) end: ts_pr_prn:=proc(n) local i, stpf, ans, ans1, tren; ans:=[ ]: stpf:=0: tren:=1: for i from 1 to n do if ( isprime(i)='true' and ts_stpf(i) = 1) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_prn(1000);
  • Mathematica
    podQ[n_]:=(1==Length@Select[IntegerDigits[n],PrimeQ]);Select[Prime[Range[250]],podQ](* Zak Seidov *)
  • PARI
    isok(n) = isprime(n) && (d = digits(n)) && (sum(i=1, #d, isprime(d[i])) == 1); \\ Michel Marcus, Mar 10 2014
  • Sage
    A092621 = list(p for p in primes(1000) if len([d for d in p.digits() if is_prime(d)]) == 1)
    

Formula

a(n) >> n^1.28 because of the digit restriction

A179909 Primes with only one embedded prime.

Original entry on oeis.org

13, 17, 29, 31, 43, 47, 59, 67, 71, 79, 83, 97, 103, 107, 151, 163, 191, 199, 269, 281, 349, 421, 461, 463, 487, 509, 569, 607, 641, 661, 701, 709, 769, 787, 811, 821, 863, 877, 887, 907, 911, 919, 941, 1021, 1051, 1061, 1063, 1087, 1091, 1201, 1249, 1409
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 1.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179909 n = a179909_list !! (n-1)
    a179909_list = map (a000040 . (+ 1)) $ elemIndices 1 a079066_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Mathematica
    f[n_] := Block[ {id = IntegerDigits@n}, len = Length@ id - 1; Count[ PrimeQ@ Union[ FromDigits@# & /@ Flatten[ Table[ Partition[ id, k, 1], {k, len}], 1]], True] + 1]; Select[ Prime@ Range@ 230, f@# == 2 &]

A179919 Primes with eleven embedded primes.

Original entry on oeis.org

111317, 113177, 113537, 113719, 113731, 117193, 117331, 121379, 123733, 129719, 131797, 132173, 132971, 136733, 136739, 137197, 137321, 137339, 137353, 137359, 137393, 137573, 152311, 172313, 173137, 173359, 174311, 193373, 211319, 213799
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 11.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179919 n = a179919_list !! (n-1)
    a179919_list = map (a000040 . (+ 1)) $ elemIndices 11 a079066_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Mathematica
    f[n_] := Block[ {id = IntegerDigits@n}, len = Length@ id - 1; Count[ PrimeQ@ Union[ FromDigits@# & /@ Flatten[ Table[ Partition[ id, k, 1], {k, len}], 1]], True] + 1]; Select[ Prime@ Range@ 19110, f@# == 12 &]

A109066 Number of prime digits in n-th prime.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 0, 2, 1, 1, 2, 0, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 1, 2, 1, 0, 0, 1, 1, 0, 1, 3, 3, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 1, 3, 2, 2, 3, 2, 2, 1, 2, 0, 0, 0, 1, 1, 2, 1, 1, 0, 2, 0, 1, 1, 1, 1, 0, 0, 2, 1, 2, 3, 1, 2, 3, 2, 1, 2
Offset: 1

Views

Author

Zak Seidov, Jun 17 2005

Keywords

Comments

The prime A000040(n) is in A034844 iff a(n) = 0; it is in A179336 iff a(n) > 0. [Reinhard Zumkeller, Jul 11 2010, corrected by M. F. Hasler, Aug 27 2012]

Crossrefs

Cf. A019546 (primes whose digits are primes), A092629 (number of prime digits is nonprime), A104250 (sum of prime digits of n-th prime).

Programs

  • Mathematica
    a[n_]:=Count[PrimeQ/@IntegerDigits[Prime[n]], True]
  • PARI
    a(n) = vecsum(apply(x->isprime(x), digits(prime(n)))); \\ Michel Marcus, Mar 15 2019

Formula

a(n) = A193238(A000040(n)). [Reinhard Zumkeller, Jul 19 2011]

A179336 Primes containing at least one prime digit in base 10.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 23, 29, 31, 37, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 103, 107, 113, 127, 131, 137, 139, 151, 157, 163, 167, 173, 179, 193, 197, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 11 2010

Keywords

Comments

a(n) = A080608(n) for n<28; A080608 is a subsequence;
A179335(n) < 10 iff prime(n) is in this sequence;
A109066(n) > 0 iff prime(n) is in this sequence. [Corrected by M. F. Hasler, Aug 27 2012]

Crossrefs

Intersection of A118950 and A000040; relative complement A000040 \ A034844.

Programs

  • Haskell
    a179336 n = a179336_list !! (n-1)
    a179336_list = filter (any (`elem` "2357") . show ) a000040_list
    -- Reinhard Zumkeller, Jul 19 2011

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Nov 01 2022

A152313 Primes without 0's or primes in their decimal expansion.

Original entry on oeis.org

11, 19, 41, 61, 89, 149, 181, 191, 199, 419, 449, 461, 491, 499, 619, 641, 661, 691, 811, 881, 911, 919, 941, 991, 1181, 1481, 1489, 1499, 1619, 1669, 1699, 1811, 1861, 1889, 1949, 1999, 4111, 4441, 4481, 4649, 4691, 4861, 4889, 4919, 4969, 4999
Offset: 1

Views

Author

Omar E. Pol, Dec 02 2008

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | Set(Intseq(p))  subset [1,4,6,8,9]]; // Vincenzo Librandi, Oct 25 2016
  • Maple
    F:= proc(d) local T, R, L, r;
       R:= NULL;
       T:= combinat:-cartprod([[1,4,6,8,9]$d]);
       while not T[finished] do
         L:= T[nextvalue]();
         r:= add(L[i]*10^(d-i),i=1..d);
         if isprime(r) then R:= R,r fi
       od;
    R
    end proc:
    seq(F(d),d=2..5); # Robert Israel, Dec 07 2017
  • Mathematica
    Select[Prime[Range[800]], Complement[IntegerDigits[#], {1, 4, 6, 8, 9}] == {} &] (* Vincenzo Librandi, Oct 25 2016 *)
Showing 1-10 of 41 results. Next