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.

A350040 Number of integer-sided right triangles with hypotenuse A009003(n).

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 11 2021

Keywords

Comments

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
All positive integers eventually appear in this sequence. - Charles R Greathouse IV, Jan 13 2022
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

Crossrefs

Programs

  • PARI
    is_A009003(n)=setsearch(Set(factor(n)[, 1]%4), 1);
    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
    lista(nn) = apply(f, select(is_A009003, [1..nn])); \\ Michel Marcus, Jan 13 2022
    
  • 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
    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
    
  • 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