OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
24 because 24 mod 13 = 11. 40 because 40 mod 7 = 5. 51 because 51 mod 11 = 7.
MAPLE
N:= 500: # for all terms <= N
p:= 2:
S:= {}:
while p <= N do
q:= nextprime(p);
S:= S union {seq(i, i=p..N, q)};
p:= q;
od:
sort(convert(S, list)); # Robert Israel, Mar 30 2018
MATHEMATICA
nn=150; u={}; Do[lst=Prime[i]+Range[0, Ceiling[nn/Prime[i+1]]]Prime[i+1]; u=Union[u, lst], {i, PrimePi[nn]}]; Intersection[u, Range[nn]] (Noe)
CROSSREFS
KEYWORD
nonn
AUTHOR
Christopher M. Tomaszewski (cmt1288(AT)comcast.net), May 14 2005
EXTENSIONS
Corrected and extended by T. D. Noe, Oct 25 2005
STATUS
approved