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

A217309 Minimal natural number (in decimal representation) with n prime substrings in base-9 representation (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

1, 2, 11, 23, 101, 173, 902, 1562, 1559, 8120, 14032, 14033, 73082, 126290, 604523, 657743, 723269, 1136684, 5918933, 5972147, 10227787, 25051529, 53276231, 54333278, 92071913, 441753767, 479669051, 483743986, 828662228, 3971590751, 4315446629
Offset: 0

Views

Author

Hieronymus Fischer, Nov 22 2012

Keywords

Comments

The sequence is well-defined in that for each n the set of numbers with n prime substrings is not empty. Proof: Define m(0):=1, m(1):=2 and m(n+1):=9*m(n)+2 for n>0. This results in m(n)=2*sum_{j=0..n-1} 9^j = (9^n - 1)/4 or m(n)=1, 2, 22, 222, 2222, 22222, …, (in base-9) for n=0,1,2,3,…. Evidently, for n>0 m(n) has n 2’s and these are the only prime substrings in base-9 representation. This is why every substring of m(n) with more than one digit is a product of two integers > 1 (by definition) and can therefore not be a prime number.
No term is divisible by 9.

Examples

			a(1) = 2 = 2_9, since 2 is the least number with 1 prime substring in base-9 representation.
a(2) = 11 = 12_9, since 11 is the least number with 2 prime substrings in base-9 representation (2_9 and 12_9).
a(3) = 23 = 25_9, since 23 is the least number with 3 prime substrings in base-9 representation (2_9, 3_9, and 23_9).
a(4) = 101 = 122_9, since 101 is the least number with 4 prime substrings in base-9 representation (2 times 2_9, 12_9=11, and 122_9=101).
a(7) = 1562 = 2125_9, since 1562 is the least number with 7 prime substrings in base-9 representation (2 times 2_9, 5_9, 12_9=11, 21_9=19, 25_9=23, and 212_9=173).
		

Crossrefs

Formula

a(n) > 9^floor(sqrt(8*n-7)-1)/2), for n>0.
a(n) <= (9^n - 1)/4, n>0.
a(n+1) <= 9*a(n)+3.

