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.

A350813 a(n) is the least positive number k such that the product of the first n primes that are congruent to 1 (mod 4) is equal to y^2 - k^2 for some integer y.

This page as a plain text file.
%I A350813 #61 Mar 30 2022 21:43:52
%S A350813 2,4,24,38,16,588,5782,5528,80872,319296,3217476,32301914,20085008,
%T A350813 166518276,2049477188,17443412442,27905362944,233647747282,
%U A350813 886295348972,134684992249108,98002282636962,392994156083892,5283713761100536,76642755213473624,923250078609721236
%N A350813 a(n) is the least positive number k such that the product of the first n primes that are congruent to 1 (mod 4) is equal to y^2 - k^2 for some integer y.
%C A350813 Because y^2-k^2=(y-k)(y+k), a method to make k as small as possible is to try to make y-k and y+k as nearly equal as possible.
%C A350813 Because each of y-k and y+k are made up of primes of form 1 mod 4, algebra shows that k=a(n) is always even.
%H A350813 Chai Wah Wu, <a href="/A350813/b350813.txt">Table of n, a(n) for n = 1..36</a>
%e A350813 For n=3, m = 5*13*17. The "middle" most nearly equal divisor and codivisor of m are y-k=17 and y+k=65, whence a(n) = (65 - 17)/2 = 24.
%o A350813 (Python)
%o A350813 from math import prod, isqrt
%o A350813 from itertools import islice
%o A350813 from sympy import sieve, divisors
%o A350813 def A350813(n):
%o A350813     m = prod(islice(filter(lambda p: p % 4 == 1, sieve),n))
%o A350813     a = isqrt(m)
%o A350813     d = max(filter(lambda d: d <= a, divisors(m,generator=True)))
%o A350813     return (m//d-d)//2 # _Chai Wah Wu_, Mar 29 2022
%Y A350813 Cf. A006278, A236381, A061060.
%K A350813 nonn
%O A350813 1,1
%A A350813 _Richard Peterson_, Jan 17 2022
%E A350813 Terms corrected by and more terms from _Jinyuan Wang_, Mar 17 2022