login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A100996
a(1) = 1; a(n) is smallest positive integer such that a(n)*a(n-1)+1 is coprime to n.
0
1, 2, 2, 1, 1, 4, 1, 2, 2, 1, 1, 4, 1, 2, 3, 2, 1, 4, 1, 2, 2, 1, 1, 4, 2, 1, 1, 2, 1, 6, 1, 2, 2, 1, 1, 4, 1, 2, 2, 1, 1, 4, 1, 2, 3, 2, 1, 4, 1, 2, 2, 1, 1, 4, 2, 1, 1, 2, 1, 6, 1, 2, 2, 1, 1, 4, 1, 2, 2, 1, 1, 4, 1, 2, 3, 2, 1, 4, 1, 2, 2, 1, 1, 4, 2, 1, 1, 2, 1, 6, 3, 2, 2, 1, 1, 4, 1, 2, 2, 1, 1, 4, 1, 2, 5
OFFSET
1,2
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Block[{k = 1}, While[ GCD[k*a[n - 1] + 1, n] != 1, k++ ]; k]; Table[ a[n], {n, 105}]
CROSSREFS
Sequence in context: A319700 A279104 A165509 * A232504 A292201 A343070
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 13 2005
EXTENSIONS
More terms from Robert G. Wilson v, Feb 11 2005
STATUS
approved