OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1275 (rows 1..50)
FORMULA
T(n, 1) = n; T(n, k) = 1 + n * (n - k + 1).
EXAMPLE
Triangle begins:
1
2 3
3 7 4
4 13 9 5
5 21 16 11 6
6 31 25 19 13 7
7 43 36 29 22 15 8
8 57 49 41 33 25 17 9
9 73 64 55 46 37 28 19 10
10 91 81 71 61 51 41 31 21 11
11 111 100 89 78 67 56 45 34 23 12
12 133 121 109 97 85 73 61 49 37 25 13
Row 4 counts the following connected sets:
{1} {1} {1} {1}
{2} {2} {2} {2}
{3} {3} {3} {3}
{4} {4} {4} {4}
{12} {123} {1234}
{14} {124}
{23} {134}
{34} {234}
{123} {1234}
{124}
{134}
{234}
{1234}
MATHEMATICA
anesw[n_, k_]:=Length[If[k==1, List/@Range[n], Union[Sort/@Select[Union[List/@Range[n], Join@@Table[Partition[Range[n], i, 1, 1], {i, k, n}]], UnsameQ@@#&&#!={}&]]]];
Table[anesw[n, k], {n, 0, 16}, {k, n}]
PROG
(PARI) T(n, k) = if(k==1, n, 1 + n * (n - k + 1)) \\ Andrew Howroyd, Jan 18 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gus Wiseman, Feb 10 2019
STATUS
approved