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-2 of 2 results.

A060992 a(n) = Sum_{gcd(i,j) | 0 < i <= j < n and i+j = n}.

Original entry on oeis.org

0, 1, 1, 3, 2, 6, 3, 8, 6, 11, 5, 17, 6, 16, 15, 20, 8, 27, 9, 31, 22, 26, 11, 44, 20, 31, 27, 45, 14, 60, 15, 48, 36, 41, 41, 75, 18, 46, 43, 80, 20, 87, 21, 73, 72, 56, 23, 108, 42, 85, 57, 87, 26, 108, 67, 116, 64, 71, 29, 165, 30, 76
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 14 2002

Keywords

Examples

			a(12) = gcd(1,11) + gcd(2,10) + gcd(3,9) + gcd(4,8) + gcd(5,7) + gcd(6,6) = 1 + 2 + 3 + 4 + 1 + 6 = 17;
a(13) = gcd(1,12) + gcd(2,11) + gcd(3,10) + gcd(4,9) + gcd(5,8) + gcd(6,7) = 1 + 1 + 1 + 1 + 1 + 1 = 6.
		

Crossrefs

Programs

  • Maple
    N:= 200: # to get a(1)..a(N)
    A:= Vector(N):
    for d from 1 to N do
      c:= floor(d/2);
      for n from d to N by d do
        A[n]:= A[n]+c*numtheory:-phi(n/d)
      od
    od:
    seq(A[i],i=1..N); # Robert Israel, May 11 2018
  • Mathematica
    Table[Sum[GCD[n - i, i], {i, Floor[n/2]}], {n, 100}] (* Wesley Ivan Hurt, Nov 12 2017 *)
  • PARI
    a(n) = sumdiv(n, d, (d\2)*eulerphi(n/d)); \\ Michel Marcus, May 11 2018

Formula

a(n) = Sum_{d divides n} floor(d/2)*phi(n/d). a(p) = (p-1)/2 for an odd prime p. - Vladeta Jovovic, Dec 21 2004
a(n) = Sum_{i=1..floor(n/2)} gcd(n-i,i). - Wesley Ivan Hurt, Nov 12 2017
G.f.: Sum_{k>=1} phi(k)*x^(2*k)/((1 + x^k)*(1 - x^k)^2). - Ilya Gutkovskiy, Oct 24 2018
a(n) = (A018804(n) - A109043(n))/2. - Ridouane Oudra, May 31 2025

A280448 Sum of the GCDs of the smaller and larger parts of the partitions of 2n into two squarefree parts.

Original entry on oeis.org

1, 3, 4, 4, 6, 10, 9, 7, 6, 20, 15, 11, 17, 28, 19, 11, 23, 23, 25, 27, 36, 48, 30, 24, 12, 55, 16, 35, 39, 56, 41, 20, 55, 73, 55, 44, 50, 81, 65, 39, 53, 96, 56, 71, 33, 97, 63, 40, 29, 53, 88, 83, 71, 63, 91, 68, 98, 126, 78, 87, 80, 134, 65, 40, 107, 147, 89, 107, 119
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 03 2017

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): A280448:=n->add(gcd(2*n-i, i)*mobius(i)^2*mobius(2*n-i)^2, i=1..n): seq(A280448(n), n=1..100);
  • Mathematica
    Table[Sum[GCD[k, 2*n - k]*MoebiusMu[k]^2 * MoebiusMu[2*n - k]^2, {k, 1,
    n}], {n, 1, 50}] (* G. C. Greubel, Jan 05 2017 *)
  • PARI
    for(n=1,50, print1(sum(k=1,n, gcd(k,2*n-k) * (moebius(k))^2 *(moebius(2*n-k))^2), ", ")) \\ G. C. Greubel, Jan 05 2017

Formula

a(n) = Sum_{i=1..n} gcd(i,2n-i) * mu(i)^2 * mu(2n-i)^2, where mu is the Möbius function (A008683).
Showing 1-2 of 2 results.