|
|
A340459
|
|
a(n) is the sum of the numbers adjacent to n in a triangle in which the nonnegative integers are placed from top to bottom and from left to right.
|
|
0
|
|
|
3, 9, 10, 18, 26, 23, 31, 44, 50, 40, 48, 68, 74, 80, 61, 69, 98, 104, 110, 116, 86, 94, 134, 140, 146, 152, 158, 115, 123, 176, 182, 188, 194, 200, 206, 148, 156, 224, 230, 236, 242, 248, 254, 260, 185, 193, 278, 284, 290, 296, 302, 308, 314, 320, 226, 234, 338
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
The triangle of nonnegative integers begins:
0
1 2
3 4 5
6 7 8 9
...
|
|
LINKS
|
|
|
EXAMPLE
|
For n=4:
- the numbers adjacent to 4 are 1, 2, 3, 5, 7 and 8,
- so a(4) = 1 + 2 + 3 + 5 + 7 + 8 = 26.
|
|
MATHEMATICA
|
T[i_, j_]:=Binomial[i+1, 2]+j; a[i_, j_]:=If[j-1>=0, T[i, j-1], 0]+If[i-1>=0&&j-1>=0, T[i-1, j-1], 0]+If[i-1>=0&&j<=i-1, T[i-1, j], 0]+If[j+1<=i, T[i, j+1], 0]+T[i+1, j]+T[i+1, j+1]; Flatten[Table[a[i, j], {i, 0, 12}, {j, 0, i}]] (* Stefano Spezia, Jan 28 2021 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|