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.

A248849 Smallest k>0 such that 2^k*3^n-1 is a prime number.

This page as a plain text file.
%I A248849 #22 Apr 25 2016 11:50:04
%S A248849 1,1,1,3,2,5,1,1,4,3,20,1,4,13,2,11,3,101,12,1,10,9,1,11,7,27,1,347,
%T A248849 11,73,4,7,52,93,1,7,51,73,46,11,8,41,4,51,2,5,30,11,10,3,280,11,7,17,
%U A248849 14,1,32,11,5,11,19,1,20,17,22,133,6,1
%N A248849 Smallest k>0 such that 2^k*3^n-1 is a prime number.
%H A248849 Pierre CAMI, <a href="/A248849/b248849.txt">Table of n, a(n) for n = 1..1500</a>
%F A248849 a(n)=1 for n=A003307(i).
%e A248849 2^1*3^1-1=5 prime so a(1)=1.
%e A248849 2^1*3^2-1=17 prime so a(2)=1.
%e A248849 2^1*3^3-1=53 prime so a(3)=1.
%t A248849 Flatten[{1,Table[k=0; While[Not[PrimeQ[2^k*3^n-1]],k++]; k,{n,2,100}]}] (* _Vaclav Kotesovec_, Dec 05 2014 *)
%o A248849 (PFGW & SCRIPT)
%o A248849 SCRIPT
%o A248849 DIM n,0
%o A248849 DIM k
%o A248849 LABEL loop1
%o A248849 SET n,n+1
%o A248849 SET k,0
%o A248849 LABEL loop2
%o A248849 SET k,k+1
%o A248849 PRP 2^k*3^n-1
%o A248849 IF ISPRP THEN GOTO loop1
%o A248849 GOTO loop2
%Y A248849 Cf. A003307.
%K A248849 nonn
%O A248849 1,4
%A A248849 _Pierre CAMI_, Dec 03 2014