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.

A037039 Least k such that 4*n*k+1 is a prime.

This page as a plain text file.
%I A037039 #10 Aug 11 2025 11:31:14
%S A037039 1,2,1,1,2,3,1,3,1,1,2,2,1,2,1,3,2,1,3,3,4,1,3,1,1,3,1,1,2,2,3,2,3,1,
%T A037039 2,3,1,3,1,4,5,2,1,2,1,7,5,1,1,2,2,6,5,2,3,2,1,1,3,1,3,6,3,1,2,5,1,5,
%U A037039 1,1,2,2,1,2,2,4,2,1,1,2,4,7,3,1,3,3,1,1,3,5,3,9,1,3,2,2,1,8,1,1,2,1,3,3,1
%N A037039 Least k such that 4*n*k+1 is a prime.
%e A037039 a(5)=2 because for n=5: 4*5*2+1=41 is a prime.
%t A037039 Table[Module[{k=1},While[!PrimeQ[4 n*k+1],k++];k],{n,110}] (* _Harvey P. Dale_, Aug 11 2025 *)
%o A037039 (PARI) a(n) = my(k = 0); while (! isprime(4*n*k+1), k++); k; \\ _Michel Marcus_, Sep 28 2013
%Y A037039 Cf. A016014.
%K A037039 nonn
%O A037039 1,2
%A A037039 _Felice Russo_
%E A037039 More terms from _Erich Friedman_