login
Triangular hopscotch.
1

%I #8 Jan 03 2016 14:32:25

%S 1,3,2,6,4,5,10,7,9,8,15,11,14,12,13,21,16,20,17,19,18,28,22,27,23,26,

%T 24,25,36,29,35,30,34,31,33,32,45,37,44,38,43,39,42,40,41,55,46,54,47,

%U 53,48,52,49,51,50,66,56,65,57,64,58,63,59,62,60,61

%N Triangular hopscotch.

%H Harry J. Smith, <a href="/A059399/b059399.txt">Table of n, a(n) for n = 1..10011</a>

%F Write down triangle with rows 1; 2, 3; 4, 5, 6; 7, 8, 9, 10; ...; read rows alternately from right and left ends.

%o (PARI) { n=0; for (i = 1, 141, d=i; s=1; for (j=1, i, if (j==1, a=(i^2 + i)/2, a+=s*d); write("b059399.txt", n++, " ", a); d--; s=-s; ); ) } \\ _Harry J. Smith_, Jun 26 2009

%K nonn,easy

%O 1,2

%A _Robert G. Wilson v_, Jan 29 2001