Displaying 1-10 of 59 results found.
Difference between first prime > 10^n ( A003617) and 10^n.
+20
28
1, 1, 1, 9, 7, 3, 3, 19, 7, 7, 19, 3, 39, 37, 31, 37, 61, 3, 3, 51, 39, 117, 9, 117, 7, 13, 67, 103, 331, 319, 57, 33, 49, 61, 193, 69, 67, 43, 133, 3, 121, 109, 63, 57, 31, 9, 121, 33, 193, 9, 151, 121, 327, 171, 31, 21, 3, 279, 159, 19, 7, 93, 447, 121, 57, 49, 49, 49, 99, 9
REFERENCES
O'Hara, J. Rec. Math., 22 (1990), Table on page 278.
LINKS
Eric Weisstein's World of Mathematics, Next Prime.
EXAMPLE
The 23rd term is 117 since 10^23 + 117 = 100000000000000000000117 is prime and all of 100000000.., 100000....001, 1000...002 up through 1000...000116 are composite.
MATHEMATICA
f[n_]:=Module[{x=10^n}, NextPrime[x]-x]; f/@Range[0, 75] (* Harvey P. Dale, Mar 30 2011 *)
AUTHOR
Vasiliy Danilov (danilovv(AT)usa.net)
Constant whose decimal expansion is the concatenation of the smallest n-digit prime A003617(n), for n = 1, 2, 3, ...
+20
7
2, 1, 1, 1, 0, 1, 1, 0, 0, 9, 1, 0, 0, 0, 7, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 1, 9, 1, 0, 0, 0, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 7, 1, 0, 0, 0
COMMENTS
The terms of sequence A215641 converge to this sequence of digits, and to this constant, up to powers of 10.
FORMULA
c = 0.21110110091000710000310000031000001910000000710000000071000000001...
= Sum_{k >= 1} 10^(-k(k+1)/2)*nextprime(10^(k-1))
a(-n(n+1)/2) = 1 for all n >= 2, followed by increasingly more zeros.
EXAMPLE
The smallest prime with 1, 2, 3, 4, ... digits is, respectively, 2, 11, 101, 1009, .... Here we list the sequence of digits of these numbers: 2: 1, 1; 1, 0, 1; 1, 0, 0, 9; ...
This can be considered, as for the Champernowne and Copeland-Erdős constants, as the decimal expansion of a real constant 0.2111011009...
MATHEMATICA
Flatten[Table[IntegerDigits[NextPrime[10^n]], {n, 0, 20}]] (* Harvey P. Dale, Mar 29 2024 *)
PROG
(PARI) concat([digits(nextprime(10^k))|k<-[0..14]]) \\ as seq. of digits
c(N=20)=sum(k=1, N, .1^(k*(k+1)/2)*nextprime(10^(k-1))) \\ as constant
CROSSREFS
Cf. A003617 (smallest n-digit prime), A215641 (has this as "limit"), A340206 (same for squares, limit of A215689), A340207 (similar, with largest n-digit squares, limit of A339978), A340208 (same for cubes, limit of A215692), A340209 (same with largest n-digit cube, limit of A340115), A340221 (same for semiprimes, limit of A215647).
0, 0, 0, 8, 6, 2, 2, 18, 6, 6, 18, 2, 38, 36, 30, 36, 60, 2, 2, 50, 38, 116, 8, 116, 6, 12, 66, 102, 330, 318, 56, 32, 48, 60, 192, 68, 66, 42, 132, 2, 120, 108, 62, 56, 30, 8, 120, 32, 192, 8, 150, 120, 326, 170, 30, 20, 2, 278, 158, 18, 6, 92, 446, 120, 56, 48, 48, 48, 98, 8, 32, 272, 38, 78, 206
EXAMPLE
For n=4, the smallest 4-digit prime is 1009, and 10^(4-1) + 1 = 1001, so a(4) = 1009 - 1001 = 8. - Michael B. Porter, Aug 01 2016
MATHEMATICA
Table[NextPrime[#] - (# + 1) &[10^(n - 1)], {n, 75}] (* Michael De Vlieger, Jul 13 2016 *)
PROG
(PARI) a(n) = nextprime(10^(n-1)) - (10^(n-1) + 1); \\ Michel Marcus, Jul 28 2016
Largest n-digit prime.
(Formerly M4452)
+10
48
7, 97, 997, 9973, 99991, 999983, 9999991, 99999989, 999999937, 9999999967, 99999999977, 999999999989, 9999999999971, 99999999999973, 999999999999989, 9999999999999937, 99999999999999997, 999999999999999989, 9999999999999999961, 99999999999999999989
COMMENTS
Since 10^n - 1 is always a multiple of 9, one could be tempted to think that 9 is the least frequently occurring least significant digit in terms of this sequence. - Alonso del Arte, Dec 03 2017
The occurrences of least significant digits in the first 8000 terms (see A033874) are 1: 2028, 3: 2032, 7: 2014, and 9: 1926. - Giovanni Resta, Mar 16 2020
REFERENCES
O'Hara, J. Rec. Math., 22 (1990), Table on page 278.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
EXAMPLE
No power of 10 is prime.
9 = 3^2, 8 = 2^3 but 7 is prime, so a(1) = 7.
99 = 3^2 * 11 but 97 is prime, so a(2) = 97.
999 = 3^3 * 37 but 997 is prime, so a(3) = 997.
9999 = 3^2 * 11 * 101, 9997 = 13 * 769, 9995 = 5 * 1999, 9993 = 3 * 3331, 9991 = 97 * 103, ..., 9975 = 5^2 * 399, but 9973 is prime, so a(4) = 9973.
PROG
(Python)
from sympy import prevprime
Difference between the largest prime < 10^n ( A003618) and 10^n.
+10
15
3, 3, 3, 27, 9, 17, 9, 11, 63, 33, 23, 11, 29, 27, 11, 63, 3, 11, 39, 11, 101, 27, 23, 257, 123, 141, 99, 209, 27, 11, 27, 21, 9, 411, 23, 159, 81, 59, 57, 17, 119, 83, 81, 53, 9, 33, 41, 33, 57, 57, 323, 231, 177, 291, 111, 593, 93, 149, 141, 161, 39, 83, 123, 51, 269
REFERENCES
Knuth, Art of Computer Programming, volume 2, pages 13 and 390.
Journal of Recreational Mathematics, volume 14, number 4, page 285.
Journal of Recreational Mathematics, volume 20 ,number 3, page 209-210.
O'Hara, J. Rec. Math., 22 (1990), Table on page 278.
EXAMPLE
a(4) = 27 because 10^4 - 9973 = 27. The 21st term is 101 since 10^21 - 101 = 999999999999999999899 is prime.
MATHEMATICA
PrevPrime[ n_Integer ] := Module[ {k}, k = n - 1; While[ ! PrimeQ[ k ], k-- ]; k ]; Table[ 10^n - PrevPrime[ 10^n ], {n, 1, 75} ] (* Robert G. Wilson v, Sep 09 2000 *)
Table[10^i - NextPrime[10^i, -1], {i, 0, 70}] (* Harvey P. Dale, Jan 13 2011 *)
AUTHOR
Vasiliy Danilov (danilovv(AT)usa.net)
a(n) is the least prime following A002276(n) repdigits.
+10
14
2, 3, 23, 223, 2237, 22229, 222247, 2222239, 22222223, 222222227, 2222222243, 22222222223, 222222222301, 2222222222243, 22222222222229, 222222222222227, 2222222222222281, 22222222222222301, 222222222222222281
EXAMPLE
n=2: 22 is followed by 23.
MAPLE
seq(nextprime(2*(10^i-1)/9), i=0..20); # Robert Israel, Aug 25 2017
MATHEMATICA
Table[NextPrime[2*(10^n-1)/9], {n, 0, 35}]
Table[NextPrime[FromDigits[PadRight[{}, n, 2]]], {n, 0, 20}] (* Harvey P. Dale, Dec 15 2021 *)
Smallest prime whose decimal expansion consists of the concatenation of a 1-digit prime, a 2-digit prime, a 3-digit prime, ..., and an n-digit prime.
+10
12
2, 211, 211151, 2111011129, 211101100910009, 211101100910007100049, 2111011009100071000031000453, 211101100910007100003100000310000721, 211101100910007100003100000310000019100000543, 2111011009100071000031000003100000191000000071000000531
COMMENTS
It is a plausible conjecture that a(n) always exists.
a(n) has A000217(n) = n*(n+1)/2 digits.
EXAMPLE
a(4) = 2111011129, the smallest prime formed from a single-digit, a double-digit, a triple-digit, and a quadruple-digit prime, i.e., 2, 11, 101, 1129.
CROSSREFS
Cf. A338968 (similar, with largest prime).
Difference between largest n-digit prime and smallest (n+1)-digit prime.
+10
10
4, 4, 12, 34, 12, 20, 28, 18, 70, 52, 26, 50, 66, 58, 48, 124, 6, 14, 90, 50, 218, 36, 140, 264, 136, 208, 202, 540, 346, 68, 60, 70, 70, 604, 92, 226, 124, 192, 60, 138, 228, 146, 138, 84, 18, 154, 74, 226, 66, 208, 444, 558, 348, 322, 132, 596, 372, 308, 160, 168
COMMENTS
Records: 4, 12, 34, 70, 124, 218, 264, 540, 604, 670, 754, 1182, ..., . - Robert G. Wilson v, Jan 23 2020
LINKS
Eric Weisstein's World of Mathematics, Next Prime.
EXAMPLE
7 = greatest prime with 1 digit, 11 next smallest prime with 2 digits so a(1)=4.
97 = greatest prime with 2 digits, 101 next smallest prime with 3 digits so a(2)=4.
MATHEMATICA
(NextPrime[#]-NextPrime[#, -1])&/@(10^Range[100]) (* Harvey P. Dale, Mar 23 2011 *)
Smallest prime in which the n-th significant digit is a 1.
+10
10
11, 11, 101, 1009, 10007, 100003, 1000003, 10000019, 100000007, 1000000007, 10000000019, 100000000003, 1000000000039, 10000000000037, 100000000000031, 1000000000000037, 10000000000000061, 100000000000000003, 1000000000000000003, 10000000000000000051
COMMENTS
Essentially (i.e., except for the initial term), the same as A003617. The definition is misleading, since "n-th significant digit" seems to mean here "most significant digit" (except for a(1)), while the "significance" is decreasing when going from the first to the last digit. (E.g., 1234 rounded to 2 significant digits is 1200, so "1,2" should be the first and second (and not fourth and third) significant digits.) [ M. F. Hasler, Jun 03 2009]
MAPLE
11, seq(nextprime(10^j), j=1..30);
MATHEMATICA
Join[{11}, NextPrime[10^Range[20]]] (* Paolo Xausa, Jun 23 2024 *)
PROG
(Python)
from sympy import nextprime
def a(n): return 11 if n == 1 else nextprime(10**(n-1))
a(n) is the largest prime before A002282(n) repdigits.
+10
10
7, 83, 887, 8887, 88883, 888887, 8888861, 88888883, 888888887, 8888888837, 88888888859, 888888888887, 8888888888857, 88888888888873, 888888888888883, 8888888888888753, 88888888888888801, 888888888888888859, 8888888888888888881, 88888888888888888879, 888888888888888888857
MATHEMATICA
Table[NextPrime[8*(10^n-1)/9, -1], {n, 1, 35}]
Table[NextPrime[FromDigits[PadRight[{}, n, 8]], -1], {n, 20}] (* Harvey P. Dale, Jul 12 2014 *)
Search completed in 0.002 seconds
|