A213302 Smallest number with n nonprime substrings (Version 1: substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

2, 1, 11, 10, 103, 101, 100, 1017, 1011, 1002, 1000, 10037, 10023, 10007, 10002, 10000, 100137, 100073, 100023, 100003, 100002, 100000, 1000313, 1000037, 1000033, 1000023, 1000003, 1000002, 1000000, 10000337, 10000223, 10000137, 10000037, 10000023, 10000013, 10000002, 10000000, 100001733
Offset: 0

Views

Author

Hieronymus Fischer, Aug 26 2012

Keywords

Comments

The sequence is well-defined in that for each n the set of numbers with n nonprime substrings is not empty. Proof: Define m(n)=2*sum_{j=i..k} 10^j, where k=floor((sqrt(8*n+1)-1)/2), i:= n-A000217(k). For n=0,1,2,3,… the m(n) are 2, 22, 20, 222, 220, 200, 2222, 2220, 2200, 2000, 22222, 22220, ... . m(n) has k+1 digits and (k-i+1) 2’s, thus, the number of nonprime substrings of m(n) is ((k+1)*(k+2)/2)-k-1+i=(k*(k+1)/2)+i=n, which proves the statement.
The 3 versions according to A213302 - A213304 are quite different. Example: 1002 has 9 nonprime substrings in version 1 (0, 0, 00, 02, 002, 1, 10 100, 1002), in version 2 there are 6 nonprime substrings (02, 002, 1, 10, 100, 1002) and there are 4 nonprime substrings in version 3 (1, 10, 100, 1002).

Examples

			a(0)=2, since 2 is the least number with zero nonprime substrings.
a(1)=1, since 1 has 1 nonprime substrings.
a(2)=11, since 11 is the least number with 2 nonprime substrings.
a(3)=10, since 10 is the least number with 3 nonprime substrings, these are 1, 0 and 10 (‘0’ will be counted).
		

Crossrefs

Formula

a(n) >= 10^floor((sqrt(8*n-7)-1)/2) for n>0, equality holds if n is a triangular number > 0 (cf. A000217).
a(A000217(n)) = 10^(n-1), n>0.
a(A000217(n)-k) >= 10^(n-1)+k, n>0, 0<=k
a(A000217(n)-1) = 10^(n-1)+2, n>3, provided 10^(n-1)+1 is not a prime (which is proved to be true for all n-1 <= 50000 (cf. A185121) except n-1=16384 and is generally true for n-1 unequal to a power of 2).
a(A000217(n)-k) = 10^(n-1)+p, where p is the minimal number such that 10^(n-1) + p, has k prime substrings, n>0, 0<=k
Min(a(A000217(n)-k-i), 0<=i<=m) <= 10^(n-1)+p, where p is the minimal number with k prime substrings and m is the number of digits of p, and k+m
Min(a(A000217(n)-k-i), 0<=i<=A055642(A035244(k)) <= 10^(n-1)+A035244(k).
a(A000217(n)-k) <= 10^(n-1)+max(p(i), k<=i<=k+m), where p(i) is the minimal number with i prime substrings and m is the number of digits of p(i), and k+m
a(A000217(n)-k) <= 10^(n-1)+max(A035244(i), k<=i<=k+ A055642(i).
a(n) <= A213305(n).

A217102 Minimal number (in decimal representation) with n nonprime substrings in binary representation (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

1, 2, 7, 5, 4, 11, 10, 12, 8, 22, 21, 19, 17, 16, 60, 39, 37, 34, 36, 32, 83, 71, 74, 69, 67, 66, 64, 143, 139, 141, 135, 134, 131, 130, 128, 283, 271, 269, 263, 267, 262, 261, 257, 256, 541, 539, 527, 526, 523, 533, 519, 514, 516, 512, 1055, 1053, 1047, 1067
Offset: 1

Author

Hieronymus Fischer, Dec 12 2012

Keywords

Comments

There are no numbers with zero nonprime substrings in binary representation. For all bases > 2 there is always a number (=2) with zero nonprime substrings (Cf. A217103-A217109, A213302).
If p is a number with k prime substrings and d digits (in binary representation), p even, m>=d, than b := p*2^(m-d) has m*(m+1)/2 - k nonprime substrings, and a(A000217(n)-k) <= b.

Examples

			a(1) = 1, since 1 = 1_2 is the least number with 1 nonprime substring in binary representation.
a(2) = 2, since 2 = 10_2 is the least number with 2 nonprime substrings in binary representation (0 and 1).
a(3) = 7, since 7 = 111_2 is the least number with 3 nonprime substrings in binary representation (3-times 1, the prime substrings are 2-times 11 and 111).
a(10) = 22, since 22 = 10110_2 is the least number with 10 nonprime substrings in binary representation, these are 0, 0, 1, 1, 1, 01, 011, 110, 0110 and 10110 (remember, that substrings with leading zeros are considered to be nonprime).
		

Formula

a(n) >= 2^floor((sqrt(8*n-7)-1)/2) for n>=1, equality holds if n=1 or n+1 is a triangular number (cf. A000217).
a(n) >= 2^floor((sqrt(8*n+1)-1)/2) for n>1, equality holds if n+1 is a triangular number.
a(A000217(n)-1) = 2^(n-1), n>1.
a(A000217(n)-k) >= 2^(n-1) + k-1, 1<=k<=n, n>1.
a(A000217(n)-k) = 2^(n-1) + p, where p is the minimal number >= 0 such that 2^(n-1) + p, has k prime substrings in binary representation, 1<=k<=n, n>1.

A217109 Minimal number (in decimal representation) with n nonprime substrings in base-9 representation (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

2, 1, 12, 9, 83, 84, 81, 748, 740, 731, 729, 6653, 6581, 6563, 6564, 6561, 59222, 59069, 59068, 59051, 59052, 59049, 531614, 531569, 531464, 531460, 531452, 531443, 531441, 4784122, 4783142, 4783147, 4783070, 4782989, 4782971, 4782972, 4782969, 43048283
Offset: 0

Author

Hieronymus Fischer, Dec 12 2012

Keywords

Comments

The sequence is well-defined in that for each n the set of numbers with n nonprime substrings is not empty. Proof: Define m(n):=2*sum_{j=i..k} 9^j, where k:=floor((sqrt(8*n+1)-1)/2), i:= n-A000217(k). For n=0,1,2,3,... the m(n) in base-9 representation are 2, 22, 20, 222, 220, 200, 2222, 2220, 2200, 2000, 22222, 22220, .... m(n) has k+1 digits and (k-i+1) 2’s, thus, the number of nonprime substrings of m(n) is ((k+1)*(k+2)/2)-k-1+i = (k*(k+1)/2)+i = n, which proves the statement.
If p is a number with k prime substrings and d digits (in base-9 representation), m>=d, than b := p*9^(m-d) has m*(m+1)/2 - k nonprime substrings, and a(A000217(n)-k) <= b.

Examples

			a(0) = 2, since 2 = 2_9 is the least number with zero nonprime substrings in base-9 representation.
a(1) = 1, since 1 = 1_9 is the least number with 1 nonprime substring in base-9 representation.
a(2) = 12, since 12 = 13_9 is the least number with 2 nonprime substrings in base-9 representation (1 and 13).
a(3) = 9, since 9 = 10_9 is the least number with 3 nonprime substrings in base-9 representation (0, 1 and 10).
a(4) = 83, since 83 = 102_9 is the least number with 4 nonprime substrings in base-9 representation, these are 0, 1, 10, and 02 (remember, that substrings with leading zeros are considered to be nonprime).
		

Formula

a(n) >= 9^floor((sqrt(8*n-7)-1)/2) for n>0, equality holds if n is a triangular number (cf. A000217).
a(A000217(n)) = 9^(n-1), n>0.
a(A000217(n)-k) >= 9^(n-1) + k, 0<=k0.
a(A000217(n)-k) = 9^(n-1) + p, where p is the minimal number >= 0 such that 9^(n-1) + p, has k prime substrings in base-9 representation, 0<=k0.

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

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]

A062088 Primes with every digit a prime and the sum of the digits a prime.

Original entry on oeis.org

2, 3, 5, 7, 23, 223, 227, 337, 353, 373, 557, 577, 733, 757, 773, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3527, 3727, 5233, 5237, 5273, 5323, 5527, 7237, 7253, 7523, 7723, 7727, 22573, 23327, 25237, 25253, 25523, 27253, 27527, 32233, 32237, 32257
Offset: 1

Author

Amarnath Murthy, Jun 16 2001

Keywords

Examples

			2357 is a prime, each digit is a prime and the sum of digits = 17 is also a prime, so 2357 is a term.
		

Crossrefs

Intersection of A019546 and A046704.

Programs

  • MATLAB
    prim=primes(1000000);
    m=1;
    for u=1:100;
        v=prim(u);
        nc=dec2base(v,10)-'0';
        s=sum(nc);
             if and(isprime(nc)==1,isprime(s)==1)
                 sol(m)=v;
                 m=m+1;
             end
    end
    sol; % Marius A. Burtea, Dec 08 2018
    
  • Mathematica
    aQ[p_] := PrimeQ[p] && Module[{d = IntegerDigits[p]}, PrimeQ[Total[d]] && LengthWhile[d, PrimeQ[#] &] == Length[d]]; Select[Range[33000], aQ] (* Amiram Eldar, Dec 08 2018 *)
  • PARI
    isok(p) = isprime(p) && isprime(sumdigits(p)) && (#select(x->(! isprime(x)), digits(p)) == 0); \\ Michel Marcus, Dec 08 2018
    
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def agen():
        yield from [2, 3, 5, 7]
        for d in count(2):
            for left in product("2357", repeat=d-1):
                for end in "37":
                    ts = "".join(left) + end
                    if isprime(sum(map(int, ts))):
                        t = int(ts)
                        if isprime(t): yield t
    print(list(islice(agen(), 46))) # Michael S. Branicky, Sep 23 2022

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 21 2001

A051416 Primes whose digits are composite; primes having only {4, 6, 8, 9} as digits.

Original entry on oeis.org

89, 449, 499, 4649, 4889, 4969, 4999, 6449, 6469, 6689, 6869, 6899, 6949, 8669, 8689, 8699, 8849, 8969, 8999, 9649, 9689, 9949, 44449, 44699, 46489, 46499, 46649, 46889, 48449, 48649, 48869, 48889, 48989, 49499, 49669, 49999, 64489, 64499, 64849, 64969, 66449
Offset: 1

Author

G. L. Honaker, Jr., Jan 17 2000

Keywords

Comments

Primes formed by using only digits 4, 6, 8, 9. Of course, all the terms of this sequence end with 9. - Bernard Schott, Jan 31 2019

Examples

			89 is the smallest composite-digit prime and also the only composite-digit prime whose digits are distinct. - _Bernard Schott_, Jan 31 2019
		

Crossrefs

Cf. A019546 (with prime digits), A030096 (with odd digits), A061246 (with square digits), A061371 (composite numbers with prime digits).
Subsequence of A061372 and of A152313.

Programs

  • Mathematica
    Select[Prime@Range[6500], Intersection[IntegerDigits[ # ], {0, 1, 2, 3, 5, 7}] == {} & ] (* Ray Chandler, Mar 04 2007 *)
    With[{c = {4, 6, 8, 9}}, Array[Select[Map[FromDigits@ Append[#, 9] &, Tuples[c, {#}]], PrimeQ] &, 4]] // Flatten (* Michael De Vlieger, Feb 02 2019 *)

Extensions

Extended by Ray Chandler, Mar 04 2007

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

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

A214703 Primes having only {2, 3, 5} as digits.

Original entry on oeis.org

2, 3, 5, 23, 53, 223, 233, 353, 523, 2333, 3253, 3323, 3533, 5233, 5323, 5333, 23333, 25253, 25523, 32233, 32323, 32353, 32533, 33223, 33353, 33533, 35323, 35353, 35533, 52223, 52253, 52553, 53233, 53323, 53353, 55333, 222323, 222533, 222553, 223253, 225223
Offset: 1

Author

Vincenzo Librandi, Jul 28 2012

Keywords

Comments

The digits are prime numbers excluding 7.

Crossrefs

Subsequence of A019546.
Cf. A087363 (primes with only prime digits excluding 2).

Programs

  • Magma
    [p: p in PrimesUpTo(300000) | Set(Intseq(p)) subset [2,3,5]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{2,3,5},n],PrimeQ],{n,7}]]
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def agen(): yield from (k for d in count(1) for k in (int("".join(p)) for p in product("235", repeat=d)) if isprime(k))
    print(list(islice(agen(), 41))) # Michael S. Branicky, Dec 04 2022

A214704 Primes that contain only the digits (2, 3, 7).

Original entry on oeis.org

2, 3, 7, 23, 37, 73, 223, 227, 233, 277, 337, 373, 727, 733, 773, 2237, 2273, 2333, 2377, 2777, 3323, 3373, 3727, 3733, 7237, 7333, 7723, 7727, 22273, 22277, 22727, 22777, 23227, 23327, 23333, 23773, 27277, 27337, 27733, 27737, 27773, 32233, 32237, 32323
Offset: 1

Author

Vincenzo Librandi, Jul 28 2012

Keywords

Comments

The digits are prime numbers excluding 5.

Crossrefs

Subsequence of A019546.
Cf. A087363 (primes with only prime digits excluding 2).
Cf. A385776 (main sequence for primes containing three distinct digits).

Programs

  • Magma
    [p: p in PrimesUpTo(80000) | Set(Intseq(p)) subset [2,3,7]];
  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{2,3,7},n],PrimeQ],{n,6}]]
Previous Showing 11-20 of 105 results. Next