cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A386319 Triangle read by rows where row n is the start, corner and end vertex numbers of a triangular spiral with n sides on a triangular grid, starting from 1 and working inwards (0 <= k <= n).

This page as a plain text file.
%I A386319 #77 Aug 01 2025 17:05:30
%S A386319 1,1,1,1,2,3,1,3,5,6,1,4,7,9,10,1,5,9,12,14,15,1,6,11,15,18,20,21,1,7,
%T A386319 13,18,22,25,27,28,1,8,15,21,26,30,33,35,36,1,9,17,24,30,35,39,42,44,
%U A386319 45,1,10,19,27,34,40,45,49,52,54,55,1,11,21,30,38,45,51,56,60,63,65,66,1,12,23,33,42,50,57,63,68,72,75,77,78
%N A386319 Triangle read by rows where row n is the start, corner and end vertex numbers of a triangular spiral with n sides on a triangular grid, starting from 1 and working inwards (0 <= k <= n).
%C A386319 The first 2 sides are length n-1 so that T(n,1) = 1 + (n-1) and T(n,2) = 1 + 2*(n-1) and then the side lengths decrease by 1 each time as it spirals in (ending at triangular number A000217(n) when n>=1).
%C A386319 These sides mesh to fill the triangle as they go inwards, and can also be thought of going outwards tracing out the sides of the triangle.
%C A386319 The resulting vertex numbers are 1 together with row n of A141419.
%C A386319 Row n=1 is taken as a side of length 0 so the start and end numbers are both 1 (which is not really a spiral but is consistent with the formula and two points 1,2 would be even less like a triangle filled by a spiral).
%F A386319 T(n,0) = 1.
%F A386319 T(n,k) = k*(2*n - k + 1)/2 for k >= 1.
%e A386319 Triangle begins:
%e A386319 --------------------------------------
%e A386319    n\k  0   1   2   3   4   5   6   7
%e A386319 --------------------------------------
%e A386319    0|   1;
%e A386319    1|   1,  1;
%e A386319    2|   1,  2,  3;
%e A386319    3|   1,  3,  5,  6;
%e A386319    4|   1,  4,  7,  9, 10;
%e A386319    5|   1,  5,  9, 12, 14, 15;
%e A386319    6|   1,  6, 11, 15, 18, 20, 21;
%e A386319    7|   1,  7, 13, 18, 22, 25, 27, 28;
%e A386319   ...
%e A386319 For n = 2 the spiral is 2 sides of length 1 so row [1, 2, 3],
%e A386319    1 --- 2
%e A386319        /
%e A386319      3
%e A386319 For n = 4 the spiral is:
%e A386319    1  2  3  4
%e A386319     9  10  5
%e A386319       8  6
%e A386319         7
%e A386319 The start, corner and end vertices are [1, 4, 7, 9, 10].
%t A386319 T[n_,k_]:=If[k==0,1,k(2n-k+1)/2];Table[T[n,k],{n,0,12},{k,0,n}]//Flatten (* _James C. McMahon_, Jul 31 2025 *)
%Y A386319 Columns: A000012 (k=0), A000027 (k=1), A144396 (k=3).
%Y A386319 Cf. A179865(n+1) (main diagonal), A056520 (row sums).
%Y A386319 Cf. A000217, A141419.
%K A386319 nonn,easy,tabl
%O A386319 0,5
%A A386319 _Binay Krishna Maity_, Jul 18 2025