A127948 Triangle, A004736 * A127899.
1, 0, 2, -1, 1, 3, -2, 0, 2, 4, -3, -1, 1, 3, 5, -4, -2, 0, 2, 4, 6, -5, -3, -1, 1, 3, 5, 7, -6, -4, -2, 0, 2, 4, 6, 8, -7, -5, -3, -1, 1, 3, 5, 7, 9, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10
Offset: 0
Examples
First few rows of the triangle are: 1; 0, 2; -1, 1, 3; -2, 0, 2, 4; -3, -1, 1, 3, 5; -4, -2, 0, 2, 4, 6; -5, -3, -1, 1, 3, 5, 7; ...
Programs
-
Python
from math import isqrt def A127948(n): return (m:=n<<1)-(isqrt(m<<2)+1>>1)**2 # Chai Wah Wu, Jun 20 2025
Comments