[go: up one dir, main page]

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!)
A058333 Number of 3 X 3 matrices with elements from [0,...,(n-1)] satisfying the condition that the middle element of each row or column is the difference of the two end elements (in absolute value). 1
1, 16, 73, 208, 465, 896, 1561, 2528, 3873, 5680, 8041, 11056, 14833, 19488, 25145, 31936, 40001, 49488, 60553, 73360, 88081, 104896, 123993, 145568, 169825, 196976, 227241, 260848, 298033, 339040 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
If the "middle element" condition in the definition is also placed on the two diagonal lines of three in addition to each row and column, the sequence generated is the sequence of squares {1,4,9,16,...}.
LINKS
FORMULA
The terms a(1) through a(30) are given by a(n) = (n^4+8n^3-10n^2+4n)/3.
Empirical g.f.: x*(x+1)*(7*x^2-10*x-1) / (x-1)^5. - Colin Barker, Mar 29 2013
From Michael S. Branicky, Jan 16 2021: (Start)
a(n) = Sum_{i=0..n-1} Sum_{j=0..n-1} Sum_{k=0..n-1} Sum_{l=0..n-1} [||i - k| - |j - l|| == ||i - j| - |k - l||].
The terms a(1) through a(1000) satisfy a(n) = (n^4+8n^3-10n^2+4n)/3. (End)
PROG
(Python)
from numba import njit
@njit
def a(n):
count = 0
for i in range(n):
for j in range(n):
for k in range(n):
for l in range(n):
if abs(abs(i-j) - abs(k-l)) == abs(abs(i-k) - abs(j-l)):
count += 1
return count
print([a(n) for n in range(1, 39)]) # Michael S. Branicky, Jan 16 2021
CROSSREFS
Sequence in context: A299803 A299679 A300311 * A232337 A124894 A126403
KEYWORD
nonn
AUTHOR
John W. Layman, Dec 13 2000
EXTENSIONS
a(31) and beyond from Michael S. Branicky, Jan 16 2021
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 August 30 13:06 EDT 2024. Contains 375543 sequences. (Running on oeis4.)