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.

A034844 Primes with only nonprime decimal digits.

Original entry on oeis.org

11, 19, 41, 61, 89, 101, 109, 149, 181, 191, 199, 401, 409, 419, 449, 461, 491, 499, 601, 619, 641, 661, 691, 809, 811, 881, 911, 919, 941, 991, 1009, 1019, 1049, 1061, 1069, 1091, 1109, 1181, 1409, 1481, 1489, 1499, 1601, 1609, 1619, 1669, 1699, 1801, 1811
Offset: 1

Views

Author

Keywords

Comments

A109066(n) = 0 iff prime(n) is in this sequence. [Reinhard Zumkeller, Jul 11 2010, corrected by M. F. Hasler, Aug 27 2012]
Or, primes p such that A193238(p) = 0. - M. F. Hasler, Aug 27 2012
Intersection of A084984 and A000040; complement of A179336 (within the primes A000040). [Reinhard Zumkeller, Jul 19 2011, edited by M. F. Hasler, Aug 27 2012]
The smallest prime that contains all the six nonprime decimal digits is a(694) = 104869 (see Prime Curios! link). - Bernard Schott, Mar 21 2023

Examples

			E.g. 149 is a prime made of nonprime digits(1,4,9).
991 is a prime without any prime digits.
		

Crossrefs

