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.

A189240 Least number k such that 2*k*n + 1 is a prime dividing 3^n + 1.

This page as a plain text file.
%I A189240 #12 Feb 03 2020 03:50:20
%S A189240 1,1,5,6,6,39,1,1,59,3,270,15330,1,1,672605,3,2,75,1,1,125,511647711,
%T A189240 2,3,1,360,7691,9,796056,111,14476720225405,1,14064,5355114024,90,249,
%U A189240 69757,1,180
%N A189240 Least number k such that 2*k*n + 1 is a prime dividing 3^n + 1.
%C A189240 The smallest prime factor of 3^n+1 of the form 2k*n+1 is A189241(n).
%H A189240 Amiram Eldar, <a href="/A189240/b189240.txt">Table of n, a(n) for n = 2..658</a>
%e A189240 a(4) = 5 because 3^4+1 = 2*41 => the smallest prime divisor of the form  2k*n+1 is 41 = 2*5*4+1.
%t A189240 Table[p=First/@FactorInteger[3^n+1]; (Select[p, Mod[#1, n] == 1 &, 1][[1]]
%t A189240   - 1)/(2n), {n, 2, 40}]
%o A189240 (PARI) a(n)=forstep(K=2*n+1,3^n+1,2*n,if(Mod(3,K)^n==0,return((k-1)/2/n))) \\ _Charles R Greathouse IV_, May 15 2013
%Y A189240 Cf. A189241, A074476 (largest prime factor of 3^n + 1)
%K A189240 nonn
%O A189240 2,3
%A A189240 _Michel Lagneau_, Apr 19 2011