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.

A366561 Triangle read by rows: T(n,k) = Sum_{y=1..n} Sum_{x=1..n} [GCD(f(x,y), n) = k], where f(x,y) = x^2 - y^2.

Original entry on oeis.org

1, 2, 2, 4, 0, 5, 8, 0, 0, 8, 16, 0, 0, 0, 9, 8, 8, 10, 0, 0, 10, 36, 0, 0, 0, 0, 0, 13, 32, 0, 0, 8, 0, 0, 0, 24, 36, 0, 24, 0, 0, 0, 0, 0, 21, 32, 32, 0, 0, 18, 0, 0, 0, 0, 18, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 32, 0, 40, 32, 0, 0, 0, 0, 0, 0, 0, 40
Offset: 1

Views

Author

Mats Granvik, Oct 13 2023

Keywords

Comments

Row n appears to have sum n^2. The number of nonzero terms in row n is A366563(n). Sum_{k=1..n} T(n,k)*A023900(k)/n = A366562(n).

Examples

			{
{1}, = 1^2
{2, 2}, = 2^2
{4, 0, 5}, = 3^2
{8, 0, 0, 8}, = 4^2
{16, 0, 0, 0, 9}, = 5^2
{8, 8, 10, 0, 0, 10}, = 6^2
{36, 0, 0, 0, 0, 0, 13}, = 7^2
{32, 0, 0, 8, 0, 0, 0, 24}, = 8^2
{36, 0, 24, 0, 0, 0, 0, 0, 21}, = 9^2
{32, 32, 0, 0, 18, 0, 0, 0, 0, 18}, = 10^2
{100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21}, = 11^2
{32, 0, 40, 32, 0, 0, 0, 0, 0, 0, 0, 40} = 12^2
}
		

Crossrefs

Programs

  • Mathematica
    nn = 12; f = x^2 - y^2; g[n_] := DivisorSum[n, MoebiusMu[#] # &]; Flatten[Table[Table[Sum[Sum[If[GCD[f, n] == k, 1, 0], {x, 1, n}], {y, 1, n}], {k, 1, n}], {n, 1, nn}]]
  • PARI
    T(n,k) = sum(x=1, n, sum(y=1, n, gcd(x^2 - y^2, n) == k)); \\ Michel Marcus, Oct 14 2023

Formula

T(n,k) = Sum_{y=1..n} Sum_{x=1..n} [GCD(f(x,y), n) = k], where f(x,y) = x^2 - y^2.
Conjecture 1: T(n,n) = A062803(n).
Conjecture 2: T(n,1) = A082953(n).
Conjectures from Ridouane Oudra, Jun 17 2025: (Start)
T(n,k) = 0 iff k not divide n.
T(n,k) = phi(n/k)*Sum_{d|k} (k/d)*phi(d*n/k), for n odd and k|n.
T(n,k) = 2*(-1)^k*phi(n/k)*Sum_{d|k} (-1)^(k/d)*(k/d)*phi(d*n/k), for n even and k|n.
T(n,k) = gcd(n,2)*(-1)^k*phi(n/k)*Sum_{d|k} (-1)^(k/d)*(k/d)*phi(d*n/k), for all integers n and k|n.
More generally, for all integers n, k: T(n,k) = gcd(n,2)*(-1)^k*A054523(n,k)*Sum_{d|k} (-1)^(k/d)*(k/d)*A054523(d*n,k). (End)

A366562 a(n) = Sum_{k=1..n} A366561(n,k)*A023900(k)/n.

Original entry on oeis.org

1, 0, -2, 0, -4, 0, -6, 0, -6, 0, -10, 0, -12, 0, 8, 0, -16, 0, -18, 0, 12, 0, -22, 0, -20, 0, -18, 0, -28, 0, -30, 0, 20, 0, 24, 0, -36, 0, 24, 0, -40, 0, -42, 0, 24, 0, -46, 0, -42, 0, 32, 0, -52, 0, 40, 0, 36, 0, -58, 0, -60, 0, 36, 0, 48, 0, -66, 0, 44, 0, -70, 0, -72, 0
Offset: 1

Views

Author

Mats Granvik, Oct 13 2023

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 74; f = x^2 - y^2; g[n_] := DivisorSum[n, MoebiusMu[#] # &]; Table[Sum[Sum[Sum[If[GCD[f, n] == k, 1, 0]*g[k]/n, {x, 1, n}], {y, 1, n}], {k, 1, n}], {n, 1, nn}]

Formula

a(n) = Sum_{k=1..n} A366561(n,k)*A023900(k)/n.
Conjecture: a(n) = [Mod[n, 2] = 1]*A000010(n)*(-1)^A001221(n).
Conjectures from Ridouane Oudra, Jun 17 2025: (Start)
a(n) = (-1)^omega(n)*(2*phi(n) - phi(2*n)), where omega = A001221.
a(n) = (-1)^omega(n)*Sum_{d|n} mu(n/d)*A000265(d).
a(2*n) = 0.
a(2*n+1) = A076479(2*n+1)*phi(2*n+1). (End)
Showing 1-2 of 2 results.