Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #39 Feb 26 2023 14:40:11
%S 1,10,83,668,5349,42798,342391,21913032,1402434057,89755779658,
%T 5744369898123,367639673479884,23528939102712589,1505852102573605710,
%U 96374534564710765455,6167970212141488989136,394750093577055295304721
%N Take the first n numbers written in base 8, concatenate them, then convert from base 8 to base 10.
%C 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
%H Harvey P. Dale, <a href="/A048440/b048440.txt">Table of n, a(n) for n = 1..390</a>
%e a(9): (1)(2)(3)(4)(5)(6)(7)(10)(11) = 12345671011_8 = 1402434057.
%t 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 *)
%t Table[FromDigits[Flatten[IntegerDigits[#,8]&/@Range[n]],8],{n,20}] (* _Harvey P. Dale_, Dec 07 2012 *)
%o (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
%o (Python)
%o from functools import reduce
%o 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
%Y Cf. A014831.
%Y 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.
%K nonn,base,easy
%O 1,2
%A _Patrick De Geest_, May 15 1999