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 51-60 of 103 results. Next

A155088 Numbers n such that n and prime(n) contain prime digits only.

Original entry on oeis.org

2, 3, 55, 332, 352, 375, 733, 3573, 3575, 7235, 22222, 22223, 22322, 252323, 252335, 253777, 255225, 372755, 372772, 522532, 523255, 525737, 2275325, 2275327, 2275337, 2277333, 2277337, 3325772, 27727257, 27727277, 27727732, 27737332, 27737722, 27737723
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 20 2009

Keywords

Comments

Indices n such that A045532(n) is in A046034. [R. J. Mathar, May 05 2010]

Examples

			352 is in the sequence since 352 and prime(352) = 2377 use only prime digits (2, 3, 5, 7). For more examples see Links.
		

Crossrefs

Programs

  • Mathematica
    pQ[n_] := Union[IntegerDigits@n, {2,3,5,7}] == {2,3,5,7}; Select[Range[10^5], pQ@# && pQ@Prime@# &] (* Giovanni Resta, Mar 11 2013 *)
    Select[Flatten[Table[FromDigits/@Tuples[{2,3,5,7},n],{n,8}]],AllTrue[ IntegerDigits[Prime[#]],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 24 2015 *)

Extensions

Corrected (332, 352, 375 inserted) by R. J. Mathar, May 05 2010
a(11)-a(34) from Giovanni Resta, Mar 11 2013

A213299 Partial sums of A211681.

Original entry on oeis.org

2, 5, 10, 17, 40, 77, 130, 203, 440, 813, 1350, 2087, 4460, 8197, 13570, 20943, 44680, 82053, 135790, 209527, 446900, 820637, 1358010, 2095383, 4469120, 8206493, 13580230, 20953967, 44691340
Offset: 1

Views

Author

Hieronymus Fischer, Jun 08 2012

Keywords

Comments

The terms are primes for n = 1, 2, 4, 12, 22, 32 and possibly further n’s (Question).

Crossrefs

Formula

a(n) = ((3982 + 2709*k + 567*k^2 + 54*k^3)*10^m - 1980*m - 2200 - 495*k + 162*((n+1) mod 2) * (-1)^m * (-1)^floor(n/2))/891, where m=floor((n-1)/4), k=(n-1) mod 4.
G.f.: (2*x*(1+x^10) + 3*x^2*(1 + x^3 + x^5 + x^6) + 5*x^3*(1+x^6) + 7*x^4*(1+x^2))/((1-x)*(1-10*x^4)*(1-x^8)).
From Chai Wah Wu, Feb 08 2023: (Start)
a(n) = 2*a(n-1) - a(n-2) + 9*a(n-4) - 18*a(n-5) + 9*a(n-6) + 10*a(n-8) - 20*a(n-9) + 10*a(n-10) for n > 10.
G.f.: x*(-2*x^7 + 2*x^6 - 5*x^5 + 2*x^4 - 2*x^3 - 2*x^2 - x - 2)/((x - 1)^2*(x^4 + 1)*(10*x^4 - 1)). (End)

Extensions

Typo in g.f. corrected by Hieronymus Fischer, Sep 03 2012

A213301 Largest prime with n nonprime substrings (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

373, 3797, 37337, 37397, 373379, 831373, 973373, 3733739, 8313733, 9973331, 9721373, 52313797, 73313797, 97337333, 99793373, 373373977, 831373379, 799733317, 974313797, 991733137, 7331337337, 3797193373, 9719337973, 9917331373, 9793733797, 9974331373
Offset: 0

Views

Author

Hieronymus Fischer, Aug 26 2012

Keywords

Examples

			a(0)=373, since 373 is the greatest prime such that all substrings are prime, hence it is the maximal prime with 0 nonprime substrings.
a(3)= 37397, since the nonprime substrings of 37337 are 9, 39 and 7397, and all greater primes have > 3 nonprime substrings.
		

Crossrefs

A213305 Minimal prime with n nonprime substrings (Version 1: substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

2, 13, 11, 127, 103, 101, 1013, 1019, 1021, 1009, 10177, 10037, 10067, 10007, 10009, 100237, 100271, 100153, 100043, 100003, 100049, 1001173, 1000313, 1000037, 1000033, 1000039, 1000003, 1000081, 10000379, 10001237, 10000223
Offset: 0

Views

Author

Hieronymus Fischer, Aug 26 2012

Keywords

Examples

			a(0) = 2, since 2 is the least prime with zero nonprime substrings.
a(1) = 13, since 13 is the least prime with exactly 1 (“1”) nonprime substrings.
a(2) = 11, since 11 is the least prime with exactly 2 (“1” and “1”) nonprime substrings.
		

Crossrefs

Formula

a(n) > 10^floor((sqrt(8*n+1)-1)/2) for n>0.
a(m(m+1)/2) > 10^m, m>0.
a(n) >= A213302(n).

A213320 Numbers such that the number of nonprime substrings equals the number of digits (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

1, 4, 6, 8, 9, 11, 12, 15, 19, 20, 21, 24, 26, 28, 30, 34, 36, 38, 39, 41, 42, 45, 50, 51, 54, 56, 58, 61, 62, 63, 65, 70, 74, 76, 78, 82, 85, 87, 89, 92, 93, 95, 117, 123, 127, 132, 133, 135, 139, 153, 157, 167, 171, 172, 175
Offset: 1

Views

Author

Hieronymus Fischer, Aug 26 2012

Keywords

Comments

Also numbers such that the number of prime substrings is A000217(m-1) = m(m-1)/2, where m is the number of digits.
The sequence is finite. Proof: Let p be a number >= 10^17 and let m = 9k+j be the number of digits of p, where k = floor(m/9) >= 2 and j = m mod 9. Since each 9-digit number has at least 15 nonprime substrings, it follows that p has at least 15k = 9k + 6k > 9k + j = m nonprime substrings (since 6k >= 12> j for k >= 2). Consequently, no number >= 10^17 can be a term of the sequence.
The last term is a(858)=3733739. Proof: Each 9-digit number has at least 15 nonprime substrings, thus, the numbers 10^8 <= p < 10^14 also have at least 15 nonprime substrings and therefore cannot be terms of the sequence. Same is true for numbers 10^14 <= p < 10^17 since each 6-digit number has at least 4 nonprime substrings, and thus each number with >= 15 digits has at least 15+4 = 19 nonprime substrings. Since each 8-digit number has at least 10 nonprime substrings, it follows that the last term of the sequence must be less than 10^7. By direct search we find a(858) = 3733739.

Examples

			a(1) = 1, since 1 has 1 nonprime substrings.
a(43) = 117, since 117 has 3 digits and also 3 nonprime substrings (1, 1, 117).
		

Crossrefs

Extensions

Typo in example corrected, Hieronymus Fischer, Sep 11 2012

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

Original entry on oeis.org

2, 1, 5, 4, 19, 17, 16, 75, 67, 66, 64, 269, 263, 266, 257, 256, 1053, 1031, 1035, 1029, 1026, 1024, 4125, 4119, 4123, 4107, 4099, 4098, 4096, 16479, 16427, 16431, 16407, 16395, 16391, 16386, 16384, 65709, 65629, 65579, 65581, 65559, 65543, 65539, 65537, 65536
Offset: 0

Views

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} 4^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-4 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-4 representation), m>=d, than b := p*4^(m-d) has m*(m+1)/2 - k nonprime substrings, and a(A000217(n)-k) <= b.

Examples

			a(0) = 2, since 2 = 2_4 is the least number with zero nonprime substrings in base-4 representation.
a(1) = 1, since 1 = 1_4 is the least number with 1 nonprime substring in base-4 representation.
a(2) = 5, since 5 = 11_4 is the least number with 2 nonprime substrings in base-4 representation (these are 2-times 1).
a(3) = 4, since 4 = 10_4 is the least number with 3 nonprime substrings in base-4 representation (these are 0, 1 and 10).
a(4) = 19, since 19 = 103_4 is the least number with 4 nonprime substrings in base-4 representation, these are 0, 1, 10, and 03 (remember, that substrings with leading zeros are considered to be nonprime).
a(7) = 75, since 75 = 1023_4 is the least number with 7 nonprime substrings in base-4 representation, these are 0, 1, 10, 02, 023, 102 and 1023 (remember, that substrings with leading zeros are considered to be nonprime: 2_4 = 2, 3_4 = 3 and 23_4 = 11 are the only base-4 prime substrings of 75).
		

Crossrefs

Formula

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

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

Original entry on oeis.org

2, 1, 5, 6, 27, 25, 34, 127, 128, 125, 170, 636, 632, 627, 625, 850, 3162, 3137, 3132, 3127, 3125, 4250, 15686, 15661, 15638, 15632, 15627, 15625, 21250, 78192, 78163, 78162, 78137, 78132, 78127, 78125, 106250, 390818, 390692, 390686, 390662, 390638, 390632
Offset: 0

Views

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} 5^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-5 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-5 representation), p != 1 (mod 5), m>=d, than b := p*5^(m-d) has m*(m+1)/2 - k nonprime substrings, and a(A000217(n)-k) <= b.

Examples

			a(0) = 2, since 2 = 2_5 is the least number with zero nonprime substrings in base-4 representation.
a(1) = 1, since 1 = 1_5 is the least number with 1 nonprime substring in base-5 representation.
a(2) = 5, since 5 = 10_5 is the least number with 2 nonprime substrings in base-5 representation (0 and 1).
a(3) = 6, since 6 = 11_5 is the least number with 3 nonprime substrings in base-5 representation (2-times 1 and 11).
a(4) = 27, since 27 = 102_5 is the least number with 4 nonprime substrings in base-5 representation, these are 0, 1, 02, and 102 (remember, that substrings with leading zeros are considered to be nonprime).
a(6) = 34, since 34 = 114_5 is the least number with 6 nonprime substrings in base-5 representation, these are 1, 1, 4, 11, 14, and 114.
		

Crossrefs

Formula

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

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

Original entry on oeis.org

2, 1, 7, 6, 41, 37, 36, 223, 224, 218, 216, 1319, 1307, 1301, 1297, 1296, 7829, 7793, 7787, 7783, 7778, 7776, 46703, 46709, 46679, 46673, 46663, 46658, 46656, 280205, 280075, 279983, 279979, 279949, 279941, 279938, 279936, 1679879, 1679807, 1679699, 1679669
Offset: 0

Views

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} 6^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-6 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-6 representation), m>=d, than b := p*6^(m-d) has m*(m+1)/2 - k nonprime substrings, and a(A000217(n)-k) <= b.

Examples

			a(0) = 2, since 2 = 2_6 is the least number with zero nonprime substrings in base-6 representation.
a(1) = 1, since 1 = 1_6 is the least number with 1 nonprime substring in base-6 representation.
a(2) = 7, since 7 = 11_6 is the least number with 2 nonprime substrings in base-6 representation (1 and 1).
a(3) = 6, since 6 = 10_6 is the least number with 3 nonprime substrings in base-6 representation (0, 1 and 10).
a(4) = 41, since 41 = 105_6 is the least number with 4 nonprime substrings in base-6 representation, these are 0, 1, 10, and 05 (remember, that substrings with leading zeros are considered to be nonprime).
		

Crossrefs

Formula

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

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

Original entry on oeis.org

2, 1, 7, 8, 51, 49, 57, 353, 345, 343, 400, 2417, 2411, 2403, 2401, 9604, 16880, 16823, 16829, 16809, 16807, 67228, 117763, 117721, 117666, 117659, 117651, 117649, 470596, 823709, 823664, 823615, 823560, 823553, 823545, 823543, 3294172, 5765310, 5765063
Offset: 0

Views

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} 7^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-7 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-7 representation), p != 1 (mod 7), m>=d, than b := p*7^(m-d) has m*(m+1)/2 - k nonprime substrings, and a(A000217(n)-k) <= b.

