[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a048445 -id:a048445
     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
Concatenation of the first n numbers in binary (converted to base 10).
+10
31
1, 6, 27, 220, 1765, 14126, 113015, 1808248, 28931977, 462911642, 7406586283, 118505380540, 1896086088653, 30337377418462, 485398038695407, 15532737238253040, 497047591624097297, 15905522931971113522, 508976733823075632723, 16287255482338420247156
OFFSET
1,2
COMMENTS
The smallest prime in this sequence is 485398038695407. What is the full subsequence of primes? - N. J. A. Sloane, Oct 03 2015
There is only the one prime in the first 22400 terms, making a second prime > 10^91000. - Hans Havermann, Oct 07 2015
LINKS
Joe B. Stephen, Table of n, a(n) for n = 1..400 (terms 1..250 from Reinhard Zumkeller)
FORMULA
a(n) = a(n-1)*2^(1+floor(log_2(n))) + n. - Henry Bottomley, Jan 12 2001
a(n) = 4C / 2^frac(log_2(n)) * n^{n+1} / r(frac(log_2(n)))^n + O(1), where r(x) = 2^{x - 1 + 2^{1-x}}; frac is the fractional part function frac(x) = x - floor(x); and C is the binary Champernowne constant (A066716). (In fact, a(n) is the floor of this expression; the error term is between 1/2 and 1.) r(x) takes on values between e*log(2) and 2 for x in the range 0 to 1. It follows using Stirling's approximation that the radius of convergence for the e.g.f. is log 2. - Franklin T. Adams-Watters, Sep 07 2006
EXAMPLE
a(4) = 1 10 11 100 [base 2] = 220 [base 10].
MAPLE
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
MATHEMATICA
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 *)
PROG
(Haskell)
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
(PARI) cb(a, b)=a<<#binary(b) + b
a(n)=fold(cb, [1..n]) \\ Charles R Greathouse IV, Jun 21 2017
(PARI) A047778_vec(N=20, s)=vector(N, k, s=s<<logint(k*2, 2)+k) \\ M. F. Hasler, Oct 25 2019
(Python)
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
(Python)
from functools import reduce
def A047778(n): return reduce(lambda i, j:(i<<j.bit_length())+j, range(n+1)) # Chai Wah Wu, Feb 26 2023
CROSSREFS
Cf. A001855 (bit counts, offset by 1), A061168, A066716.
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.
KEYWORD
easy,nonn,base,nice
AUTHOR
Aaron Gulliver (gulliver(AT)elec.canterbury.ac.nz)
EXTENSIONS
More terms from Patrick De Geest, May 15 1999
Name edited by Joe B. Stephen, Jul 22 2023
STATUS
approved
Take the first n numbers written in base 3, concatenate them, then convert from base 3 to base 10.
+10
22
1, 5, 48, 436, 3929, 35367, 318310, 2864798, 77349555, 2088437995, 56387825876, 1522471298664, 41106725063941, 1109881576726421, 29966802571613382, 809103669433561330, 21845799074706155927, 589836575017066210047
OFFSET
1,2
COMMENTS
The first three primes in this sequence occur for n = 2 (a(2) = 5), n = 5 (a(5) = 3929), and n = 82 (a(82) = 1.1247...*10^140). - Kurt Foster, Oct 24 2015 [Comment added by N. J. A. Sloane, Oct 25 2015]
According to a comment made by Jeff Peltier following the "Most Wanted Prime" video, n = 2546 also gives a prime. See A360503. - N. J. A. Sloane, Feb 17 2023
LINKS
Brady Haran and N. J. A. Sloane, Most Wanted Prime, Numberphile video, December 2021.
EXAMPLE
a(6): (1)(2)(10)(11)(12)(20) = 1210111220_3 = 35367.
MATHEMATICA
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 *)
PROG
(Magma) [n eq 1 select 1 else Self(n-1)*3^(1+Ilog(3, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
CROSSREFS
Primes: A360503.
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.
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1999
STATUS
approved
Take the first n numbers written in base 4, concatenate them, then convert from base 4 to base 10.
+10
19
1, 6, 27, 436, 6981, 111702, 1787239, 28595832, 457533321, 7320533146, 117128530347, 1874056485564, 29984903769037, 479758460304606, 7676135364873711, 491272663351917520, 31441450454522721297, 2012252829089454163026
OFFSET
1,2
COMMENTS
There is no prime among the first 5000 terms (emails from Kurt Foster, Oct 21 2015 and Oct 24 2015). When is the first prime? - N. J. A. Sloane, Oct 25 2015
There is no prime among the first 45000 terms. - Giovanni Resta, Jun 07 2018
LINKS
FORMULA
a(n) = a(n-1) * 4^(1 + floor(log4(n))) + n. [Moved from A117640 by Jason Kimberley, Nov 27 2012]
EXAMPLE
a(7): (1)(2)(3)(10)(11)(12)(13) = 12310111213_4 = 1787239.
MATHEMATICA
a[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 4], 4]; Array[a, 20] (* Vincenzo Librandi, Dec 30 2012 *)
PROG
(Magma) [n eq 1 select 1 else Self(n-1) * 4^(1+Ilog(4, n)) + n: n in [1..20]]; // Jason Kimberley, Nov 27 2012
(Python)
from functools import reduce
def A048436(n): return reduce(lambda i, j:(i<<(bool((m:=j.bit_length())&1)<<1)+(m&-2))+j, range(n+1)) # Chai Wah Wu, Feb 26 2023
CROSSREFS
Cf. A014825.
Concatenation of first n numbers in other bases: 2: A047778, 3: A048435, 4: this sequence, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: A007908, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: A048446, 16: A048447. - Dylan Hamilton, Aug 11 2010
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1999
STATUS
approved
Take the first n numbers written in base 5, concatenate them, then convert from base 5 to base 10.
+10
18
1, 7, 38, 194, 4855, 121381, 3034532, 75863308, 1896582709, 47414567735, 1185364193386, 29634104834662, 740852620866563, 18521315521664089, 463032888041602240, 11575822201040056016, 289395555026001400417
OFFSET
1,2
COMMENTS
The first three primes in this sequence occur for n = 2 (a(2) = 7), n = 113 (a(113) = 7.4484...*10^216), n = 162 (a(162) = 1.5188...*10^346). - Kurt Foster, Oct 24 2015 [Comment added by N. J. A. Sloane, Oct 25 2015]
LINKS
EXAMPLE
a(7) = 1 2 3 4 10 11 12 = 3034532_10.
MATHEMATICA
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 *)
PROG
(Magma) [n eq 1 select 1 else Self(n-1)*5^(1+Ilog(5, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
CROSSREFS
Cf. A014827.
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.
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1999
STATUS
approved
Take the first n numbers written in base 16, concatenate them, then convert from base 16 to base 10.
+10
18
1, 18, 291, 4660, 74565, 1193046, 19088743, 305419896, 4886718345, 78187493530, 1250999896491, 20015998343868, 320255973501901, 5124095576030430, 81985529216486895, 20988295479420645136, 5373003642731685154833
OFFSET
1,2
LINKS
EXAMPLE
a(16) = (1)(2)(3)(4)(5)(6)(7)(8)(9)(A)(B)(C)(D)(E)(F)(10) = 123456789ABCDEF10_16 = 20988295479420645136.
MATHEMATICA
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 *)
PROG
(Magma) [n eq 1 select 1 else Self(n-1)*16^(1+Ilog(16, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
(Python)
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
CROSSREFS
Cf. A014899.
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.
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1999
STATUS
approved
Take the first n numbers written in base 6, concatenate them, then convert from base 6 to base 10.
+10
17
1, 8, 51, 310, 1865, 67146, 2417263, 87021476, 3132773145, 112779833230, 4060073996291, 146162663866488, 5261855899193581, 189426812370968930, 6819365245354881495, 245497148832775733836, 8837897357979926418113
OFFSET
1,2
COMMENTS
The first three primes in this sequence occur for n = 11 (a(11) = 4060073996291), n = 43 (a(43) =4.3194...*10^68), n = 173 (a(n) = 1.3014...*10^372) (email from Kurt Foster, Oct 24 2015). - N. J. A. Sloane, Oct 25 2015
LINKS
EXAMPLE
a(8) = (1)(2)(3)(4)(5)(10)(11)(12) = 12345101112_6 = 87021476.
MATHEMATICA
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 *)
PROG
(Magma) [n eq 1 select 1 else Self(n-1)*6^(1+Ilog(6, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
CROSSREFS
Cf. A014829.
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.
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1999
STATUS
approved
Take the first n numbers written in base 7, concatenate them, then convert from base 7 to base 10.
+10
17
1, 9, 66, 466, 3267, 22875, 1120882, 54923226, 2691238083, 131870666077, 6461662637784, 316621469251428, 15514451993319985, 760208147672679279, 37250199235961284686, 1825259762562102949630, 89437728365543044531887, 4382448689911609182062481
OFFSET
1,2
COMMENTS
The first two primes in this sequence occur for n = 10 (a(10) = 131870666077) and n = 37 (a(37) = 569432644200356239518976257368822195317881440478377541397) (email from Kurt Foster, Oct 24 2015). What is the next prime? - N. J. A. Sloane, Oct 25 2015
After a(37), there are no more primes through a(4000) = 2.2670...*10^14538. - Jon E. Schoenfield, Jan 19 2018
LINKS
EXAMPLE
a(8): (1)(2)(3)(4)(5)(6)(10)(11) = 1234561011_7 = 54923226.
MATHEMATICA
a[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 7], 7]; Array[a, 20] (* Vincenzo Librandi, Dec 30 2012 *)
PROG
(Magma) [n eq 1 select 1 else Self(n-1)*7^(1+Ilog(7, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
CROSSREFS
Cf. A014830.
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.
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1999
STATUS
approved
Take the first n numbers written in base 8, concatenate them, then convert from base 8 to base 10.
+10
17
1, 10, 83, 668, 5349, 42798, 342391, 21913032, 1402434057, 89755779658, 5744369898123, 367639673479884, 23528939102712589, 1505852102573605710, 96374534564710765455, 6167970212141488989136, 394750093577055295304721
OFFSET
1,2
COMMENTS
83 is the only prime in this sequence among the first 3000 terms (email from Kurt Foster, Oct 24 2015). - N. J. A. Sloane, Oct 25 2015
LINKS
EXAMPLE
a(9): (1)(2)(3)(4)(5)(6)(7)(10)(11) = 12345671011_8 = 1402434057.
MATHEMATICA
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 *)
PROG
(Magma) [n eq 1 select 1 else Self(n-1)*8^(1+Ilog(8, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
(Python)
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
CROSSREFS
Cf. A014831.
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.
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1999
STATUS
approved
Take the first n numbers written in base 9, concatenate them, then convert from base 9 to base 10.
+10
17
1, 11, 102, 922, 8303, 74733, 672604, 6053444, 490328973, 39716646823, 3217048392674, 260580919806606, 21107054504335099, 1709671414851143033, 138483384602942585688, 11217154152838349440744, 908589486379906304700281, 73595748396772410680722779
OFFSET
1,2
COMMENTS
The first two primes in this sequence occur for n = 2 (a(2) = 11) and n = 14 (a(14) = 1709671414851143033) (email from Kurt Foster, Oct 24 2015). - N. J. A. Sloane, Oct 25 2015
LINKS
EXAMPLE
a(9) = (1)(2)(3)(4)(5)(6)(7)(8)(10) = 1234567810_9 = 490328973.
MATHEMATICA
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 *)
PROG
(PARI) { 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
(Magma) [n eq 1 select 1 else Self(n-1)*9^(1+Ilog(9, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
CROSSREFS
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.
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1999
EXTENSIONS
More terms from Douglas Latimer, May 10 2012
STATUS
approved

Search completed in 0.013 seconds