Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A261790
Regular triangle read by rows: T(n,k) is the least positive number m such that k*m and k*m*(m+1)/2 are both divisible by n, with 0<=k<=n and T(0,0)=1.
0
1, 1, 1, 1, 4, 1, 1, 3, 3, 1, 1, 8, 4, 8, 1, 1, 5, 5, 5, 5, 1, 1, 12, 3, 4, 3, 12, 1, 1, 7, 7, 7, 7, 7, 7, 1, 1, 16, 8, 16, 4, 16, 8, 16, 1, 1, 9, 9, 3, 9, 9, 3, 9, 9, 1, 1, 20, 5, 20, 5, 4, 5, 20, 5, 20, 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 1, 24, 12, 8, 3, 24, 4, 24, 3, 8, 12, 24, 1
OFFSET
0,5
COMMENTS
T(360,k) is the number of steps for a Logo turtle to return to the same orientation and same heading when using the INSPIR program with starting angle and angular increment k.
REFERENCES
Harold Abelson and Andrea diSessa, Turtle Geometry, Artificial Intelligence Series, MIT Press, July 1986, pp. 20 and 36.
Brian Hayes, La tortue vagabonde, in Récréations Informatiques, Pour La Science, Belin, Paris, 1987, pp. 24-28, in French, translation from Computer Recreations, February 1984, Scientific American Volume 250, Issue 2.
EXAMPLE
Triangle starts:
1;
1, 1;
1, 4, 1;
1, 3, 3, 1;
1, 8, 4, 8, 1;
1, 5, 5, 5, 5, 1;
1, 12, 3, 4, 3, 12, 1;
1, 7, 7, 7, 7, 7, 7, 1;
1, 16, 8, 16, 4, 16, 8, 16, 1;
...
MATHEMATICA
{1}~Join~Table[m = 1; While[Nand[Mod[k m, n] == 0, Mod[k m (m + 1)/2, n] == 0], m++]; m, {n, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Sep 01 2015 *)
PROG
(PARI) T(n, k) = {if (n==0, return (1)); m=1; while(((k*m*(m+1)/2) % n) || (k*m % n), m++); m; }
row(n) = vector(n+1, k, k--; T(n, k));
tabl(nn) = for(n=0, nn, print(row(n)));
CROSSREFS
Cf. A011772, A022998 (2nd column).
Sequence in context: A274540 A010323 A353647 * A174834 A100642 A320438
KEYWORD
nonn,tabl
AUTHOR
Michel Marcus, Sep 01 2015
STATUS
approved