Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #38 Jan 05 2025 19:51:42
%S 1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,4,1,1,1,1,2,1,1,1,
%T 4,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,4,1,1,1,1,1,4,1,1,
%U 1,2,1,1,1,1,1,1,1,1,2,4,1,1,2,1,1,1,1,1,4,1,1,1,1,4,1,2
%N Number of integer-sided right triangles with hypotenuse A009003(n).
%C a(n) mod 3 = 1 for 95.3% of the first 13211 terms, including the 70% where a(n) = 1, and only 4.7% account for the other numbers. Theorem 7 of A. Tripathi (see link below) provides the explanation that 2, 3, 5, 6, etc. are so rare. The term 8 will appear for the first time when the hypotenuse is A006339(8) = 390625. - _Ruediger Jehn_, Jan 13 2022
%C All positive integers eventually appear in this sequence. - _Charles R Greathouse IV_, Jan 13 2022
%C The normal value of a(n) is roughly log(n)^(log(3)/2). For any fixed k, the asymptotic density of n such that a(n) <= k is 0. The typical a(n) is of the form (x*3^y-1)/2 with x small (because most numbers have only a few primes with exponents > 1). - _Charles R Greathouse IV_, Jan 13 2022
%H Ruediger Jehn, <a href="/A350040/b350040.txt">Table of n, a(n) for n = 1..13211</a>
%H A. Tripathi, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/46_47-4/Tripathi.pdf">On Pythagorean triples containing a fixed integer</a>, Fib. Q., 46/47 (2008/2009), 331-340.
%o (PARI) is_A009003(n)=setsearch(Set(factor(n)[, 1]%4), 1);
%o f(n) = {my(f = factor(n/(2^valuation(n, 2)))); (prod(k=1, #f~, if ((f[k, 1] % 4) == 1, 2*f[k, 2] + 1, 1)) - 1)/2; } \\ A046080
%o lista(nn) = apply(f, select(is_A009003, [1..nn])); \\ _Michel Marcus_, Jan 13 2022
%o (PARI) A046080(n,f=factor(n))=prod(k=if(f[1,1]==2,2,1), #f~, if (f[k,1]%4 == 1, 2*f[k,2] + 1, 1))\2; \\ doesn't handle n = 1, not relevant here
%o upto(lim)=my(v=List(),u=vectorsmall(lim\=1)); forprimestep(p=5,lim,4, forstep(n=p,lim,p, u[n]=1)); forfactored(n=5,lim, if(u[n[1]], listput(v, A046080(0,n[2])))); u=0; Vec(v) \\ _Charles R Greathouse IV_, Jan 13 2022
%o (PARI) upto(lim)=my(v=List()); forfactored(n=5,lim\=1, if(vecmin(n[2][,1]%4)==1, listput(v, prod(k=if(n[2][1,1]>2,1,2),#n[2]~, if (n[2][k,1]%4 == 1, 2*n[2][k,2] + 1, 1))\2))); Vec(v) \\ _Charles R Greathouse IV_, Jan 13 2022
%Y Cf. A006339, A009003, A046080.
%K nonn,easy
%O 1,7
%A _Wesley Ivan Hurt_, Dec 11 2021