Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #34 Jun 15 2015 02:29:36
%S 1,1,1,0,1,1,1,4,0,1,1,1,1,0,2,1,1,1,0,5,1,4,1,0,1,1,1,2,0,1,2,1,1,0,
%T 1,2,1,1,0,1,5,5,2,0,1,1,1,3,0,2,1,1,7,0,1,1,2,1,0,2,1,1,1,0,2,1,8,1,
%U 0,1,2,1,1,0,7,1,1,4,0,4,1,2,1,0,2,5,1,2,0,1,1,2,3,0,1,1,9,2,0,1,1,1,1,0,1,6,1,2,0,1,3,1,4,0,1,2,23,1,0,4
%N Sierpiński problem in base 6: Least k > 0 such that n*6^k+1 is prime, or 0 if no such k exists.
%C a(5k+4) = 0, since (5k+4)*6^n+1 is always divisible by 5, but there are infinitely many numbers not in the form 5k+4 such that a(n) = 0. For example, a(174308) = 0 since 174308*6^n+1 is always divisible by 7, 13, 31, 37, or 97 (See A123159). Conjecture: if n is not in the form 5k+4 and n < 174308, then a(n) > 0.
%C However, according to the Barnes link no primes n*6^k+1 are known for n = 1296, 7776 and 46656, so these may be counterexamples. - _Robert Israel_, Mar 17 2015
%H Eric Chen, <a href="/A250204/b250204.txt">Table of n, a(n) for n = 1..1000</a>
%H Gary Barnes, <a href="http://www.noprimeleftbehind.net/crus/Sierp-conjectures.htm">Sierpinski conjectures and proofs</a>
%p N:= 1000: # to get a(1) to a(N), using k up to 10000
%p a[1]:= 1:
%p for n from 2 to N do
%p if n mod 5 = 4 then a[n]:= 0
%p else
%p for k from 1 to 10000 do
%p if isprime(n*6^k+1) then
%p a[n]:= k;
%p break
%p fi
%p od
%p fi
%p od:
%p L:= [seq(a[n],n=1..N)]; # _Robert Israel_, Mar 17 2015
%t (* m <= 10000 is sufficient up to n = 1000 *)
%t a[n_] := For[k = 1, k <= 10000, k++, If[PrimeQ[n*6^k + 1], Return[k]]] /. Null -> 0; Table[a[n], {n, 1, 120}]
%o (PARI) a(n) = if(n%5==4, 0, for(k = 1, 10000, if(ispseudoprime(n*6^k+1), return(k))))
%Y Cf. A040076, A046067, A078680, A033809, A123159.
%Y Cf. A250205 (Least k > 0 such that n*6^k-1 is prime).
%K nonn
%O 1,8
%A _Eric Chen_, Mar 11 2015