OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
MATHEMATICA
fQ[n_] := Union[ MemberQ[{1, 7}, # ] & /@ Union@ Mod[ Rest@ Divisors@ n, 8]] == {False}; fQ[1] = True; Select[ Range@ 200, fQ] (* Robert G. Wilson v, Oct 06 2010 *)
PROG
(Python) # Works in Python 2 or 3
import itertools
for n in itertools.count(1):
for k in range(1, 2+n//8):
if n%(8*k-1)==0 or n%(8*k+1)==0:
break
else:
print(n)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Glenn G. Chappell, Sep 13 2010
EXTENSIONS
More terms from Robert G. Wilson v, Oct 06 2010
STATUS
approved