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.

A225941 Smallest k such that k*6^n-1 is prime.

This page as a plain text file.
%I A225941 #17 Jul 23 2025 05:25:42
%S A225941 1,2,2,2,2,3,5,13,3,19,5,2,3,28,12,2,15,19,19,20,7,13,5,3,4,2,2,7,42,
%T A225941 7,4,7,5,34,8,2,78,13,12,2,3,24,4,12,2,37,30,5,2,28,12,2,2,35,59,58,
%U A225941 15,65,82,28,32,60,10,48,8,14,23,5,32,18,3,80,28,12,2
%N A225941 Smallest k such that k*6^n-1 is prime.
%C A225941 In average k~0.6*n and 0<k<8*n until a proof k may be >8*n
%H A225941 Pierre CAMI, <a href="/A225941/b225941.txt">Table of n, a(n) for n = 1..3000</a>
%t A225941 skp[n_]:=Module[{k=1,c=6^n},While[!PrimeQ[k*c-1],k++];k]; Array[skp,80] (* _Harvey P. Dale_, Jul 22 2013 *)
%o A225941 (PFGW & SCRIPTIFY)
%o A225941 SCRIPT
%o A225941 DIM n, 0
%o A225941 DIM k
%o A225941 DIMS t
%o A225941 OPENFILEOUT myf, a(n).txt
%o A225941 LABEL a
%o A225941 SET n, n+1
%o A225941 IF n>3000 THEN END
%o A225941 SET k, 0
%o A225941 LABEL b
%o A225941 SET k, k+1
%o A225941 SETS t, %d, %d\,; n; k
%o A225941 PRP k*6^n-1, t
%o A225941 IF ISPRP THEN GOTO c
%o A225941 GOTO b
%o A225941 LABEL c
%o A225941 WRITE myf, t
%o A225941 GOTO a
%o A225941 (PARI) a(n) = my(k=1); while (!isprime(k*6^n-1), k++); k; \\ _Michel Marcus_, Sep 16 2019
%Y A225941 Cf. A225911.
%K A225941 nonn
%O A225941 1,2
%A A225941 _Pierre CAMI_, May 21 2013