OFFSET
1,2
EXAMPLE
For n=11, the residues n mod prime(j) for j>=1 begin with 11 mod 2 = 1, 11 mod 3 = 2, and 11 mod 5 = 1; the first 2 residues are distinct, but the 3rd is a repeat of an earlier one, so a(11) = 2.
For n=87, the residues n mod prime(j) for j>=1 begin with 87 mod 2 = 1, 87 mod 3 = 0, 87 mod 5 = 2, 87 mod 7 = 3, 87 mod 11 = 10, 87 mod 13 = 9, 87 mod 17 = 2; the first 6 residues are all distinct, but the 7th is a repeat (87 mod 17 = 87 mod 5 = 2), so a(87) = 6.
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon E. Schoenfield, Jan 15 2017
STATUS
approved