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(1) = 1. a(n) = n times (10's complement of a(n-1)).
2

%I #22 Sep 22 2015 08:20:02

%S 1,18,246,3016,34920,390480,4266640,45866880,487198080,5128019200,

%T 53591788800,556898534400,5760319052800,59355533260800,

%U 609667001088000,6245327982592000,63829424295936000,651070362673152000,6629663109210112000,67406737815797760000

%N a(1) = 1. a(n) = n times (10's complement of a(n-1)).

%C a(1)=1; a(n)=n*[10...0 - a(n-1)] for n>1 (00...0 and a[n-1] have the same number of digits). - _Emeric Deutsch_, Jul 31 2005

%H Sidney Cadot, <a href="/A110395/b110395.txt">Table of n, a(n) for n = 1..200</a>

%e a(4) = 4* 10's complement of a(3) = 4*(1000-246) = 3016.

%p s:=proc(m) nops(convert(m,base,10)) end: a[1]:=1: for n from 2 to 21 do a[n]:=n*(10^s(a[n-1])-a[n-1]) od: seq(a[n],n=1..21); # _Emeric Deutsch_, Jul 31 2005

%p # second Maple program:

%p a:= proc(n) option remember; `if`(n<2, n,

%p n*(p-> 10^length(p)-p)(a(n-1)))

%p end:

%p seq(a(n), n=1..25); # _Alois P. Heinz_, Sep 22 2015

%t a110395[numTerms_] := Block[{complement, a},

%t complement[n_] := 10^IntegerLength[n] - n;

%t a[n_] := a[n] = If[n == 1, 1, n*complement[a[n - 1]]];

%t Table[a[n], {n, 1, numTerms}

%t ]];(* _Sidney Cadot_, Sep 22 2015 *)

%t a110395[50]

%Y Cf. A110394.

%K base,easy,nonn

%O 1,2

%A _Amarnath Murthy_, Jul 29 2005

%E More terms from _Emeric Deutsch_, Jul 31 2005

%E Incorrect formula and corresponding Mathematica program removed by _Sidney Cadot_, Sep 22 2015