The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350236 a(n) is the sum of the entries in an n X n X n 3D matrix whose elements start at 1 in the corner cells and increase by 1 with each step towards the center. 1
1, 8, 54, 160, 425, 864, 1666, 2816, 4617, 7000, 10406, 14688, 20449, 27440, 36450, 47104, 60401, 75816, 94582, 116000, 141561, 170368, 204194, 241920, 285625, 333944, 389286, 450016, 518897, 594000, 678466, 770048, 872289, 982600, 1104950, 1236384, 1381321 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The 2D version of this problem is discussed in A317614.
LINKS
Saeed Barari, In depth (pdf)
FORMULA
a(n) = (3/4)*n^2 * (n^2 - 2/3*n + (n mod 2)).
From Stefano Spezia, May 19 2022: (Start)
O.g.f.: x*(1 + 6*x + 36*x^2 + 42*x^3 + 45*x^4 + 12*x^5 + 2*x^6)/((1 - x)^5*(1 + x)^3).
E.g.f.: x*((4 + 15*x + 16*x^2 + 3*x^3)*cosh(x) + (1 + 18*x + 16*x^2 + 3*x^3)*sinh(x))/4.
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5)- 2*a(n-6) - 2*a(n-7) + a(n-8) for n > 8. (End)
EXAMPLE
For n=3: we have the following 3D matrix: (sliced for each Z surface)
(z=1): 1 2 1
2 3 2
1 2 1
(z=2): 2 3 2
3 4 3
2 3 2
(z=3): 1 2 1
2 3 2
1 2 1
The sum of all elements is: (3/4)*n^2 * (n^2 - 2/3*n + (n mod 2)) = 54.
MAPLE
a:=n->(3/4)*n^2 * (n^2 - (2/3)*n + modp(n, 2)): seq(a(n), n=1..50);
MATHEMATICA
LinearRecurrence[{2, 2, -6, 0, 6, -2, -2, 1}, {1, 8, 54, 160, 425, 864, 1666, 2816}, 35] (* Stefano Spezia, May 19 2022 *)
PROG
(Python)
for n in range(1, nmax):
sum = round(3/4*n**2 * (n**2 - 2/3*n + n % 2))
print(sum, end=', ')
CROSSREFS
Cf. A317614.
Sequence in context: A180095 A234955 A189393 * A254951 A085537 A085540
KEYWORD
nonn,easy
AUTHOR
Saeed Barari, Dec 21 2021
EXTENSIONS
Python program and a(23), a(34) corrected by Georg Fischer, Sep 30 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 12 06:06 EDT 2024. Contains 373321 sequences. (Running on oeis4.)