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.

Showing 1-1 of 1 results.

A365228 Denominator of Sum_{1<=j<=k<=n, gcd(j,k)=1} 1/(j*k).

Original entry on oeis.org

1, 2, 1, 3, 4, 20, 10, 210, 168, 504, 105, 1155, 792, 1560, 60060, 180180, 16016, 123760, 510510, 29099070, 21162960, 335920, 3233230, 74364290, 45762640, 187210800, 13385572200, 40156716600, 97349616, 31054527504, 166363540200, 12033629407800, 2831442213600, 1698865328160
Offset: 1

Views

Author

Franz Vrabec, Aug 28 2023

Keywords

Crossrefs

Cf. A365227 (numerator of this sum).

Programs

  • Maple
    A365228 := proc(n)
       local j,k,s; s := 0;
       for j from 1 to n do
          for k from j to n do
             if gcd(j,k) = 1 then s := s + 1/(j*k);
             end if;
          end do;
       end do;
       denom(s);
    end proc;
    seq(A365228(n), n = 1..30);
    # second Maple program:
    a:= n-> denom(add(add(`if`(igcd(j, k)=1, 1/j, 0), j=1..k)/k, k=1..n)):
    seq(a(n), n=1..45);  # Alois P. Heinz, Aug 28 2023
  • Mathematica
    a[n_Integer]:=Module[{sum,j,k},sum=Sum[If[GCD[j,k]==1,1/(j*k),0],{j,1,n},{k,j,n}]; Denominator[sum]]; Table[a[n],{n,1,34}] (* Robert P. P. McKone, Aug 29 2023 *)
  • PARI
    a(n) = denominator(sum(j=1, n, sum(k=j, n, if (gcd(j,k)==1, 1/(j*k))))); \\ Michel Marcus, Aug 28 2023
    
  • Python
    from fractions import Fraction
    from math import gcd
    def A365228(n): return sum(sum(Fraction(1,j) for j in range(1,k+1) if gcd(j,k)==1)/k for k in range(1,n+1)).denominator # Chai Wah Wu, Aug 29 2023
Showing 1-1 of 1 results.