A323952 Regular triangle read by rows where if k > 1 then T(n, k) is the number of connected subgraphs of an n-cycle with any number of vertices other than 2 through k - 1, n >= 1, 1 <= k <= n - 1. Otherwise T(n, 1) = n.
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
Offset: 1
Examples
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}
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1275 (rows 1..50)
Crossrefs
Programs
-
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}]
-
PARI
T(n,k) = if(k==1, n, 1 + n * (n - k + 1)) \\ Andrew Howroyd, Jan 18 2023
Formula
T(n, 1) = n; T(n, k) = 1 + n * (n - k + 1).