OFFSET
1,2
COMMENTS
a(k) = b(k-5) for k > 8 where b(r) is the r-th term of A075340.
MATHEMATICA
a[1] = 1; a[2] = 4; a[n_] := a[n] = Block[{k = a[n - 1] + 1, m = a[n - 1]}, If[OddQ@n, While[ !PrimeQ@k || Mod[k, m] != 1, k += m]; k, While[PrimeQ@k || Mod[k, m] != 1, k += m]; k]]; Array[a, 40] (* Robert G. Wilson v Sep 21 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 18 2002
EXTENSIONS
More terms from David Wasserman, Jan 16 2005
STATUS
approved