%I #21 Apr 23 2022 14:56:12
%S 1,110,11120,1200201,121221020,20021100110,2022201111201,
%T 212020020002100,22121022020212200,1011212101120110200001,
%U 11101000122011021220211010,121012010100112220022220220120
%N Base 3 representation of the concatenation of the first n numbers with the most significant digits first.
%C Consider numbers of the form 1, 12, 123, 1234, ..., N. Find the highest power of 3^p such that 3^p <= N. Then p = [log(N)/log(3)] and for 0 <= qi <= 2 [N/3^p] = q1 + r1 [r1/3^(p-1)] = q2 + r2 ........................ rp/3^1 = qp + rp+1 rp+1/3^0 = qp+1 0 For N = 1234, p = [log(1234)/log(3)] = 6 division quot rem 1234/3^6 = 1 505 505/3^5 = 2 19 19/3^4 = 0 19 19/3^3 = 0 19 19/3^2 = 2 1 1/3^1 = 0 1 1/3^0 = 1 0 The sequence of quotients, top down, form the entry in the table for 1234. Obviously this algorithm works for any N.
%H Seiichi Manyama, <a href="/A097580/b097580.txt">Table of n, a(n) for n = 1..195</a>
%F a(n) = A007089(A007908(n)). - _Seiichi Manyama_, Apr 23 2022
%e The 4th concatenation of the integers > 0 is 1234. base(10,3,1234) = 1200201 the 4th entry in the table.
%t Table[FromDigits[IntegerDigits[FromDigits[Flatten[Table[ IntegerDigits[n],{n,i}]]],3]],{i,12}] (* _Harvey P. Dale_, May 23 2011 *)
%Y Cf. A007908, A050926, A097582, A097583.
%Y Cf. A007089.
%K base,nonn
%O 1,2
%A _Cino Hilliard_, Aug 29 2004
|