Examples

			a(0) = 2, since 2 = 2_7 is the least number with zero nonprime substrings in base-7 representation.
a(1) = 1, since 1 = 1_7 is the least number with 1 nonprime substring in base-7 representation.
a(2) = 7, since 7 = 10_7 is the least number with 2 nonprime substrings in base-7 representation (these are 0 and 1).
a(3) = 8, since 8 = 11_7 is the least number with 3 nonprime substrings in base-7 representation (1, 1 and 11).
a(4) = 51, since 51 = 102_7 is the least number with 4 nonprime substrings in base-7 representation, these are 0, 1, 02, and 102 (remember, that substrings with leading zeros are considered to be nonprime).
		

Crossrefs

Formula

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

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

Original entry on oeis.org

2, 1, 10, 8, 67, 66, 64, 523, 525, 514, 512, 4127, 4115, 4099, 4098, 4096, 32797, 32799, 32779, 32771, 32770, 32768, 262237, 262239, 262173, 262163, 262147, 262146, 262144, 2097391, 2097259, 2097211, 2097181, 2097169, 2097163, 2097154, 2097152, 16777695
Offset: 0

Views

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} 8^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-8 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-8 representation), m>=d, than b := p*8^(m-d) has m*(m+1)/2 - k nonprime substrings, and a(A000217(n)-k) <= b.

Examples

			a(0) = 2, since 2 = 2_8 is the least number with zero nonprime substrings in base-8 representation.
a(1) = 1, since 1 = 1_8 is the least number with 1 nonprime substring in base-8 representation.
a(2) = 10, since 10 = 12_8 is the least number with 2 nonprime substrings in base-8 representation (1 and 12).
a(3) = 8, since 8 = 10_8 is the least number with 3 nonprime substrings in base-8 representation (0, 1 and 10).
a(4) = 67, since 67 = 103_8 is the least number with 4 nonprime substrings in base-8 representation, these are 0, 1, 10, and 03 (remember, that substrings with leading zeros are considered to be nonprime).
		

Crossrefs

Formula

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