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.

A279385 Irregular triangle read by rows in which row n lists the numbers k such that the largest Dyck path of the symmetric representation of sigma(k) contains the point (n,n), or row n is 0 if no such k exists.

Original entry on oeis.org

1, 2, 3, 4, 5, 0, 6, 7, 8, 9, 10, 11, 0, 12, 13, 14, 0, 15, 16, 17, 18, 19, 0, 20, 21, 22, 23, 0, 24, 25, 26, 27, 0, 28, 29, 0, 30, 31, 32, 33, 34, 0, 35, 36, 37, 38, 39, 0, 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, 0, 48, 49, 50, 51, 52, 53, 0, 54, 55, 0, 56, 57, 58, 59, 0, 60, 61, 62, 0, 63, 64, 65, 0, 66, 67, 68, 69, 0
Offset: 1

Views

Author

Omar E. Pol, Dec 12 2016

Keywords

Comments

For more information about the mentioned Dyck paths see A237593.

Examples

			n         Triangle begins:
1         1;
2         2, 3;
3         4, 5;
4         0;
5         6, 7;
6         8,
7         9, 10, 11;
8         0;
9         12, 13, 14;
10        0;
11        15;
12        16, 17;
13        18, 19;
14        0;
15        20, 21, 22, 23;
16        0;
...
		

Crossrefs

Positive terms give A000027.
Cf. A259179(n) is the number of positive terms in row n.

Programs

  • Mathematica
    (* last computed value is dropped to avoid a potential under count of crossings *)
    a240542[n_] := Sum[(-1)^(k+1)Ceiling[(n+1)/k-(k+1)/2], {k, 1, Floor[-1/2+1/2 Sqrt[8n+1]]}]
    pathGroups[n_] := Module[{t}, t=Table[{}, a240542[n]]; Map[AppendTo[t[[a240542[#]]], #]&, Range[n]]; Map[If[t[[#]]=={}, t[[#]]={0}]&, Range[Length[t]]]; Most[t]]
    a279385[n_] := Flatten[pathGroups[n]]
    a279385[70] (* sequence *)
    a279385T[n_] := TableForm[pathGroups[n], TableHeadings->{Range[a240542[n]-1], None}]
    a279385T[24] (* display of irregular triangle - Hartmut F. W. Hoft, Feb 02 2022 *)

Extensions

More terms from Omar E. Pol, Jun 20 2018