cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A064673 Where the least prime p such that n = (p-1)/(q-1) and p > q is not the least prime == 1 (mod n) (A034694).

This page as a plain text file.
%I A064673 #9 May 09 2024 16:12:06
%S A064673 24,32,34,38,62,64,71,76,80,92,94,104,110,117,122,124,129,132,144,149,
%T A064673 152,154,159,164,167,182,184,185,188,201,202,206,212,214,218,220,225,
%U A064673 227,236,242,244,246,252,264,269,272,274,286,290,294
%N A064673 Where the least prime p such that n = (p-1)/(q-1) and p > q is not the least prime == 1 (mod n) (A034694).
%H A064673 Robert Israel, <a href="/A064673/b064673.txt">Table of n, a(n) for n = 1..10000</a>
%e A064673 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.
%p A064673 f:= proc(n) local k;
%p A064673   for k from n+1 by n do
%p A064673     if isprime(k) then return k fi
%p A064673   od
%p A064673 end proc:
%p A064673 filter:= proc(n) local p;
%p A064673     p:= f(n);
%p A064673     not isprime(1+(p-1)/n)
%p A064673 end proc:
%p A064673 select(filter, [$1..1000]); # _Robert Israel_, May 09 2024
%t A064673 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} ]
%Y A064673 Cf. A034694, A064632, A064652. Disjoint from A005097 and A006093.
%K A064673 easy,nonn
%O A064673 1,1
%A A064673 _Robert G. Wilson v_, Oct 16 2001