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.

A216487 Smallest prime factor of n^(2n) - 1 having the form k*n+1.

This page as a plain text file.
%I A216487 #20 May 17 2024 03:20:20
%S A216487 3,7,5,11,7,29,17,19,11,23,13,53,29,31,17,10949,19,108301,41,43,23,47,
%T A216487 73,101,53,109,29,59,31,373,257,67,103,71,37,149,191,79,41,83,43,173,
%U A216487 89,181,47,659,97,197,101,103,53,107,109,881,113,229,59,709,61,977
%N A216487 Smallest prime factor of n^(2n) - 1 having the form k*n+1.
%C A216487 The corresponding values of k are in A216506.
%H A216487 Amiram Eldar, <a href="/A216487/b216487.txt">Table of n, a(n) for n = 2..670</a>
%F A216487 a(n) = Min{A187022(n), A187023(n)}.
%e A216487 a(7) = 29 because 7^14 - 1 = 2 ^ 4 * 3 * 29 * 113 * 911 * 4733 and the smallest prime divisor of the form k*n+1 is 29 = 4*7+1.
%t A216487 Table[p=First/@FactorInteger[n^(2*n)-1]; Select[p, Mod[#1, n] == 1 &, 1][[1]], {n, 2, 41}]
%t A216487 a[n_] := Module[{m = n + 1}, While[!PrimeQ[m] || PowerMod[n, 2*n, m] != 1, m += n]; m]; Array[a, 100, 2] (* _Amiram Eldar_, May 17 2024 *)
%o A216487 (PARI) a(n) = {my(m = n + 1); while(!isprime(m) || Mod(n, m)^(2*n) != 1, m += n); m;} \\ _Amiram Eldar_, May 17 2024
%Y A216487 Cf. A006486, A007571, A187022, A187023, A216506.
%K A216487 nonn
%O A216487 2,1
%A A216487 _Michel Lagneau_, Sep 11 2012
%E A216487 Data corrected by _Amiram Eldar_, May 17 2024