login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A343559 Irregular triangle read by rows: the n-th row gives the column indices of the consecutive elements of the spiral of the n X n matrix defined in A126224. 3
1, 1, 2, 2, 1, 1, 2, 3, 3, 3, 2, 1, 1, 2, 1, 2, 3, 4, 4, 4, 4, 3, 2, 1, 1, 1, 2, 3, 3, 2, 1, 2, 3, 4, 5, 5, 5, 5, 5, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 4, 4, 3, 2, 2, 3, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 2, 3, 4, 5, 5, 5, 5, 4, 3, 2, 2, 2, 3, 4, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
The triangle begins
1
1 2 2 1
1 2 3 3 3 2 1 1 2
1 2 3 4 4 4 4 3 2 1 1 1 2 3 3 2
...
MATHEMATICA
a:={}; nmax:=6; For[n=1, n<=nmax, n++, For[s=1, s<=2n-1, s++, If[OddQ[s]&&Mod[s, 4]==1 , k=Floor[s/4]; For[i=1, i<=Ceiling[n-s/2], i++, AppendTo[a, k+i]]; k=+Floor[s/4]+Ceiling[n-s/2], If[EvenQ[s], For[i=1, i<=Ceiling[n-s/2], i++, AppendTo[a, k]], For[i=1, i<=Ceiling[n-s/2], i++, AppendTo[a, k-i]]; k=k-i+1]]]]; a
CROSSREFS
Cf. A000290 (row length), A002265, A002411 (row sums), A010873, A060747, A126224, A343558 (row indices).
Sequence in context: A004739 A156282 A203776 * A242357 A120423 A113137
KEYWORD
nonn,look,tabf
AUTHOR
Stefano Spezia, Apr 19 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 15:21 EDT 2024. Contains 374410 sequences. (Running on oeis4.)