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!)
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
Cf. A214177.
Sequence in context: A030794 A134073 A088005 * A125237 A085459 A092169
KEYWORD
nonn
AUTHOR
Leonardo Sznajder, Jan 10 2021
EXTENSIONS
More terms from Stefano Spezia, Jan 28 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 April 24 06:03 EDT 2024. Contains 371918 sequences. (Running on oeis4.)