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.

A371515 Centered truncated octahedral numbers: the number of integer triples (x,y,z) such that max(|x|,|y|,|z|) <= 2n and |x|+|y|+|z| <= 3n.

Original entry on oeis.org

1, 57, 341, 1045, 2361, 4481, 7597, 11901, 17585, 24841, 33861, 44837, 57961, 73425, 91421, 112141, 135777, 162521, 192565, 226101, 263321, 304417, 349581, 399005, 452881, 511401, 574757, 643141, 716745, 795761, 880381, 970797, 1067201, 1169785, 1278741
Offset: 0

Views

Author

Peter Kagey, Mar 25 2024

Keywords

Examples

			The a(1) = 57 lattice points are all permutations of the points (0,0,0),(0,0,1),(0,0,2),(0,1,1),(0,1,2),(1,1,1), where any number of the coordinates can also be made negative (e.g., (1,-1,0)).
		

Crossrefs

Programs

  • Mathematica
    Array[32*#^3 + 18*#^2 + 6*# + 1 &, 50, 0] (* or *)
    LinearRecurrence[{4, -6, 4, -1}, {1, 57, 341, 1045}, 50] (* Paolo Xausa, Apr 02 2024 *)
  • Python
    def A371515(n): return n*(n*(32*n+18)+6)+1 # Chai Wah Wu, Apr 02 2024

Formula

a(n) = 32*n^3 + 18*n^2 + 6*n + 1.
a(n) = A001845(3*n) - 6*A005900(n).
G.f.: (19*x^3 + 119*x^2 + 53*x + 1) / (x-1)^4. - Paolo Xausa, Apr 02 2024
E.g.f.: exp(x)*(1 + 56*x + 114*x^2 + 32*x^3). - Stefano Spezia, Apr 02 2024