A007908
Triangle of the gods: to get a(n), concatenate the decimal numbers 1,2,3,...,n.
Original entry on oeis.org
1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011, 123456789101112, 12345678910111213, 1234567891011121314, 123456789101112131415, 12345678910111213141516, 1234567891011121314151617, 123456789101112131415161718
Offset: 1
- R. K. Guy, Unsolved Problems in Number Theory, Section A3, page 15, of 3rd edition, Springer, 2010.
- 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.
- Index entries for sequences related to Most Wanted Primes video
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
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.
-
a007908 = read . concatMap show . enumFromTo 1 :: Integer -> Integer
-- Reinhard Zumkeller, Dec 13 2012
-
[Seqint(Reverse(&cat[Reverse(Intseq(k)): k in [1..n]])): n in [1..17]]; // Bruno Berselli, May 27 2011
-
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
-
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 *)
-
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 */
-
a(n)=my(s="");for(k=1,n,s=Str(s,k));eval(s) \\ Charles R Greathouse IV, Sep 19 2012
-
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
-
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
-
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
A262582
Concatenation of the numbers from 1 to n but omitting 12.
Original entry on oeis.org
1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011, 123456789101113, 12345678910111314, 1234567891011131415, 123456789101113141516, 12345678910111314151617, 1234567891011131415161718, 123456789101113141516171819, 12345678910111314151617181920
Offset: 1
See
A262300 for more about this problem.
-
Module[{nn=30, c}, c=Drop[Range[nn], {12}]; Table[FromDigits[Flatten[IntegerDigits/@Take[c, n]]], {n, nn - 1}]] (* Vincenzo Librandi, Nov 05 2018 *)
A262300
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.
Original entry on oeis.org
2, 3, 7, 9, 11, 7, 11, 1873, 19, 14513, 13, 961
Offset: 1
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.
See also
A007908 (which plays the role of S(0,*)).
-
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 *)
-
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
A262299
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.
Original entry on oeis.org
2, 13, 124567, 12356789, 123467891011, 123457, 123456891011
Offset: 1
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.
A262300 gives the last term in S(n) when a prime appears for the first time.
Cf.
A007908 (which plays the role of S(0)).
A089987
Primes in the concatenation of consecutive numbers beginning with 2.
Original entry on oeis.org
2, 23, 23456789, 23456789101112131415161718192021222324252627
Offset: 1
See also
A007908 for the numbers 1234...n.
-
Select[Table[FromDigits[Flatten[IntegerDigits[Range[2, n]]]], {n, 2, 30}], PrimeQ[#] & ] (* Robert Price, Nov 05 2018 *)
-
concatprime(n,p) = { sr=0; y=""; for(x=p,n, y=concat(Str(y),Str(x)); z=eval(y); if(ispseudoprime(z),print1(z","); sr+=1./z; ); ); print(); print(sr) }
A262572
Concatenation of the numbers from 1 to n but omitting 2.
Original entry on oeis.org
1, 13, 134, 1345, 13456, 134567, 1345678, 13456789, 1345678910, 134567891011, 13456789101112, 1345678910111213, 134567891011121314, 13456789101112131415, 1345678910111213141516, 134567891011121314151617, 13456789101112131415161718, 1345678910111213141516171819, 134567891011121314151617181920
Offset: 1
See
A262300 for more about this problem.
-
DeleteDuplicates[Table[FromDigits[Flatten[IntegerDigits[Complement[Range[n], {2}]]]], {n, 20}]] (* Robert Price, Nov 05 2018 *)
A262575
Concatenation of the numbers from 1 to n but omitting 5.
Original entry on oeis.org
1, 12, 123, 1234, 12346, 123467, 1234678, 12346789, 1234678910, 123467891011, 12346789101112, 1234678910111213, 123467891011121314, 12346789101112131415, 1234678910111213141516, 123467891011121314151617, 12346789101112131415161718, 1234678910111213141516171819, 123467891011121314151617181920
Offset: 1
See
A262300 for more about this problem.
-
DeleteDuplicates[Table[FromDigits[Flatten[IntegerDigits[Complement[Range[n], {5}]]]], {n, 20}]] (* Robert Price, Nov 05 2018 *)
Join[{1,12,123,1234},Table[FromDigits[Flatten[IntegerDigits/@Drop[Range[n],{5}]]],{n,6,20}]] (* Harvey P. Dale, Jan 28 2024 *)
A262581
Concatenation of the numbers from 1 to n but omitting 11.
Original entry on oeis.org
1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891012, 123456789101213, 12345678910121314, 1234567891012131415, 123456789101213141516, 12345678910121314151617, 1234567891012131415161718, 123456789101213141516171819, 12345678910121314151617181920
Offset: 1
See
A262300 for more about this problem.
-
DeleteDuplicates[Table[FromDigits[Flatten[IntegerDigits[Complement[Range[n], {11}]]]], {n, 20}]] (* Robert Price, Nov 05 2018 *)
-
terms(n) = my(s="", i=0); for(k=1, n, if(k!=11, s=concat(s, Str(k)); print1(eval(s), ", "); i++); if(i==n, break))
/* Print initial 20 terms as follows */
terms(20) \\ Felix Fröhlich, Nov 05 2018
A284891
Concatenation of the numbers from 3 to n.
Original entry on oeis.org
3, 34, 345, 3456, 34567, 345678, 3456789, 345678910, 34567891011, 3456789101112, 345678910111213, 34567891011121314, 3456789101112131415, 345678910111213141516, 34567891011121314151617, 3456789101112131415161718, 345678910111213141516171819
Offset: 3
A262573
Concatenation of the numbers from 1 to n but omitting 3.
Original entry on oeis.org
1, 12, 124, 1245, 12456, 124567, 1245678, 12456789, 1245678910, 124567891011, 12456789101112, 1245678910111213, 124567891011121314, 12456789101112131415, 1245678910111213141516, 124567891011121314151617, 12456789101112131415161718, 1245678910111213141516171819, 124567891011121314151617181920
Offset: 1
See
A262300 for more about this problem.
-
DeleteDuplicates[Table[FromDigits[Flatten[IntegerDigits[Complement[Range[n], {3}]]]], {n, 20}]] (* Robert Price, Nov 05 2018 *)
Join[{1,12},Table[FromDigits[Join[{1,2},Flatten[IntegerDigits/@Range[4,n]]]],{n,4,20}]] (* Harvey P. Dale, Sep 17 2019 *)
Showing 1-10 of 16 results.
Comments