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.

A366362 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^3 - x^2 - y^2 - y.

Original entry on oeis.org

1, 0, 4, 5, 0, 4, 0, 8, 0, 8, 21, 0, 0, 0, 4, 0, 20, 0, 0, 0, 16, 40, 0, 0, 0, 0, 0, 9, 0, 32, 0, 16, 0, 0, 0, 16, 45, 0, 24, 0, 0, 0, 0, 0, 12, 0, 84, 0, 0, 0, 0, 0, 0, 0, 16, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 40, 0, 40, 0, 32, 0, 0, 0, 0, 0, 32
Offset: 1

Views

Author

Mats Granvik, Oct 08 2023

Keywords

Comments

Row n appears to have sum n^2. T(prime(m),1) = A366346(m). The number of nonzero terms in row n appears to be A320111(n).

Examples

			{
{1}, = 1^2
{0, 4}, = 2^2
{5, 0, 4}, = 3^2
{0, 8, 0, 8}, = 4^2
{21, 0, 0, 0, 4}, = 5^2
{0, 20, 0, 0, 0, 16}, = 6^2
{40, 0, 0, 0, 0, 0, 9}, = 7^2
{0, 32, 0, 16, 0, 0, 0, 16}, = 8^2
{45, 0, 24, 0, 0, 0, 0, 0, 12}, = 9^2
{0, 84, 0, 0, 0, 0, 0, 0, 0, 16}, = 10^2
{111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10}, = 11^2
{0, 40, 0, 40, 0, 32, 0, 0, 0, 0, 0, 32} = 12^2
}
		

Crossrefs

Programs

  • Mathematica
    f = x^3 - x^2 - y^2 - y; nn = 12; Flatten[Table[Table[Sum[Sum[If[GCD[f, n] == k, 1, 0], {x, 1, n}], {y, 1, n}], {k, 1, n}], {n, 1, nn}]]

Formula

T(n,k) = Sum_{y=1..n} Sum_{x=1..n} [GCD(f(x,y), n) = k], where f(x,y) = x^3 - x^2 - y^2 - y.
Conjecture: T(n,n) = A060457(n).