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
A047778
Concatenation of the first n numbers in binary (converted to base 10).
Original entry on oeis.org
1, 6, 27, 220, 1765, 14126, 113015, 1808248, 28931977, 462911642, 7406586283, 118505380540, 1896086088653, 30337377418462, 485398038695407, 15532737238253040, 497047591624097297, 15905522931971113522, 508976733823075632723, 16287255482338420247156
Offset: 1
Aaron Gulliver (gulliver(AT)elec.canterbury.ac.nz)
a(4) = 1 10 11 100 [base 2] = 220 [base 10].
Concatenation of first n numbers in other bases: 2: this sequence, 3:
A048435, 4:
A048436, 5:
A048437, 6:
A048438, 7:
A048439, 8:
A048440, 9:
A048441, 10:
A007908, 11:
A048442, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16:
A048447.
-
a047778 = (foldl (\v d -> 2*v + d) 0) . concatMap (reverse . unfoldr
(\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2)) .
enumFromTo 1
-- Reinhard Zumkeller, Feb 19 2012
-
conc:= (x,y) -> x*2^(1+ilog2(y))+y:
a[1]:= 1:
for n from 2 to 30 do a[n]:= conc(a[n-1],n) od:
seq(a[n],n=1..30); # Robert Israel, Oct 07 2015
-
If[STARTPOINT==1,n={},n=Flatten[IntegerDigits[Range[STARTPOINT-1],2]]]; Table[AppendTo[n,IntegerDigits[w,2]];n=Flatten[n];FromDigits[n,2],{w,STARTPOINT,ENDPOINT}] (* Dylan Hamilton, Aug 04 2010 *)
f[n_] := FromDigits[ Flatten@ IntegerDigits[ Range@n, 2], 2]; Array[f, 18] (* Robert G. Wilson v, Nov 07 2010 *)
Module[{n = 1}, NestList[#*2^BitLength[++n] + n &, 1, 25]] (* Paolo Xausa, Sep 30 2024 *)
-
cb(a,b)=a<<#binary(b) + b
a(n)=fold(cb, [1..n]) \\ Charles R Greathouse IV, Jun 21 2017
-
A047778_vec(N=20,s)=vector(N,k,s=s<M. F. Hasler, Oct 25 2019
-
def a(n): return int("".join([(bin(i))[2:] for i in range(1, n+1)]), 2)
print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Jan 06 2021
-
from functools import reduce
def A047778(n): return reduce(lambda i,j:(i<Chai Wah Wu, Feb 26 2023
A048435
Take the first n numbers written in base 3, concatenate them, then convert from base 3 to base 10.
Original entry on oeis.org
1, 5, 48, 436, 3929, 35367, 318310, 2864798, 77349555, 2088437995, 56387825876, 1522471298664, 41106725063941, 1109881576726421, 29966802571613382, 809103669433561330, 21845799074706155927, 589836575017066210047, 15925587525460787671288, 429990863187441267124796
Offset: 1
a(6): (1)(2)(10)(11)(12)(20) = 1210111220_3 = 35367.
Concatenation of first n numbers in other bases: 2:
A047778, 3: this sequence, 4:
A048436, 5:
A048437, 6:
A048438, 7:
A048439, 8:
A048440, 9:
A048441, 10:
A007908, 11:
A048442, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16:
A048447.
-
[n eq 1 select 1 else Self(n-1)*3^(1+Ilog(3, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
-
If[STARTPOINT==1,n={},n=Flatten[IntegerDigits[Range[STARTPOINT-1],3]]]; Table[AppendTo[n,IntegerDigits[w,3]];n=Flatten[n];FromDigits[n,3],{w,STARTPOINT,ENDPOINT}] (* Dylan Hamilton, Aug 09-04 2010 *)
f[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 3], 3]; Array[f, 20] (* Vincenzo Librandi, Dec 30 2012 *)
A048437
Take the first n numbers written in base 5, concatenate them, then convert from base 5 to base 10.
Original entry on oeis.org
1, 7, 38, 194, 4855, 121381, 3034532, 75863308, 1896582709, 47414567735, 1185364193386, 29634104834662, 740852620866563, 18521315521664089, 463032888041602240, 11575822201040056016, 289395555026001400417, 7234888875650035010443, 180872221891250875261094
Offset: 1
a(7) = 1 2 3 4 10 11 12 = 3034532_10.
Concatenation of first n numbers in other bases: 2:
A047778, 3:
A048435, 4:
A048436, 5: this sequence, 6:
A048438, 7:
A048439, 8:
A048440, 9:
A048441, 10:
A007908, 11:
A048442, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16:
A048447.
-
[n eq 1 select 1 else Self(n-1)*5^(1+Ilog(5, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
-
If[STARTPOINT==1, n={}, n=Flatten[IntegerDigits[Range[STARTPOINT-1], 5]]]; Table[AppendTo[n, IntegerDigits[w, 5]]; n=Flatten[n]; FromDigits[n, 5], {w, STARTPOINT, ENDPOINT}] (* Dylan Hamilton, Aug 11 2010 *)
f[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 5], 5]; Array[f, 20] (* Vincenzo Librandi, Dec 30 2012 *)
A048447
Take the first n numbers written in base 16, concatenate them, then convert from base 16 to base 10.
Original entry on oeis.org
1, 18, 291, 4660, 74565, 1193046, 19088743, 305419896, 4886718345, 78187493530, 1250999896491, 20015998343868, 320255973501901, 5124095576030430, 81985529216486895, 20988295479420645136, 5373003642731685154833, 1375488932539311399637266, 352125166730063718307140115
Offset: 1
a(16) = (1)(2)(3)(4)(5)(6)(7)(8)(9)(A)(B)(C)(D)(E)(F)(10) = 123456789ABCDEF10_16 = 20988295479420645136.
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:
A007908, 11:
A048442, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16: this sequence.
-
[n eq 1 select 1 else Self(n-1)*16^(1+Ilog(16, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
-
If[STARTPOINT==1, n={}, n=Flatten[IntegerDigits[Range[STARTPOINT-1], 16]]]; Table[AppendTo[n, IntegerDigits[w, 16]]; n=Flatten[n]; FromDigits[n, 16], {w, STARTPOINT, ENDPOINT}] (* Dylan Hamilton, Aug 11 2010 *)
f[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 16], 16]; Array[f, 20] (* Vincenzo Librandi, Dec 30 2012 *)
-
from functools import reduce
def A048447(n): return reduce(lambda i,j:(i<<(bool((m:=j.bit_length())&3)<<2)+(m&-4))+j,range(n+1)) # Chai Wah Wu, Feb 26 2023
A048438
Take the first n numbers written in base 6, concatenate them, then convert from base 6 to base 10.
Original entry on oeis.org
1, 8, 51, 310, 1865, 67146, 2417263, 87021476, 3132773145, 112779833230, 4060073996291, 146162663866488, 5261855899193581, 189426812370968930, 6819365245354881495, 245497148832775733836, 8837897357979926418113, 318164304887277351052086, 11453914975941984637875115
Offset: 1
a(8) = (1)(2)(3)(4)(5)(10)(11)(12) = 12345101112_6 = 87021476.
Concatenation of first n numbers in other bases: 2:
A047778, 3:
A048435, 4:
A048436, 5:
A048437, 6: this sequence, 7:
A048439, 8:
A048440, 9:
A048441, 10:
A007908, 11:
A048442, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16:
A048447.
-
[n eq 1 select 1 else Self(n-1)*6^(1+Ilog(6, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
-
If[STARTPOINT==1, n={}, n=Flatten[IntegerDigits[Range[STARTPOINT-1], 6]]]; Table[AppendTo[n, IntegerDigits[w, 6]]; n=Flatten[n]; FromDigits[n, 6], {w, STARTPOINT, ENDPOINT}] (* Dylan Hamilton, Aug 11 2010 *)
Table[FromDigits[Flatten[IntegerDigits[#,6]&/@Range[n]],6],{n,20}] (* Harvey P. Dale, Sep 29 2012 *)
A048439
Take the first n numbers written in base 7, concatenate them, then convert from base 7 to base 10.
Original entry on oeis.org
1, 9, 66, 466, 3267, 22875, 1120882, 54923226, 2691238083, 131870666077, 6461662637784, 316621469251428, 15514451993319985, 760208147672679279, 37250199235961284686, 1825259762562102949630, 89437728365543044531887, 4382448689911609182062481
Offset: 1
a(8): (1)(2)(3)(4)(5)(6)(10)(11) = 1234561011_7 = 54923226.
Concatenation of first n numbers in other bases: 2:
A047778, 3:
A048435, 4:
A048436, 5:
A048437, 6:
A048438, 7: this sequence, 8:
A048440, 9:
A048441, 10:
A007908, 11:
A048442, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16:
A048447.
-
[n eq 1 select 1 else Self(n-1)*7^(1+Ilog(7, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
-
a[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 7], 7]; Array[a, 20] (* Vincenzo Librandi, Dec 30 2012 *)
A048440
Take the first n numbers written in base 8, concatenate them, then convert from base 8 to base 10.
Original entry on oeis.org
1, 10, 83, 668, 5349, 42798, 342391, 21913032, 1402434057, 89755779658, 5744369898123, 367639673479884, 23528939102712589, 1505852102573605710, 96374534564710765455, 6167970212141488989136, 394750093577055295304721, 25264005988931538899502162
Offset: 1
a(9): (1)(2)(3)(4)(5)(6)(7)(10)(11) = 12345671011_8 = 1402434057.
Concatenation of first n numbers in other bases: 2:
A047778, 3:
A048435, 4:
A048436, 5:
A048437, 6:
A048438, 7:
A048439, 8: this sequence, 9:
A048441, 10:
A007908, 11:
A048442, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16:
A048447.
-
[n eq 1 select 1 else Self(n-1)*8^(1+Ilog(8, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
-
If[STARTPOINT==1, n={}, n=Flatten[IntegerDigits[Range[STARTPOINT-1], 8]]]; Table[AppendTo[n, IntegerDigits[w, 8]]; n=Flatten[n]; FromDigits[n, 8], {w, STARTPOINT, ENDPOINT}] (* Dylan Hamilton, Aug 11 2010 *)
Table[FromDigits[Flatten[IntegerDigits[#,8]&/@Range[n]],8],{n,20}] (* Harvey P. Dale, Dec 07 2012 *)
-
from functools import reduce
def A048440(n): return reduce(lambda i,j:(i<<3*(1+(j.bit_length()-1)//3))+j,range(n+1)) # Chai Wah Wu, Feb 26 2023
A048441
Take the first n numbers written in base 9, concatenate them, then convert from base 9 to base 10.
Original entry on oeis.org
1, 11, 102, 922, 8303, 74733, 672604, 6053444, 490328973, 39716646823, 3217048392674, 260580919806606, 21107054504335099, 1709671414851143033, 138483384602942585688, 11217154152838349440744, 908589486379906304700281, 73595748396772410680722779
Offset: 1
a(9) = (1)(2)(3)(4)(5)(6)(7)(8)(10) = 1234567810_9 = 490328973.
Concatenation of first n numbers in other bases: 2:
A047778, 3:
A048435, 4:
A048436, 5:
A048437, 6:
A048438, 7:
A048439, 8:
A048440, 9: this sequence, 10:
A007908, 11:
A048442, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16:
A048447.
-
[n eq 1 select 1 else Self(n-1)*9^(1+Ilog(9, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
-
If[STARTPOINT==1, n={}, n=Flatten[IntegerDigits[Range[STARTPOINT-1], 9]]]; Table[AppendTo[n, IntegerDigits[w, 9]]; n=Flatten[n]; FromDigits[n, 9], {w, STARTPOINT, ENDPOINT}] (* Dylan Hamilton, Aug 11 2010 *)
f[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 9], 9]; Array[f, 20] (* Vincenzo Librandi, Dec 30 2012 *)
-
{ cuo=0;
for(ixp=1, 18,
casi = ixp; cvst=0;
while(casi != 0,
cvd = casi%9; cvst=10*cvst + cvd + 1; casi = (casi - cvd) / 9 );
while(cvst !=0, ptch = cvst%10;
cuo=cuo*9+ptch-1; cvst = (cvst - ptch) / 10 ); print1(cuo, ", "))}
\\ Douglas Latimer, Apr 27 2012
A048442
Take the first n numbers written in base 11, concatenate them, then convert from base 11 to base 10.
Original entry on oeis.org
1, 13, 146, 1610, 17715, 194871, 2143588, 23579476, 259374245, 2853116705, 345227121316, 41772481679248, 5054470283189021, 611590904265871555, 74002499416170458170, 8954302429356625438586, 1083470593952151678068923, 131099941868210353046339701
Offset: 1
a(11) = (1)(2)(3)(4)(5)(6)(7)(8)(9)(A)(10) = 123456789A10_11 = 345227121316.
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:
A007908, 11: this sequence, 12:
A048443, 13:
A048444, 14:
A048445, 15:
A048446, 16:
A048447.
-
[n eq 1 select 1 else Self(n-1) * 11^(1+Ilog(11, n)) + n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
-
If[STARTPOINT==1, n={}, n=Flatten[IntegerDigits[Range[STARTPOINT-1], 11]]]; Table[AppendTo[n, IntegerDigits[w, 11]]; n=Flatten[n]; FromDigits[n, 11], {w, STARTPOINT, ENDPOINT}] (* Dylan Hamilton, Aug 11 2010 *)
f[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 11], 11]; Array[f, 20] (* Vincenzo Librandi, Dec 30 2012 *)
-
{ cuo=0;
for(ixp=1, 18, casi = ixp; cvst=0;
while(casi != 0,
cvd = casi%11; cvst=100*cvst + cvd + 1; casi = (casi - cvd) / 11 );
while(cvst !=0, ptch = cvst%100;
cuo=cuo*11+ptch-1; cvst = (cvst - ptch) / 100 ); print1(cuo, ", "))}
\\ Douglas Latimer, May 09 2012
Showing 1-10 of 19 results.
Comments