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.

A291438 Smallest prime of the form (2*n)*3^m + 1 for some m >= 0, or -1 if no such prime exists.

This page as a plain text file.
%I A291438 #19 Aug 30 2017 21:48:44
%S A291438 3,5,7,73,11,13,43,17,19,61,23,73,79,29,31,97,103,37,3079,41,43,397,
%T A291438 47,433,151,53,163,1102249,59,61,5023,193,67,613,71,73,223,229,79,241,
%U A291438 83,757,6967,89,271,277,283,97,883,101,103,313,107,109,331,113,3079
%N A291438 Smallest prime of the form (2*n)*3^m + 1 for some m >= 0, or -1 if no such prime exists.
%C A291438 There exist even integers 2*n such that (2*n)*3^m + 1 is always composite.
%C A291438 It is conjectured that the smallest one is 125050976086 = A123159(3), therefore a(62525488043) = -1.
%C A291438 For the corresponding numbers m see A291437.
%H A291438 Robert G. Wilson v, <a href="/A291438/b291438.txt">Table of n, a(n) for n = 1..1000</a>
%e A291438 a(4) = 73 because 8*3^2 + 1 = 73 is the smallest prime of this form, since 8*3^0 + 1 = 9 and 8*3^1 + 1 = 25 are not prime.
%p A291438 a:=[]:
%p A291438 for n from 1 to 10^3 do
%p A291438   t:=-1:
%p A291438   for m from 0 to 10^3 do # this max value of m is sufficient up to n=10^3
%p A291438     if isprime((2*n)*3^m+1) then t:=m: break: fi:
%p A291438   od:
%p A291438   a:=[op(a),(2*n)*3^t+1]:
%p A291438 od:
%p A291438 a;
%t A291438 Table[If[# < 0, #, 1 + 2 n*3^#] &@ SelectFirst[Range[0, 10^3], PrimeQ[2 n*3^# + 1] &] /. k_ /; MissingQ@ k -> -1, {n, 60}] (* _Michael De Vlieger_, Aug 23 2017 *)
%o A291438 (PARI) a(n) = {my(m = 0); while (!isprime(p=(2*n)*3^m + 1), m++); p;} \\ _Michel Marcus_, Aug 25 2017
%Y A291438 Cf. A057025, A123159, A291437.
%K A291438 nonn
%O A291438 1,1
%A A291438 _Martin Renner_, Aug 23 2017