OFFSET
1,2
EXAMPLE
a(3) = 125 = 5^3 = 31*a(2) + 1 where a(2) = 4=2^2 = 3*1 + 1.
PROG
(PARI) v=vector(15):v[2]=4:print1("1, 4, "):for(n=3, 15, for(k=2, 10^8, if(((k^n)%(v[n-1]))==1, print1(k^n", "):v[n]=k^n:break)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Mar 20 2002
EXTENSIONS
Corrected and extended by Ralf Stephan, Mar 21 2003
STATUS
approved