A127773 Triangle read by rows: row n consists of n-1 zeros followed by n(n+1)/2.
1, 0, 3, 0, 0, 6, 0, 0, 0, 10, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78
Offset: 1
Examples
First few rows of the triangle are: 1; 0, 3; 0, 0, 6; 0, 0, 0, 10; 0, 0, 0, 0, 15; ...
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Flatten[Table[{(n(n+1))/2,Table[0,{n}]},{n,10}]] (* Harvey P. Dale, Apr 03 2011 *) Table[PadLeft[{n (n+1)/2},n,0],{n,10}]//Flatten (* Harvey P. Dale, Jan 18 2025 *)
-
Python
from sympy.ntheory.primetest import is_square def A127773(n): return n if is_square((n<<3)+1) else 0 # Chai Wah Wu, Jun 09 2025