login

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”).

a(n) = Sum_{i=0..n-1} i*10^i - Sum_{i=0..n-1} (n-1-i)*10^i.
0

%I #38 Dec 21 2020 17:43:20

%S 0,9,198,3087,41976,530865,6419754,75308643,864197532,9753086421,

%T 108641975310,1197530864199,13086419753088,141975308641977,

%U 1530864197530866,16419753086419755,175308641975308644,1864197530864197533,19753086419753086422,208641975308641975311,2197530864197530864200

%N a(n) = Sum_{i=0..n-1} i*10^i - Sum_{i=0..n-1} (n-1-i)*10^i.

%C Note that adding a constant k does not change the result: a(n) = (Sum_{i=0..n-1} (k+i) * 10^i) - (Sum_{i=0..n-1} (k+n-1-i) * 10^i). This means any set of consecutive numbers may be used to generate the terms.

%C a(n) = A019566(n) for n <= 9. This is an alternate generalisation of A019566 beyond n=9.

%C For two numbers A = Sum_{i=0..n-1} (x_i) * b^i and A' = Sum_{i=0..n-1} (x'_i) * b^i, A-A' is divisible by b-1 if Sum_{i=0..n-1} (x_i) = Sum_{i=0..n-1} (x'_i). x_i and x'_i are sets of integers. This is because b^i == 1 (mod b-1). In this specific case b=10, hence all terms are divisible by 9 and are given by a(n) = 9*A272525(n-1).

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (22,-141,220,-100).

%F a(n) = A052245(n) - A014824(n).

%F a(n+1) - a(n) = A033713(n+1).

%F a(n) = ((9*n - 11)*10^n + (9*n + 11))/81. - _Andrew Howroyd_, Oct 26 2020

%F From _Colin Barker_, Oct 26 2020: (Start)

%F G.f.: 9*x^2 / ((1 - x)^2*(1 - 10*x)^2).

%F a(n) = 22*a(n-1) - 141*a(n-2) + 220*a(n-3) - 100*a(n-4) for n>4.

%F (End)

%F E.g.f.: exp(x)*(11 + 9*x + exp(9*x)*(90*x - 11))/81. - _Stefano Spezia_, Oct 27 2020

%t LinearRecurrence[{22, -141, 220, -100}, {0, 9, 198, 3087}, 21] (* _Amiram Eldar_, Oct 26 2020 *)

%o (PARI) concat(0, Vec(9*x^2 / ((1 - x)^2*(1 - 10*x)^2) + O(x^20))) \\ _Colin Barker_, Oct 27 2020

%Y Cf. A033713 (first differences), A019566 ("unique" numbers).

%K nonn,base,easy

%O 1,2

%A _Abhinav S. Sharma_, Oct 17 2020