login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A354048 a(n) is the largest number of distinct integer-sided right triangles in which some n-digit number can appear as the length of a side. 0
2, 14, 68, 203, 476, 1421, 3293, 7910, 20060, 39509, 89324, 206711, 442907, 803924, 1722464, 3198608, 6820523, 13434254, 27901259, 50222267 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(2)=14 because there exist 14 distinct integer-sided right triangles with the 2-digit number 60 as the length of a side, i.e., (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), and (60,899,901), and no 2-digit number is the length of a side of more than 14 distinct integer-sided right triangles.
PROG
(Python)
from sympy import factorint
def s(n):
f=factorint(n)
d, q=(list(f.keys()), list(f.values()))
(a, b, c, x)=(0, 1, 1, 0)
if(d[0]==2):
a, x=(0, 1)
if q[0]>1:
a=q[0]-1
for p in range(x, len(d)):
b*=(1+2*q[p])
if d[p]%4==1:
c*=(1+2*q[p])
return((b-1)//2+a*b+(c-1)//2)
def a(n):
max=0
for i in range(1+10**(n-1), 10**n):
if s(i)>max:
k, max=(i, s(i))
return(n, [k, max])
for i in range(1, 6):
print (a(i))
# (thanks to Zhao Hui Du for help in the derivation of this function)
CROSSREFS
Sequence in context: A109869 A197777 A197608 * A325925 A084132 A271235
KEYWORD
nonn,more
AUTHOR
Zhining Yang, Jun 26 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 9 08:49 EDT 2024. Contains 375762 sequences. (Running on oeis4.)