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 #9 Mar 13 2024 19:45:24
%S 1,16,249,3000,34995,390024,4269825,45841392,487427463,5125725360,
%T 53617021029,556595747640,5764255280667,59300426070648,
%U 610493608940265,6232102256955744,64054261631752335,647023290628457952
%N a(1) = 1; a(n) = n times (9's complement of a(n-1)).
%C a(1)=1; a(n)=n*[99...9 - a(n-1)] for n>1 (99...9 and a[n-1] have the same number of digits). - _Emeric Deutsch_, Jul 31 2005
%H Alois P. Heinz, <a href="/A110394/b110394.txt">Table of n, a(n) for n = 1..400</a>
%e a(4) = 4 times 9's complement of a(3) = 4*(999-249) = 3000.
%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])-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=1, 1,
%p n*(p-> 10^length(p)-1-p)(a(n-1)))
%p end:
%p seq(a(n), n=1..30); # _Alois P. Heinz_, Sep 22 2015
%t nxt[{n_,a_}]:={n+1,(n+1)(FromDigits[PadRight[{},IntegerLength[a],9]]-a)}; NestList[nxt,{1,1},20][[;;,2]] (* _Harvey P. Dale_, Mar 13 2024 *)
%K base,easy,nonn
%O 1,2
%A _Amarnath Murthy_, Jul 29 2005
%E More terms from _Emeric Deutsch_, Jul 31 2005