|
|
A110395
|
|
a(1) = 1. a(n) = n times (10's complement of a(n-1)).
|
|
2
|
|
|
1, 18, 246, 3016, 34920, 390480, 4266640, 45866880, 487198080, 5128019200, 53591788800, 556898534400, 5760319052800, 59355533260800, 609667001088000, 6245327982592000, 63829424295936000, 651070362673152000, 6629663109210112000, 67406737815797760000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 4* 10's complement of a(3) = 4*(1000-246) = 3016.
|
|
MAPLE
|
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
# second Maple program:
a:= proc(n) option remember; `if`(n<2, n,
n*(p-> 10^length(p)-p)(a(n-1)))
end:
|
|
MATHEMATICA
|
a110395[numTerms_] := Block[{complement, a},
complement[n_] := 10^IntegerLength[n] - n;
a[n_] := a[n] = If[n == 1, 1, n*complement[a[n - 1]]];
Table[a[n], {n, 1, numTerms}
a110395[50]
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Incorrect formula and corresponding Mathematica program removed by Sidney Cadot, Sep 22 2015
|
|
STATUS
|
approved
|
|
|
|