|
%I
%S 3,33,315,26163,235953,2125035,19129689,172180323,1549662273,
%T 13947078555,125524061289,1129717614483,10167461718993,91507165036875,
%U 823564514029689,7412080712360643,66708726669526113,600378540800575995,5403406869529706889,48630661832740930803
%N Sum of all proper ternary numbers with n digits (those not beginning with 0).
%C First differences of A026121. A026121 is partial sums of a(n). Sum of the first 2*(3^(n-1)) integers starting with 3^n. cf. A010036 = Sum of all proper binary numbers with n digits (i.e. those not beginning with 0) = Sum of 2^n, ..., 2^(n+1) - 1 = 3*2^(2*n-3)-2^(n-2). cf. A101291 Sum of all numbers with n digits [base 10]. cf. A026121 3^n*(3^n-1)/2.
%H <a href="/index/Rea#recLCC">Index to sequences with linear recurrences with constant coefficients</a>, signature (12,-27).
%F a(n) = (((3^n)*((3^n)-1)) - ((3^(n-1))*((3^(n-1)-1))))/2. a(n) = SUM[i=3^(n-1)..(3^n)-1]i.
%F a(n) = 3^n*(-1+4*3^n) for n>4. G.f.: -3*x*(23166*x^4-7758*x^3+x-1) / ((3*x-1)*(9*x-1)). - _Colin Barker_, Apr 30 2013
%e a(1) = 3 = 1 + 2.
%e a(2) = 33 = 10_3 + 11_3 + 12_3 + 20_3 + 21_3 + 22_3 = 3+4+5+6+7.
%e a(3) = 315 = 100_3 + 101_3 + 102_3 + 110_3 + 111_3 + 112_3 + 120_3 + 121_3 + 122_3 + 200_3 + 201_3 + 202_3 + 210_3 + 211_3 + 212_3 + 220_3 + 221_3 + 222_3 = 9+10+11+12+13+14+15+16+17+18+19+20+21+22+23+24+25+26.
%Y Cf. A010036, A026121, A101291.
%K easy,nonn,base
%O 1,1
%A _Jonathan Vos Post_, Sep 07 2006
%E More terms from _Colin Barker_, Apr 30 2013
|