login
A108908
Largest n-digit number coprime to n.
0
9, 99, 998, 9999, 99999, 999997, 9999999, 99999999, 999999998, 9999999999, 99999999999, 999999999997, 9999999999999, 99999999999999, 999999999999998, 9999999999999999, 99999999999999999, 999999999999999997
OFFSET
1,1
COMMENTS
a(286) = 10^286 - 5 is the first term with a(n) < 10^n - 3. - Rick L. Shepherd
MATHEMATICA
f[n_] := Block[{k=10^n-1}, While[ GCD[n, k]>1, k-- ]; k]; Table[ f[n], {n, 18}] (* Robert G. Wilson v *)
PROG
(PARI) for(n=1, 300, m=10^n-1; while(gcd(m, n)>1, m--); print1(m, ", ")) (Rick L. Shepherd)
CROSSREFS
Sequence in context: A070843 A261512 A242809 * A116260 A103456 A002283
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Jul 19 2005
EXTENSIONS
More terms from Rick L. Shepherd and Robert G. Wilson v, Jul 21 2005
STATUS
approved