Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #32 Apr 02 2024 11:00:07
%S 1,57,341,1045,2361,4481,7597,11901,17585,24841,33861,44837,57961,
%T 73425,91421,112141,135777,162521,192565,226101,263321,304417,349581,
%U 399005,452881,511401,574757,643141,716745,795761,880381,970797,1067201,1169785,1278741
%N Centered truncated octahedral numbers: the number of integer triples (x,y,z) such that max(|x|,|y|,|z|) <= 2n and |x|+|y|+|z| <= 3n.
%H Paolo Xausa, <a href="/A371515/b371515.txt">Table of n, a(n) for n = 0..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FigurateNumber.html">Figurate Number</a>.
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TruncatedOctahedron.html">Truncated Octahedron</a>.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Ehrhart_polynomial">Ehrhart polynomial</a>.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F a(n) = 32*n^3 + 18*n^2 + 6*n + 1.
%F a(n) = A001845(3*n) - 6*A005900(n).
%F G.f.: (19*x^3 + 119*x^2 + 53*x + 1) / (x-1)^4. - _Paolo Xausa_, Apr 02 2024
%F E.g.f.: exp(x)*(1 + 56*x + 114*x^2 + 32*x^3). - _Stefano Spezia_, Apr 02 2024
%e 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)).
%t Array[32*#^3 + 18*#^2 + 6*# + 1 &, 50, 0] (* or *)
%t LinearRecurrence[{4, -6, 4, -1}, {1, 57, 341, 1045}, 50] (* _Paolo Xausa_, Apr 02 2024 *)
%o (Python)
%o def A371515(n): return n*(n*(32*n+18)+6)+1 # _Chai Wah Wu_, Apr 02 2024
%Y Cf. A001845, A005900.
%K nonn,easy
%O 0,2
%A _Peter Kagey_, Mar 25 2024