Programs

  • Haskell
    a034844 n = a034844_list !! (n-1)
    a034844_list = filter (not . any  (`elem` "2357") . show ) a000040_list
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Magma
    [p: p in PrimesUpTo(2000) | forall{d: d in [2,3,5,7] | d notin Set(Intseq(p))}];  // Bruno Berselli, Jul 27 2011
    
  • Mathematica
    Select[Prime[Range[279]], Intersection[IntegerDigits[#], {2, 3, 5, 7}] == {} &] (* Jayanta Basu, Apr 18 2013 *)
    Union[Select[Flatten[Table[FromDigits/@Tuples[{1,4,6,8,9,0},n],{n,2,4}]],PrimeQ]] (* Harvey P. Dale, Dec 08 2014 *)
  • PARI
    is_A034844(n)=isprime(n)&!apply(x->isprime(x),eval(Vec(Str(n)))) \\ M. F. Hasler, Aug 27 2012
    
  • PARI
    is_A034844(n)=isprime(n)&!setintersect(Set(Vec(Str(n))),Vec("2357")) \\ M. F. Hasler, Aug 27 2012
    
  • Python
    from sympy import isprime
    from itertools import product
    def auptod(maxdigits):
        alst = []
        for d in range(1, maxdigits+1):
            for p in product("014689", repeat=d-1):
                if d > 1 and p[0] == "0": continue
                for end in "19":
                    s = "".join(p) + end
                    t = int(s)
                    if isprime(t): alst.append(t)
        return alst
    print(auptod(4)) # Michael S. Branicky, Nov 19 2021

Formula

a(n) >> n^1.285. [Charles R Greathouse IV, Feb 20 2012]

Extensions

Edited by N. J. A. Sloane, Feb 22 2009 at the suggestion of R. J. Mathar

A141033 Numbers that cannot be formed by the concatenation of previous terms.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 100, 101, 121, 131, 141, 151, 161, 171, 181, 191, 200, 202, 212, 232, 242, 252, 262, 272, 282, 292, 300, 303, 313, 323, 343, 353, 363, 373, 383, 393, 400, 404
Offset: 1

Views

Author

Paolo P. Lava and Giorgio Balzarotti, Jul 30 2008, Aug 04 2008

Keywords

Comments

Previous terms can appear in any order but can be used at most once. - Paolo P. Lava, Mar 04 2010

Examples

			465 is not in the sequence because 4 U 6 U 5 -> 465;
466 is not in the sequence because 4 U 66 -> 466;
1313 is not in the sequence because 1 U 313 or 131 U 3 -> 1313.
		

Crossrefs

Cf. A141409.

Extensions

Corrected by Paolo P. Lava, Mar 03 2010

A215927 Primes having at least one digit that is not prime.

Original entry on oeis.org

11, 13, 17, 19, 29, 31, 41, 43, 47, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 229, 239, 241, 251, 263, 269, 271, 281, 283, 293, 307, 311, 313, 317, 331, 347
Offset: 1

Views

Author

Luca Brigada Villa, Aug 27 2012

Keywords

Comments

Complement of A019546 within the primes A000040.

Examples

			19 is in the sequence because neither of its two digits is prime, 1 being a unit and 9 being the square of 3.
23 is not in the sequence because both 2 and 3 are prime.
29 is in the sequence because 9 is not prime (though 2 is).
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(500) | not Set(Intseq(p)) subset [2,3,5,7]]; // Vincenzo Librandi Oct 25 2016
  • Mathematica
    Select[Prime[Range[100]], Complement[IntegerDigits[#], {2, 3, 5, 7}] != {} &] (* Alonso del Arte, Aug 27 2012 *)
  • PARI
    is_A215927(n)=isprime(n)&apply(x->!isprime(x),eval(Vec(Str(n)))) \\ - M. F. Hasler, Aug 27 2012
    

Extensions

a(55) corrected by Vincenzo Librandi, Oct 25 2016

A238647 Primes which are not the concatenation of two primes.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 47, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 127, 131, 139, 149, 151, 157, 163, 167, 179, 181, 191, 199, 227, 239, 251, 257, 263, 269, 277, 281, 307, 349, 401, 409, 419, 421, 431, 439, 443, 449, 457, 461
Offset: 1

Views

Author

Colin Barker, Mar 02 2014

Keywords

Comments

223 is the first term in A141409 which is not in this sequence.
In this sequence, a prime preceded by one or more zeros is not considered to be a prime.

Examples

			59 is in the sequence because 5 is prime but 9 is not prime.
223 is not in the sequence because both 2 and 23 are primes.
		

Crossrefs

Cf. A141409, A105184 (complement), A238056, A238057, A238499.

A348358 Primes which are not the concatenation of smaller primes (in base 10 and allowing leading 0's).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 47, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 127, 131, 139, 149, 151, 157, 163, 167, 179, 181, 191, 199, 239, 251, 263, 269, 281, 349, 401, 409, 419, 421, 431, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499
Offset: 1

Views

Author

M. Farrokhi D. G., Oct 14 2021

Keywords

Comments

This is the sequence of numbers that are neither a product of smaller primes nor a concatenation of smaller primes (in base 10).
This sequence differs from A238647. The prime 227 is in A238647 but not in this sequence for it is the concatenation of primes 2, 2, 7 (in base 10).
Conjecture. If p > 7 is a prime, then there exists a base b such that p in base b is the concatenation of smaller primes in base b.

Examples

			The prime 127 is in the sequence because the only expressions of 127 as concatenation of smaller numbers are 1 U 2 U 7, 1 U 27, and 12 U 7 (in base 10) but 1 and 12 are not primes.
The prime 271 is not in the sequence because it is the concatenation of primes 2 and 71 (in base 10).
The prime 307 is not in the sequence because it is the concatenation of primes 3 and 07 (in base 10).
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@Range@100,Union[And@@@PrimeQ[FromDigits/@#&/@Union@Select[Flatten[Permutations/@Subsets[Most@Rest@Subsequences[d=IntegerDigits@#]],1],Flatten@#==d&]]]=={False}||Length@d==1&] (* Giorgos Kalogeropoulos, Oct 15 2021 *)
  • Python
    from sympy import isprime, primerange
    def cond(n): # n is not a concatenation of smaller primes
        if n%10 in {4, 6, 8}: return True
        d = str(n)
        for i in range(1, len(d)):
            if isprime(int(d[:i])):
                 if isprime(int(d[i:])) or not cond(int(d[i:])):
                     return False
        return True
    def aupto(lim): return [p for p in primerange(2, lim+1) if cond(p)]
    print(aupto(490)) # Michael S. Branicky, Oct 15 2021
Showing 1-5 of 5 results.