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.

A348541 Number of partitions of n into 3 parts (r,s,t) such that n | (r^2 + s^2 + t^2).

Original entry on oeis.org

0, 0, 1, 0, 0, 2, 1, 1, 1, 0, 0, 2, 2, 4, 1, 1, 0, 3, 3, 0, 4, 0, 0, 6, 2, 8, 4, 4, 0, 2, 5, 5, 1, 0, 1, 3, 6, 12, 7, 1, 0, 14, 7, 0, 1, 0, 0, 6, 11, 8, 1, 8, 0, 12, 0, 17, 10, 0, 0, 2, 10, 20, 10, 5, 2, 2, 11, 0, 1, 4, 0, 12, 12, 24, 9, 12, 1, 26, 13, 1, 7, 0, 0, 14, 0, 28, 1, 1
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 21 2021

Keywords

Examples

			a(6) = 2; 6 | (1^2 + 1^2 + 4^2) = 18 and 6 | (2^2 + 2^2 + 2^2) = 12, so a(6) = 2.
		

Crossrefs

Cf. A069905.

Programs

  • Mathematica
    c[n_] := 1 - Ceiling[n] + Floor[n]; a[n_] := Sum[c[(j^2 + i^2 + (n - i - j)^2)/n], {j, 1, Floor[n/3]}, {i, j, Floor[(n - j)/2]}]; Array[a, 100] (* Amiram Eldar, Oct 22 2021 *)

Formula

a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} c((j^2 + i^2 + (n-i-j)^2)/n), where c(n) = 1 - ceiling(n) + floor(n).