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.

A353875 a(n) is the minimal n-digit number which can be the length of a side of a Pythagorean triangle in the largest number of ways.

This page as a plain text file.
%I A353875 #28 Sep 08 2022 05:11:42
%S A353875 5,60,840,9240,65520,720720,8168160,98017920,931170240,9311702400,
%T A353875 80313433200,931635825120,9626903526240,95492672074800,
%U A353875 890488576177200,9973472053184640,87624075895836480,876240758958364800,9419588158802421600,99847634483305668960
%N A353875 a(n) is the minimal n-digit number which can be the length of a side of a Pythagorean triangle in the largest number of ways.
%e A353875 a(2)=60 because 60 is the minimal 2-digit number which can be the length of a side of an integer-sided right triangle in 14 distinct ways, (11, 60, 61), (25, 60, 65), (32, 60, 68), (36, 48, 60), (45, 60, 75), (60, 63, 87), (60, 80, 100), (60, 91, 109), (60, 144, 156), (60, 175, 185), (60, 221, 229), (60, 297, 303), (60, 448, 452), (60, 899, 901), and 14 is the maximum number of such ways for a 2-digit number.
%o A353875 (Python)
%o A353875 from sympy import factorint
%o A353875 def s(n):
%o A353875     f=factorint(n)
%o A353875     d, q=(list(f.keys()), list(f.values()))
%o A353875     (a, b, c, x)=(0, 1, 1, 0)
%o A353875     if(d[0]==2):
%o A353875         a, x=(0, 1)
%o A353875         if q[0]>1:
%o A353875              a=q[0]-1
%o A353875     for p in range(x, len(d)):
%o A353875         b*=(1+2*q[p])
%o A353875         if d[p]%4==1:
%o A353875             c*=(1+2*q[p])
%o A353875     return((b-1)//2+a*b+(c-1)//2)
%o A353875 def a(n):
%o A353875     max=0
%o A353875     for i in range(1+10**(n-1), 10**n):
%o A353875         if s(i)>max:
%o A353875             k,max=(i,s(i))
%o A353875     return(n,[k,max])
%o A353875 for i in range(1,6):
%o A353875     print (a(i))
%Y A353875 Cf. A046079, A046080.
%K A353875 nonn,base
%O A353875 1,1
%A A353875 _Zhining Yang_, Jun 26 2022