[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a089987 -id:a089987
     Sort: relevance | references | number | modified | created      Format: long | short | data
Triangle of the gods: to get a(n), concatenate the decimal numbers 1,2,3,...,n.
+10
216
1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011, 123456789101112, 12345678910111213, 1234567891011121314, 123456789101112131415, 12345678910111213141516, 1234567891011121314151617, 123456789101112131415161718
OFFSET
1,2
COMMENTS
For the name "triangle of the gods" see Pickover link. - N. J. A. Sloane, Dec 15 2019
Number of digits: A058183(n) = A055642(a(n)); sums of digits: A037123(n) = A007953(a(n)). - Reinhard Zumkeller, Aug 10 2010
Charles Nicol and John Selfridge ask if there are infinitely many primes in this sequence - see the Guy reference. - Charles R Greathouse IV, Dec 14 2011
Stephan finds no primes in the first 839 terms. I checked that there are no primes in the first 5000 terms. Heuristically there are infinitely many, about 0.5 log log n through the n-th term. - Charles R Greathouse IV, Sep 19 2012 [Expanded search to 20000 without finding any primes. - Charles R Greathouse IV, Apr 17 2014] [Independent search extended to 64000 terms without finding any primes. - Dana Jacobsen, Apr 25 2014]
Elementary congruence arguments show that primes can occur only at indices congruent to 1, 7, 13, or 19 mod 30. - Roderick MacPhee, Oct 05 2015
A note on heuristics: I wrote a quick program to count primes in sequences which are like A007908 but start at k instead of 1. I ran this for k = 1 to 100 and counted the primes up to 1000 (1000 possibilities for k = 1, 999 for k = 2, etc. up to 901 for k = 100). I then compared this to the expected count which is 0 if the number N is divisible by 2, 3, or 5 and 15/(4 log N) otherwise. (If N < 43 I counted the number as 1 instead.) k = 1 has 1.788 expected primes but only 0 actual (of course). k = 2 has 2.268 expected but 4 actual (see A262571, A089987). In total the expectation is 111.07 and the actual count is 110, well within the expected error of +/- 10.5. - Charles R Greathouse IV, Sep 28 2015
Early bird numbers for n > 1: a(2) = A116700(1) = 12; a(3) = A116700(52) = 123; a(4) = A116700(725) = 1234; a(5) = A116700(8074) = 12345; a(6) = A116700(85846) = 123456. - Reinhard Zumkeller, Dec 13 2012
For n < 10^6, a(n)/A000217(n) is an integer for n = 1, 2, and 5. The integers are 1, 4, and 823 (a prime), respectively. - Derek Orr, Sep 04 2014; Max Alekseyev, Sep 30 2015
In order to be a prime, a(n) must end in a digit 1, 3, 7 or 9, so only 4 among 10 consecutive values can be prime. (But a(64000) already has A058183(64000) > 300000 digits.) Also, a(64001) and a(64011) and more generally a(64001+10k) is divisible by 3 unless k == 2 (mod 3), but for k = 2, 5, 8, ... 23 these are divisible by small primes < 999. a(64261) is the first serious candidate in this subsequence. - M. F. Hasler, Sep 30 2015
There are no primes in the first 10^5 terms. - Max Alekseyev, Oct 03 2015; Oct 11 2015
There are no primes in the first 200000 terms. - Serge Batalov, Oct 24 2015
There is a distributed project for continued search, using PRPNet/PFGW software; see the Mersenne Forum link below. - Serge Batalov, Oct 18 2015
It appears that the Mersenne Forum search reached n = 344869 without finding a prime, and was then abandoned. It would be nice if someone could recover the final version of that link from the Wayback machine - the Great Smarandache PRPrime search, http://99.121.249.54:1200 - so that we have a record of how far they searched. - N. J. A. Sloane, Apr 09 2018
The web page https://www.mersenneforum.org/showthread.php?t=20527&page=9 has a comment from Serge Balatov that seems to say that the search reached 10^6 without finding a prime. It would be nice to have this confirmed, and to get more details about how it was done. - N. J. A. Sloane, Dec 15 2019
The expected number of primes among the first million terms is about 0.6. - Ernst W. Mayer, Oct 09 2015
A few semiprimes exist among the early terms, but then become scarce: see A046461. For the base-2 analog of this sequence (A047778), there is a 15-decimal digit prime, but Hans Havermann has shown that the second prime would have more than 91000 digits. - N. J. A. Sloane, Oct 08 2015
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, Section A3, page 15, of 3rd edition, Springer, 2010.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..300 (first 100 terms from T. D. Noe)
Great Smarandache PRPrime search, Current status of search for a prime in this sequence [Broken link? It appears that this search reached n=344869 without finding a prime, and was then abandoned. - N. J. A. Sloane, Apr 09 2018]
Y. Guo and M. Le, Smarandache concatenated power decimals and their irrationality, Smarandache Notions Journal, Vol. 9, No. 1-2. 1998, 100-102.
Brady Haran and N. J. A. Sloane, The Most Wanted Prime Number, Numberphile video (2021).
Ernst W. Mayer and others, Expected number of primes in OEIS A007908, Mersenne Forum, initial posting Oct 08 2015.
Mersenne Forum, Smarandache prime(s).
Clifford Pickover, Triangle of the Gods.
N. J. A. Sloane, Confessions of a Sequence Addict (AofA2017), slides of invited talk given at AofA 2017, Jun 19 2017, Princeton. Mentions this sequence.
N. J. A. Sloane, Exciting Number Sequences (video of talk), Mar 05 2021.
F. Smarandache, Only Problems, Not Solutions!, Xiquan Publ., Phoenix-Chicago, 1993.
R. W. Stephan, Factors and primes in two Smarandache sequences, viXra:1005.0104, 2011.
Bertrand Teguia Tabuguia, Explicit formulas for concatenations of arithmetic progressions, arXiv:2201.07127 [math.CO], 2022.
Eric Weisstein's World of Mathematics, Consecutive Number Sequences.
Eric Weisstein's World of Mathematics, Smarandache Prime.
FORMULA
a(n) = n + a(n-1)*10^A055642(n). - R. J. Mathar, May 31 2008
a(n) = floor(C*10^(A058183(n))) with C = A033307. - José de Jesús Camacho Medina, Aug 19 2015
MAPLE
A055642 := proc(n) max(1, ilog10(n)+1) ; end: A007908 := proc(n) if n = 1 then 1; else A007908(n-1)*10^A055642(n)+n ; fi ; end: seq(A007908(n), n=1..12) ; # R. J. Mathar, May 31 2008
# second Maple program:
a:= proc(n) a(n):= `if`(n=0, 0, parse(cat(a(n-1), n))) end:
seq(a(n), n=1..22); # Alois P. Heinz, Jan 12 2021
MATHEMATICA
Table[FromDigits[Flatten[IntegerDigits[Range[n]]]], {n, 20}] (* Alonso del Arte, Sep 19 2012 *)
FoldList[#2 + #1 10^IntegerLength[#2] &, Range[20]] (* Eric W. Weisstein, Nov 06 2015 *)
FromDigits /@ Flatten /@ IntegerDigits /@ Flatten /@ Rest[FoldList[List, {}, Range[20]]] (* Eric W. Weisstein, Nov 04 2015 *)
FromDigits /@ Flatten /@ IntegerDigits /@ Rest[FoldList[Append, {}, Range[20]]] (* Eric W. Weisstein, Nov 04 2015 *)
PROG
(PARI) a(n)=my(s=""); for(k=1, n, s=Str(s, k)); eval(s) \\ Charles R Greathouse IV, Sep 19 2012
(PARI) A007908(n, a=0)={for(d=1, #Str(n), my(t=10^d); for(k=t\10, min(t-1, n), a=a*t+k)); a} \\ M. F. Hasler, Sep 30 2015
(Magma) [Seqint(Reverse(&cat[Reverse(Intseq(k)): k in [1..n]])): n in [1..17]]; // Bruno Berselli, May 27 2011
(Maxima) a[1]:1$ a[n]:=a[n-1]*10^floor(log(10*n)/log(10))+n$ makelist(a[n], n, 1, 17); /* Bruno Berselli, May 27 2011 */
(Haskell)
a007908 = read . concatMap show . enumFromTo 1 :: Integer -> Integer
-- Reinhard Zumkeller, Dec 13 2012
(Python)
def a(n): return int("".join(map(str, range(1, n+1))))
print([a(n) for n in range(1, 18)]) # Michael S. Branicky, Jan 12 2021
(Python)
from functools import reduce
def A007908(n): return reduce(lambda i, j:i*10**len(str(j))+j, range(1, n+1)) # Chai Wah Wu, Feb 27 2023
CROSSREFS
See A057137 for another version.
Cf. A033307, A053064, A000422 (left concatenations)
If we concatenate 1 through n but leave out k, we get sequences A262571 (leave out 1) through A262582 (leave out 12), etc., and again we can ask for the smallest prime in each sequence. See A262300 for a summary of these results. Primes seem to exist if we search far enough. - N. J. A. Sloane, Sep 29 2015
Concatenation of first n numbers in other bases: 2: A047778, 3: A048435, 4: A048436, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: this sequence, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: A048446, 16: A048447. - Dylan Hamilton, Aug 11 2010
Entries that give the primes in sequences of this type: A089987, A262298, A262300, A262552, A262555.
For semiprimes see A046461.
See also A007376 (the almost-natural numbers), A071620 (primes in that sequence).
See also A033307 (the Champernowne constant) and A176942 (the Champernowne primes). A262043 is a variant of the present sequence.
A002782 is an amusing cousin of this sequence.
Least prime factor: A075019.
KEYWORD
nonn,base,easy
AUTHOR
R. Muller
EXTENSIONS
Name edited by N. J. A. Sloane, Dec 15 2019
STATUS
approved
Let S(n,k) denote the number formed by concatenating the decimal numbers 1,2,3,...,k, but omitting n; a(n) is the smallest k for which S(n,k) is prime, or -1 if no term in S(n,*) is prime.
+10
18
2, 3, 7, 9, 11, 7, 11, 1873, 19, 14513, 13, 961
OFFSET
1,1
COMMENTS
Sep 28 2015: David Broadhurst has found a(10) = 14513, a(12) = 961, a(14) = 653, a(16) = 5109, a(17) = 493, a(18) = 757, and a(20) = 1313. All these correspond to probable primes.
It is easy to check that a(19)=29.
So the sequence begins 2, 3, 7, 9, 11, 7, 11, 1873, 19, 14513, 13, 961, ???, 653, ???, 5109, 493, 757, 29, 1313, ...
a(13) is either -1 or greater than 40000. - Robert Price, Nov 03 2018
EXAMPLE
a(5) = 11 because the smallest prime in S(5,*) (A262575) is 123467891011.
a(8) = 1873 (corresponding to the 6364-digit probable prime 1234567910111213...1873) was found by David Broadhurst on Sep 27 2015.
a(9) = 19 because the smallest prime in S(9,*) is 1234567810111213141516171819.
a(10) = 14513 (corresponding to the 61457-digit probable prime 123456789111213...14513) was found by David Broadhurst on Sep 28 2015.
MATHEMATICA
A262300[n_] := Module[{k = 1}, While[! PrimeQ[FromDigits[Flatten[Map[IntegerDigits, Complement[Range[k], {n}]]]]], k++]; k];
Table[A262300[n], {n, 12}] (* Robert Price, Oct 27 2018 *)
PROG
(PARI) s(n, k) = my(s=""); for(x=1, k, if(x!=n, s=concat(s, x))); eval(Str(s))
a(n) = for(k=1, oo, my(s=s(n, k)); if(ispseudoprime(s), return(k))) \\ Felix Fröhlich, Oct 27 2018
CROSSREFS
Cf. A262299.
See A262571-A262582 for the sequences S(1,*) through S(12,*).
See also A007908 (which plays the role of S(0,*)).
For the primes in S(1,*) and S(2,*) see A089987, A262298.
KEYWORD
nonn,more,base
AUTHOR
N. J. A. Sloane and Jerrold B. Tunnell, Sep 27 2015
EXTENSIONS
a(8) was found by David Broadhurst, Sep 27 2015. On Sep 28 2015 David Broadhurst also found a(10), a(12), a(14), a(16), a(17), a(18), and a(20).
STATUS
approved
Concatenation of the numbers from 2 to n.
+10
16
2, 23, 234, 2345, 23456, 234567, 2345678, 23456789, 2345678910, 234567891011, 23456789101112, 2345678910111213, 234567891011121314, 23456789101112131415, 2345678910111213141516, 234567891011121314151617, 23456789101112131415161718, 2345678910111213141516171819
OFFSET
2,1
MATHEMATICA
Table[FromDigits[Flatten[IntegerDigits[Range[2, n]]]], {n, 2, 19}] (* Robert Price, Oct 28 2018 *)
PROG
(Magma) [Seqint(Reverse(&cat[Reverse(Intseq(k)): k in [2..n]])): n in [2..20]]; // Vincenzo Librandi, Oct 29 2018
(Python)
def a(n): return int("".join(map(str, range(2, n+1))))
print([a(n) for n in range(2, 20)]) # Michael S. Branicky, Feb 23 2021
CROSSREFS
For primes in this sequence see A089987.
See A262300 for more about this problem.
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 25 2015
STATUS
approved
Let S(n) denote the sequence formed by concatenating the decimal numbers 1,2,3,..., omitting n; a(n) is the smallest prime in S(n), or -1 if no term in S(n) is prime.
+10
13
2, 13, 124567, 12356789, 123467891011, 123457, 123456891011
OFFSET
1,1
COMMENTS
A262300 is now the main entry for this question.
EXAMPLE
a(8) = 1234567910111213...1873 (ending at 1873, a 6384-digit probable prime, and too large to display here) was found by David Broadhurst on Sep 27 2015.
a(9) = 1234567810111213141516171819,
a(11) = 123456789101213,
and a(19) = 12345678910111213141516171820212223242526272829.
Sep 28, 2015: David Broadhurst has also found a(10), a(12), a(14), a(16), a(17), a(18), and a(20). See A262300 for their values.
a(13) is at present unknown.
CROSSREFS
A262300 gives the last term in S(n) when a prime appears for the first time.
See A262571-A262582 for the sequences S(1) through S(12).
Cf. A007908 (which plays the role of S(0)).
For the primes in S(1) and S(2) see A089987, A262298.
KEYWORD
nonn,base,more
AUTHOR
N. J. A. Sloane and Jerrold B. Tunnell, Sep 25 2015
STATUS
approved
Primes in A262572.
+10
5
13, 134567891011121314151617181920212223242526272829303132333435363738394041
OFFSET
1,1
COMMENTS
Three more terms are known, but are too large to show here. See A262555 for details. - N. J. A. Sloane, Oct 09 2015
MATHEMATICA
Select[DeleteDuplicates[Table[FromDigits[Flatten[IntegerDigits[Complement[Range[n], {2}]]]], {n, 50}]], PrimeQ[#] & ](* Robert Price, Nov 05 2018 *)
CROSSREFS
See A262300 for more about this problem.
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 25 2015
STATUS
approved
Concatenation of the numbers from 3 to n.
+10
1
3, 34, 345, 3456, 34567, 345678, 3456789, 345678910, 34567891011, 3456789101112, 345678910111213, 34567891011121314, 3456789101112131415, 345678910111213141516, 34567891011121314151617, 3456789101112131415161718, 345678910111213141516171819
OFFSET
3,1
COMMENTS
The a(3) = 3, a(19) = 345678910111213141516171819 are primes in this sequence (for n < 2800).
LINKS
Eric Weisstein's World of Mathematics, Consecutive Number Sequences
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
XU Pingya, Apr 05 2017
STATUS
approved

Search completed in 0.009 seconds