OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
24 is in the sequence because (97-1)/(5-1) whereas the first prime ==1 (Mod 24) is 73. See the comment in A034694 about the multiplier k and it must differ from q-1 or k+1 is not prime.
MAPLE
f:= proc(n) local k;
for k from n+1 by n do
if isprime(k) then return k fi
od
end proc:
filter:= proc(n) local p;
p:= f(n);
not isprime(1+(p-1)/n)
end proc:
select(filter, [$1..1000]); # Robert Israel, May 09 2024
MATHEMATICA
NextPrim[n_] := (k = n + 1; While[ !PrimeQ[k], k++ ]; k); Do[p = 2; While[q = (p - 1)/n + 1; !PrimeQ[q] || q >= p, p = NextPrim[p]]; k = 1; While[ !PrimeQ[k*n + 1], k++ ]; If[p != k*n + 1, Print[n]], {n, 2, 300} ]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Oct 16 2001
STATUS
approved