OFFSET
1,2
COMMENTS
Proposition: n^(n-1) - 1 == 0 (mod (n-1)^2). Hence a(n) == 0 mod (n-1).
a(n) is the common difference of the arithmetic progression in row n of A111568. Written in base n, a(n) has n-1 digits equal to 2 (for example, a(10)=222222222). - Emeric Deutsch, Aug 08 2005
FORMULA
a(1) = 1, a(n) = 2*(n^(n-1) - 1)/(n-1) for n > 1.
MAPLE
a:=proc(n) if n=1 then 1 else 2*(n^(n-1)-1)/(n-1) fi end: seq(a(n), n=1..20); # Emeric Deutsch, Aug 08 2005
MATHEMATICA
f[n_] := (2*n^(n-1) - 2)/(n-1); Table[f[i], {i, 2, 30}] (* Ryan Propper, Aug 08 2005 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 05 2004
EXTENSIONS
More terms from Emeric Deutsch and Ryan Propper, Aug 08 2005
STATUS
approved