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.

Previous Showing 31-40 of 41 results. Next

A092628 Primes with exactly three nonprime digits.

Original entry on oeis.org

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, 1013, 1021, 1031, 1039, 1051, 1063, 1087, 1093, 1097, 1103, 1117, 1129, 1151, 1163, 1171, 1187, 1193, 1201, 1249, 1289, 1291
Offset: 1

Views

Author

Jani Melik, Apr 11 2004

Keywords

Examples

			101 is prime and it has three nonprime digits, 0 and twice 1;
4261 is prime and it has three nonprime digits, 1, 4 and 6.
		

Crossrefs

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_stnepf:=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))='false') then stpf:=stpf+1; # number of nonprime digits fi od; RETURN(stpf) end: ts_pr_neprnt:=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_stnepf(i) = 3) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_neprnt(5000);
  • Mathematica
    dgQ[n_]:=Count[IntegerDigits[n],?(!PrimeQ[#]&)]==3; Select[Prime[ Range[300]], dgQ] (* _Harvey P. Dale, Oct 11 2011 *)

A108614 Semiprimes with non-semiprimes digits (no digits 4,6,9 in semiprimes).

Original entry on oeis.org

10, 15, 21, 22, 25, 33, 35, 38, 51, 55, 57, 58, 77, 82, 85, 87, 111, 115, 118, 121, 122, 123, 133, 155, 158, 177, 178, 183, 185, 187, 201, 202, 203, 205, 213, 215, 217, 218, 221, 235, 237, 253, 278, 287, 301, 302, 303, 305, 321, 323, 327, 335, 355, 358, 371
Offset: 1

Views

Author

Zak Seidov, Jun 13 2005

Keywords

Comments

Complement of A107342 in the class of semiprimes.
This is to semiprimes A001358 as A034844 (Primes with nonprime digits) is to primes A000040. [Jonathan Vos Post, Jul 15 2010]

Crossrefs

Programs

  • Mathematica
    cnd[n_]:=Plus@@Last/@FactorInteger[n]==2&&Union[FreeQ[IntegerDigits[n], # ]&/@{4, 6, 9}]=={True};Select[Range[600], cnd[ # ]&]

Formula

{j in A001358 and j not in A179463}. [Jonathan Vos Post, Jul 15 2010]

A157527 Primes using only the composite digits (4, 6, 8, 9) and all of them.

Original entry on oeis.org

46489, 46889, 48649, 48869, 64489, 64849, 68449, 68489, 84649, 84869, 88469, 444869, 448969, 449689, 468499, 468869, 468889, 468899, 469849, 486449, 486869, 486949, 488689, 489689, 489869, 496849, 496889, 498469, 498689, 644489, 644869
Offset: 1

Views

Author

Lekraj Beedassy, Mar 02 2009, Mar 03 2009

Keywords

Comments

Subsequence of A051416.
There are no 4-digit terms so each term must have at least one repeating digit. - Harvey P. Dale, Oct 05 2023

Crossrefs

Programs

  • Maple
    a := proc (n) if convert(convert(ithprime(n), base, 10), set) = {4, 6, 8, 9} then ithprime(n) else end if end proc: seq(a(n), n = 1 .. 53000); # Emeric Deutsch, Mar 03 2009
    isA157527 := proc(n) local dgs ; if not isprime(n) then false; else dgs := convert(convert(n,base,10),set) ; if dgs intersect {4,6,8,9} <> {4,6,8,9} then false; elif dgs intersect {0,1,2,3,5,7} <> {} then false; else true; fi; fi; end: for n from 1 to 100000 do p := ithprime(n) ; if isA157527(p) then printf("%d,",p) ; fi; od: # R. J. Mathar, Mar 03 2009
  • Mathematica
    With[{c={4,6,8,9}},Select[Flatten[Table[10 FromDigits/@Tuples[c,n]+9,{n,5}]],PrimeQ[#] && Intersection[c,IntegerDigits[#]]==c&]] (* Harvey P. Dale, Oct 05 2023 *)

Extensions

Corrected and extended by numerous correspondents, Mar 04 2009

A177850 Smallest n-digit emirp with only nonprime digits.

Original entry on oeis.org

149, 1009, 10009, 100049, 1000849, 10000169, 100000891, 1000000009, 10000001041, 100000000669, 1000000000091, 10000000001011, 100000000000469, 1000000000004449, 10000000000001101, 100000000000000049
Offset: 3

Views

Author

Jonathan Vos Post, May 14 2010

Keywords

Comments

Least value of emirps with only nonprime digits (i.e., 0,1,4,6,8,9) A128390, with n digits. This is to primes with nonprime digits (A034844) as smallest n-digit emirp with only prime digits (A177513) is to primes with only prime digits.

Examples

			a(6) = 100049 because all digits {0,1,4,9} are nonprime, and 100049 is prime, and R(100049) = A004086(100049) = 940001 is prime, and there is no smaller 6-digit number meeting these criteria.
		

Crossrefs

Programs

  • Maple
    isA084984 := proc(n) convert(convert(n,base,10),set) ; if % intersect {2,3,5,7} = {} then true; else false; end if; end proc:
    A177850 := proc(n) local a; a := 10^(n-1) ; while not (isA006567(a) and isA084984(a)) do a := nextprime(a) ; end do; if a < 10^n then return a ; else return -1 ; end if; end proc:
    seq(A177850(n),n=3..40) ; # R. J. Mathar, May 24 2010

Extensions

More terms from R. J. Mathar, May 24 2010

A179924 Primes with embedded primes.

Original entry on oeis.org

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, 191, 193, 197, 199, 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

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) > 0. - Reinhard Zumkeller, Jul 19 2011
Is there a prime such that the previous prime is embedded in it? - Ivan N. Ianakiev, Nov 09 2023. Answer from Amiram Eldar: No. If prime(n) is embedded in prime(n+1) then prime(n+1) has at least one digit more than prime(n), so prime(n+1) > 2 * prime(n). But according to Bertrand's postulate, prime(n+1) < 2*prime(n).

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a179924 n = a179924_list !! (n-1)
    a179924_list = map (a000040 . (+ 1)) $ findIndices (> 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@ 68, f@# > 1 &]

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

A323391 Primes containing nonprime digits (from 1 to 9) in their decimal expansion and whose digits are distinct, i.e., consisting of only digits 1, 4, 6, 8, 9.

Original entry on oeis.org

19, 41, 61, 89, 149, 419, 461, 491, 619, 641, 691, 941, 1489, 4691, 4861, 6481, 6491, 6841, 8419, 8461, 8641, 8941, 9461, 14869, 46819, 48619, 49681, 64189, 64891, 68491, 69481, 81649, 84691, 84961, 86491, 98641
Offset: 1

Views

Author

Bernard Schott, Jan 13 2019

Keywords

Comments

There are only 36 terms in this sequence, which is a finite subsequence of A152313.
Two particular examples:
6481 is also the smallest prime formed from the concatenation of two consecutive squares.
81649 is the only prime containing all the nonprime positive digits such that every string of two consecutive digits is a square.

Examples

			14869 is the smallest prime that contains all the nonprime positive digits; 98641 is the largest one.
		

Crossrefs

Subsequence of A152313. Subsequence of A029743. Subsequence of A155024 (with distinct nonprime digits but with 0) and of A034844.
Cf. A029743 (with distinct digits), A124674 (with distinct prime digits), A155045 (with distinct odd digits), A323387 (with distinct square digits), A323578 (with distinct digits for which parity of digits alternates).

Programs

  • Mathematica
    Select[Union@ Flatten@ Map[FromDigits /@ Permutations@ # &, Rest@ Subsets@ {1, 4, 6, 8, 9}], PrimeQ] (* Michael De Vlieger, Jan 19 2019 *)
  • PARI
    isok(p) = isprime(p) && (d=digits(p)) && vecmin(d) && (#Set(d) == #d) && (#select(x->isprime(x), d) == 0); \\ Michel Marcus, Jan 14 2019

A355856 Primes, with at least one prime digit, that remain primes when all of their prime digits are removed.

Original entry on oeis.org

113, 131, 139, 151, 179, 193, 197, 211, 241, 311, 389, 421, 431, 541, 613, 617, 631, 719, 761, 829, 839, 859, 1013, 1021, 1031, 1039, 1051, 1093, 1097, 1123, 1153, 1201, 1213, 1217, 1229, 1231, 1249, 1259, 1279, 1291, 1297, 1301, 1321, 1381, 1399, 1429, 1439, 1459, 1493, 1531, 1549
Offset: 1

Views

Author

Tamas Sandor Nagy, Jul 19 2022

Keywords

Comments

Terms of A034844 that only have nonprime digits are not terms here. - Michel Marcus, Jul 19 2022

Examples

			The prime 179 is a term because when its prime digit 7 is removed, it remains 19, which is still a prime.
The prime 136457911 is a term because when all of its prime digits, 3, 5, and 7 are removed, it remains 164911, which is still a prime.
		

Crossrefs

Programs

  • MATLAB
    function a = A355856( max_prime )
        a = []; p = primes( max_prime );
        for n = 1:length(p)
            s = num2str(p(n));
            s = strrep(s,'2',''); s = strrep(s,'3','');
            s = strrep(s,'5',''); s = strrep(s,'7','');
            m = str2double(s);
            if m > 1
                if isprime(m) && m ~= p(n)
                    a = [a p(n)];
                end
            end
        end
    end % Thomas Scheuerle, Jul 19 2022
    
  • Mathematica
    q[n_] := (r = FromDigits[Select[IntegerDigits[n], ! PrimeQ[#] &]]) != n && PrimeQ[r]; Select[Prime[Range[250]], q] (* Amiram Eldar, Jul 19 2022 *)
  • PARI
    isok(p) = if (isprime(p), my(d=digits(p), v=select(x->(!isprime(x)), d)); (#v != #d) && isprime(fromdigits(v));) \\ Michel Marcus, Jul 19 2022
    
  • Python
    from sympy import isprime
    def ok(n):
        s = str(n)
        if n < 10 or set(s) & set("2357") == set(): return False
        sd = s.translate({ord(c): None for c in "2357"})
        return len(sd) and isprime(int(sd)) and isprime(n)
    print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, Jul 23 2022

A092622 Primes with exactly two prime digits.

Original entry on oeis.org

23, 37, 53, 73, 127, 137, 157, 173, 229, 239, 251, 263, 271, 283, 293, 307, 313, 317, 331, 347, 359, 367, 379, 383, 397, 433, 457, 503, 521, 547, 563, 571, 587, 593, 653, 673, 677, 739, 743, 751, 787, 797, 823, 827, 853, 857, 877, 937, 953, 977, 1033, 1123
Offset: 1

Views

Author

Jani Melik, Apr 11 2004

Keywords

Examples

			23 is prime and it has two prime digits, 2 and 3;
127 is prime and it has two prime digits 2 and 7.
		

Crossrefs

Cf. A034844.

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_prnd:=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) = 2) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_prnd(2500);

Formula

a(n) >> n^1.285

A092623 Primes with exactly three prime digits.

Original entry on oeis.org

223, 227, 233, 257, 277, 337, 353, 373, 523, 557, 577, 727, 733, 757, 773, 1223, 1237, 1277, 1327, 1373, 1523, 1553, 1723, 1733, 1753, 1777, 2027, 2053, 2137, 2153, 2203, 2207, 2213, 2221, 2239, 2243, 2251, 2267, 2287, 2293, 2297, 2339, 2347, 2351, 2371
Offset: 1

Views

Author

Jani Melik, Apr 11 2004

Keywords

Examples

			223 is prime and it has three prime digits 2,2,3;
1237 is prime and it has three prime digits 2,3,7;
		

Crossrefs

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_prnt:=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) = 3) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_prnt(5000);
  • Mathematica
    Select[Prime[Range[400]],Count[IntegerDigits[#],?PrimeQ]==3&] (* _Harvey P. Dale, Dec 27 2011 *)

Formula

a(n) >> x^1.285
Previous Showing 31-40 of 41 results. Next