login
Smallest "non-residue" pseudoprime to base prime(n).
2

%I #14 May 07 2019 15:18:31

%S 3277,3281,121463,491209,11530801,512330281,15656266201

%N Smallest "non-residue" pseudoprime to base prime(n).

%C a(n) is the smallest odd composite k, with q = A020649(k) = prime(n), such that q^((k-1)/2) == -1 (mod k).

%C a(8) <= 139309114031, a(9) <= 7947339136801, a(10) <= 72054898434289, a(11) <= 334152420730129, a(12) <= 17676352761153241, a(13) <= 172138573277896681. - _Daniel Suteu_, Apr 30 2019

%t residueQ[n_, m_] := Module[{ans = 0}, Do[If[Mod[k^2, m] == n, ans = True; Break[]], {k, 0, Floor[m/2]}]; ans]; A020649[n_] := Module[{m = 0}, While[ residueQ[m, n], m++]; m]; a[n_] := Module[{p = Prime[n], k = 3}, While[PrimeQ[k] || PowerMod[p, (k-1)/2, k] != k-1 || A020649[k] != p , k+=2]; k]; Array[a, 6]

%Y Cf. A000229, A020649, A307767 (the "non-residue" pseudoprimes).

%K nonn,hard,more

%O 1,1

%A _Amiram Eldar_ and _Thomas Ordowski_, Apr 30 2019

%E a(7) from _Daniel Suteu_, Apr 30 2019