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.

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

Original entry on oeis.org

1, 3, 2, 7, 11, 59, 33, 737, 631, 1973, 439, 4967, 3595, 7283, 289433, 891067, 82391, 647449, 2764637, 160300109, 119168603, 1923477, 19032303, 442903921, 278705461, 1155909107, 84109239017, 255355122859, 632225777, 203232858383, 1110186816983, 81194050820693
Offset: 1

Views

Author

Franz Vrabec, Aug 27 2023

Keywords

Crossrefs

Cf. A365228 (denominator of this sum).

Programs

  • Maple
    A365227 := 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;
       numer(s);
    end proc;
    seq(A365227(n), n = 1..20);
    # second Maple program:
    a:= n-> numer(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
  • PARI
    a(n) = numerator(sum(j=1, n, sum(k=j, n, if (gcd(j,k)==1, 1/(j*k))))); \\ Michel Marcus, Aug 28 2023
  • Python
    from math import gcd
    from fractions import Fraction
    def A365227(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)).numerator # Chai Wah Wu, Aug 29 2023
    
Showing 1-1 of 1 results.