OFFSET
1,3
COMMENTS
This is the 10-adic integer x such that x^9 == (10^n-9) mod 10^n for all n. It is the 10's complement of A225458. - Aswini Vaidyanathan, May 11 2013
EXAMPLE
1111^1111=.........8711; 111^111=........711;
10^(1-4)(8711-711)=8 ==> a(4)=8
Comment from Aswini Vaidyanathan, May 11 2013:
1^9 == 1 (mod 10).
11^9 == 91 (mod 100).
711^9 == 991 (mod 1000).
8711^9 == 9991 (mod 10000).
78711^9 == 99991 (mod 100000).
78711^9 == 999991 (mod 1000000).
MATHEMATICA
repunit[n_] := Sum[10^i, {i, 0, n-1}]; a[n_] := 10^(1-n)(PowerMod[repunit[n], repunit[n], 10^n] - PowerMod[repunit[n-1], repunit[n-1], 10^(n-1)]); Table[a[n], {n, 200}]
PROG
(PARI) n=0; for(i=1, 100, m=(10^i-9); for(x=0, 9, if(((n+(x*10^(i-1)))^9)%(10^i)==m, n=n+(x*10^(i-1)); print1(x", "); break))) (From Aswini Vaidyanathan, May 11 2013)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
José María Grau Ribas, Jul 23 2011
EXTENSIONS
Edited by N. J. A. Sloane, May 12 2013
STATUS
approved