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.

A070848 Smallest prime == 1 mod (4n).

This page as a plain text file.
%I A070848 #21 May 17 2021 17:22:54
%S A070848 5,17,13,17,41,73,29,97,37,41,89,97,53,113,61,193,137,73,229,241,337,
%T A070848 89,277,97,101,313,109,113,233,241,373,257,397,137,281,433,149,457,
%U A070848 157,641,821,337,173,353,181,1289,941,193,197,401,409,1249,1061,433,661
%N A070848 Smallest prime == 1 mod (4n).
%C A070848 Note interesting patterns in the graph. - _Zak Seidov_, Dec 13 2011
%H A070848 Zak Seidov, <a href="/A070848/b070848.txt">Table of n, a(n) for n = 1..10000</a>
%e A070848 5 is the smallest prime of the form 1+4m, 17 is the smallest prime of the form 1+8m, 13 is the smallest prime of the form 1+12m, etc. - _Zak Seidov_, Dec 13 2011
%t A070848 nn=100; Reap[Do[p=1+4n; While[!PrimeQ[p], p=p+4n]; Sow[p], {n,nn}]][[2,1]] (* _Zak Seidov_, Dec 13 2011 *)
%o A070848 (PARI) for(n=1,80,s=1; while((isprime(s)*s-1)%(4*n)>0,s++); print1(s,","))
%o A070848 (PARI) nn=10000;for(n=1,nn,s=1+4*n;while(!isprime(s),s=s+4*n);print1(s,", ")) \\ _Zak Seidov_, Dec 13 2011
%o A070848 (Python)
%o A070848 from sympy import isprime
%o A070848 def a(n):
%o A070848   k = 4*n + 1
%o A070848   while not isprime(k): k += 4*n
%o A070848   return k
%o A070848 print([a(n) for n in range(1, 56)]) # _Michael S. Branicky_, May 17 2021
%Y A070848 Cf. A070846, A070847, A070849, A070850, A070851, A070852, A070853.
%Y A070848 Cf. A034694.
%K A070848 nonn
%O A070848 1,1
%A A070848 _Amarnath Murthy_, May 15 2002
%E A070848 More terms from _Benoit Cloitre_, May 18 2002