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.

A200723 The sum of integers k from 1 to n such that the greatest common unitary divisor of k and n is 1.

Original entry on oeis.org

1, 1, 3, 6, 10, 10, 21, 28, 36, 32, 55, 53, 78, 66, 69, 120, 136, 112, 171, 144, 153, 170, 253, 211, 300, 240, 351, 300, 406, 237, 465, 496, 384, 416, 445, 539, 666, 522, 558, 633, 820, 444, 903, 780, 772, 770, 1081, 887, 1176, 912, 951, 1104
Offset: 1

Views

Author

R. J. Mathar, Nov 21 2011

Keywords

Comments

Previous name was "Bi-unitary Euler function of n".
a(n) is the sum over all entries equal to 1 in row A165430(n,), weighted by the column index.

Crossrefs

Programs

  • Haskell
    a200723 = sum . zipWith (*) [1..] . map a063524 . a165430_row
    -- Reinhard Zumkeller, Mar 04 2013
    
  • Maple
    A200723 := proc(n)
            local a,k ;
            a := 0 ;
            for k from 1 to n do
                    if A165430(k,n) = 1 then
                            a := a+ k ;
                    end if;
            end do;
            a ;
    end proc:
    seq(A200723(n),n=1..80) ;
  • Mathematica
    T[n_, k_] := Module[{d = Divisors[GCD[n, k]]}, Max[Select[d, CoprimeQ[#, k/#] && CoprimeQ[#, n/#] &]]]; a[n_] := Sum[k * Boole[T[n, k] == 1], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, May 23 2025 *)
  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
    a(n) = sum(k=1, n, if (vecmax(setintersect(udivs(n), udivs(k))) == 1, k)); \\ Michel Marcus, Jun 28 2023

Formula

a(6) = 1*1 + 4*1 +5*1 = 10 corresponding to the three 1's in row 6 of A165430.

Extensions

New name from Amiram Eldar, May 23 2025