{"id":"n-b1a7dcc8610d7e32","revision":1,"first_index":0,"fingerprint":"f6-2f76d9ab212d3ec7","name":"Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n.","polytool_family":null,"interpretation":null,"rows_observed":15,"degree_pattern":"affine","degree_slope":1,"degree_intercept":0,"palindromic":0,"gamma_positive":0,"nonnegative":1,"rr_by_factors":false,"rows":[["1"],["1","2"],["1","5","3"],["1","9","13","4"],["1","14","35","26","5"],["1","20","75","96","45","6"],["1","27","140","267","216","71","7"],["1","35","238","623","750","427","105","8"],["1","44","378","1288","2123","1800","770","148","9"],["1","54","570","2436","5211","6046","3858","1296","201","10"],["1","65","825","4302","11505","17303","15115","7590","2067","265","11"],["1","77","1155","7194","23397","43923","49721","34210","13959","3157","341","12"],["1","90","1573","11506","44550","101530","143365","127854","71566","24310","4653","430","13"],["1","104","2093","17732","80366","217646","372749","414584","300950","140426","40469","6656","533","14"],["1","119","2730","26481","138567","438438","891345","1201917","1088283","659022","261261","64857","9282","651","15"]],"degrees":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"row_sums":["1","3","9","27","81","243","729","2187","6561","19683","59049","177147","531441","1594323","4782969"],"nonn":true,"definitions":[{"position":0,"source":"oeis_catalog:A330381","source_kind":"oeis_catalog","equality_edge_id":null,"recurrence":{"first_index":0,"initial_polynomials":[["1"],["1","2"]],"recurrence":{"terms":[{"coeff":{"coeffs":[["2","2"]]},"deriv_order":0,"offset":1,"sign":"none"},{"coeff":{"coeffs":[["-1","-1","-1"]]},"deriv_order":0,"offset":2,"sign":"none"}]},"schema":"polytool.recurrence.v1"}},{"position":1,"source":"derived:reversal","source_kind":"derived","equality_edge_id":"e-637632b6c2fd4634","recurrence":{"first_index":0,"initial_polynomials":[["1"],["1","2"]],"recurrence":{"terms":[{"coeff":{"coeffs":[["-1","-1","-1"]]},"deriv_order":0,"offset":2,"sign":"none"},{"coeff":{"coeffs":[["2","2"]]},"deriv_order":0,"offset":1,"sign":"none"}]},"schema":"polytool.recurrence.v1"}}],"properties":[{"id":169796,"position":0,"claim":"real_rooted","from_index":0,"region_key":"(-inf, 0)","provenance":"edges","claim_data":{"claim":"real_rooted","from_index":0,"region":{"upper":{"closed":false,"value":"0"}}},"label":"Real-rooted","description":"Every row P_n, n >= 0, is zero or real-rooted with all roots in (-inf, 0)","region_exact":null,"edges":["e-a158dc81d41b25b5"]},{"id":169797,"position":1,"claim":"one_signed_coefficients","from_index":0,"region_key":null,"provenance":"derived_from_edges","claim_data":{"alternating":false,"claim":"one_signed_coefficients","from_index":0},"label":"Coefficients of one sign","description":"Every nonzero row, n >= 0: the coefficients of P_n have one sign","region_exact":null,"edges":["e-a158dc81d41b25b5","e-c6f91fa383aec347"]},{"id":169798,"position":2,"claim":"hadamard_kernel","from_index":0,"region_key":null,"provenance":"derived_from_edges","claim_data":{"claim":"hadamard_kernel","from_index":0},"label":"Hadamard kernel (Malo)","description":"Rows P_n, n >= 0, are Hadamard kernels (preserve real-rootedness)","region_exact":null,"edges":["e-a158dc81d41b25b5","e-c6f91fa383aec347"]},{"id":169799,"position":3,"claim":"interlacing","from_index":1,"region_key":null,"provenance":"edges","claim_data":{"claim":"interlacing","from_index":1,"kind":"weak","orientation":"previous_interlaces_next"},"label":"Interlacing of consecutive rows","description":"Rows P_(m-1), P_m interlace (weak, previous interlaces next) for every m >= 1","region_exact":null,"edges":["e-a158dc81d41b25b5"]},{"id":170784,"position":4,"claim":"real_rooted","from_index":0,"region_key":"(-inf, 0]","provenance":"edges","claim_data":{"claim":"real_rooted","from_index":0,"region":{"upper":{"closed":true,"value":"0"}}},"label":"Real-rooted","description":"Every row P_n, n >= 0, is zero or real-rooted with all roots in (-inf, 0]","region_exact":null,"edges":["e-c6f91fa383aec347"]}],"region_exact":{},"incoming_edges":[{"id":"e-637632b6c2fd4634","operation":{"operation":"definition_equality"},"operation_detail":null,"conclusion_id":"n-b1a7dcc8610d7e32","premise_count":0,"theorem":"all-index identity Q_n = P_n certified by exact Ore-algebra division and identifying rows (polytool preserver-image certificate of the identity map)","lean_route":null,"lean_declarations":[],"certificate_hash":"c204f35f020cdaeb0f808f49dd591494abdf177b47f24473be01db848f1a4f1c","verification_polytool":"replayed","verification_lean":"not_attempted","claims":[],"premises":[]},{"id":"e-c6f91fa383aec347","operation":{"index_shift":0,"operation":"preserver_image","operator":"{\"shape\":\"reversal\",\"schedule\":{\"first_index\":0,\"first_degree\":0,\"step\":1}}"},"operation_detail":"reversal, shift 0","conclusion_id":"n-b1a7dcc8610d7e32","premise_count":1,"theorem":"a real affine substitution x -> a x + b (a != 0), the reversal x^d p(1/x) (d >= deg p) and a real Mobius map (c x + e)^d p((a x + b)/(c x + e)) (a e - b c != 0, d >= deg p) map real roots to real roots: a root r of p gives the root (r - b)/a, 1/r (and 0) or (e r - b)/(a - c r) (and -e/c); for an input row that is a polynomial the degree condition holds automatically","lean_route":"reversed","lean_declarations":["RealRooted.X_pow_mul_reverse_eq_zero_or_splits","RealRooted.reflect_eq_zero_or_splits"],"certificate_hash":"f7e4d9aba33834a86cff340eb6c843e46e57fb3f3a9de06c92a7c9ac9182a303","verification_polytool":"replayed","verification_lean":"not_attempted","claims":[{"claim":"real_rooted","from_index":0,"region":{"upper":{"closed":true,"value":"0"}}}],"premises":[{"position":0,"node_id":"n-9fa98aec39d32ffa","role":"sequence","name":"Triangle, read by rows, of pairwise sums of trinomial coefficients (A027907).","uses":{"claim":"real_rooted","from_index":0,"region":{"upper":{"closed":true,"value":"0"}}},"uses_text":"Every row P_n, n >= 0, is zero or real-rooted with all roots in (-inf, 0]"}]},{"id":"e-a158dc81d41b25b5","operation":{"operation":"theorem_check","theorem":"liu_wang_three_term"},"operation_detail":"liu_wang_three_term","conclusion_id":"n-b1a7dcc8610d7e32","premise_count":0,"theorem":"L. L. Liu and Y. Wang, Adv. Appl. Math. 38 (2007) 542-560, Theorem 2.1 and Corollary 2.4 (A unified approach to polynomial sequences with only real zeros; the lag row as the interlacer, b_n = 0), weak interlacing of consecutive rows, with nonnegativity of the coefficients replaced, where a root region is certified, by an exact root-location induction","lean_route":"sign","lean_declarations":["RealRooted.threeTerm_interlaces_of_eval_nonpos","RealRooted.threeTerm_interlaces","RealRooted.eval_nonpos_of_natDegree_le_two"],"certificate_hash":"433949b96adc2ef6c1b3607250037c85ac7320a1ff0e4c10cb4358aa98ef7dc3","verification_polytool":"replayed","verification_lean":"not_attempted","claims":[{"claim":"real_rooted","from_index":0,"region":{"upper":{"closed":false,"value":"0"}}},{"claim":"interlacing","from_index":1,"kind":"weak","orientation":"previous_interlaces_next"}],"premises":[]}],"used_by":[{"id":"e-157ba4fb1203ab53","operation":"basis_map","operation_detail":"A013610","conclusion_id":"n-53e8412f57bfc9da","conclusion_name":"basis_map_A013610 of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-171bd39f2bb51e98","operation":"basis_map","operation_detail":"A008277","conclusion_id":"n-fb52313e0f83daf2","conclusion_name":"basis_map_A008277 of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-5db4e5a3fc67f912","operation":"basis_map","operation_detail":"A013609","conclusion_id":"n-703053a921044202","conclusion_name":"basis_map_A013609 of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-b0052c97a32d6b11","operation":"basis_map","operation_detail":"A007318","conclusion_id":"n-e453e5c5b6002f20","conclusion_name":"shift_x_plus_one of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-eeb00a5ad79d0ea1","operation":"basis_map","operation_detail":"A013611","conclusion_id":"n-80d93a39aa9a55a2","conclusion_name":"basis_map_A013611 of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-096d59d6ba29d9d4","operation":"preserver_image","operation_detail":"affine, shift 0","conclusion_id":"n-e453e5c5b6002f20","conclusion_name":"shift_x_plus_one of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-22bc5f818820583a","operation":"preserver_image","operation_detail":"euler_polynomial, shift 0","conclusion_id":"n-e7a0b023756a96cf","conclusion_name":"theta_plus_one_squared of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-2511714c727cb112","operation":"preserver_image","operation_detail":"derivative_polynomial, shift 0","conclusion_id":"n-adce92670fb061df","conclusion_name":"derivative of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-529e978060329525","operation":"preserver_image","operation_detail":"reversal, shift 0","conclusion_id":"n-9fa98aec39d32ffa","conclusion_name":"Triangle, read by rows, of pairwise sums of trinomial coefficients (A027907)."},{"id":"e-82aea44711ef6f52","operation":"preserver_image","operation_detail":"derivative_polynomial, shift 0","conclusion_id":"n-50e231117764dacd","conclusion_name":"one_plus_derivative of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-88c2477d26465b0a","operation":"preserver_image","operation_detail":"mobius, shift 0","conclusion_id":"n-d697df4adfdac804","conclusion_name":"mobius_x_over_x_plus_one of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."},{"id":"e-f79784aac595a1d5","operation":"preserver_image","operation_detail":"euler_polynomial, shift 0","conclusion_id":"n-f0466f0ac25538d1","conclusion_name":"theta_plus_one of Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n."}],"used_by_total":12,"links":[{"id":"l-69d398cbae3ce2df","kind":"fingerprint_related","node_a_id":"n-9fa98aec39d32ffa","node_b_id":"n-b1a7dcc8610d7e32","fingerprint":"f6-2f76d9ab212d3ec7","oeis_id":null,"in_catalog":null,"target":null,"row_alignment":null,"rows_matched":null,"oeis_nonn":null,"details":{"fingerprint":"f6-2f76d9ab212d3ec7"},"other_id":"n-9fa98aec39d32ffa","other":{"id":"n-9fa98aec39d32ffa","name":"Triangle, read by rows, of pairwise sums of trinomial coefficients (A027907).","first_index":0,"fingerprint":"f6-2f76d9ab212d3ec7","polytool_family":null,"degree_pattern":"affine","palindromic":0,"gamma_positive":0,"nonnegative":1,"rr_by_factors":0,"preview_rows":[["1"],["2","1"],["3","5","1"]],"card_rows":[["1"],["2","1"],["3","5","1"],["4","13","9","1"]],"row_sums_preview":["1","3","9","27","81","243","729","2187"],"regions":["(-inf, 0)","(-inf, 0]"],"region_exact":{},"oeis_ids":["A104029"],"derivation":{"root":"n-9fa98aec39d32ffa","steps":[],"edges":[],"text":"A104029"},"headline":"A104029: Triangle, read by rows, of pairwise sums of trinomial coefficients (A027907).","chain":null}},{"id":"l-24e0bed60bee8a0d","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A140429","in_catalog":0,"target":"row_sums","row_alignment":null,"rows_matched":null,"oeis_nonn":1,"details":{"alignment":{"first_row":0,"low_zeros_dropped":false,"oeis_offset":0,"oeis_term_position":1,"target":"row_sums","terms_compared":15},"in_catalog":false,"oeis_id":"A140429","oeis_nonn":true},"other_id":null,"other":null},{"id":"l-4d83bbadb6714864","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A354269","in_catalog":0,"target":"row_sums","row_alignment":null,"rows_matched":null,"oeis_nonn":1,"details":{"alignment":{"first_row":0,"low_zeros_dropped":false,"oeis_offset":1,"oeis_term_position":0,"target":"row_sums","terms_compared":15},"in_catalog":false,"oeis_id":"A354269","oeis_nonn":true},"other_id":null,"other":null},{"id":"l-7fb9f980c4a778af","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A133494","in_catalog":0,"target":"row_sums","row_alignment":null,"rows_matched":null,"oeis_nonn":1,"details":{"alignment":{"first_row":0,"low_zeros_dropped":false,"oeis_offset":0,"oeis_term_position":1,"target":"row_sums","terms_compared":15},"in_catalog":false,"oeis_id":"A133494","oeis_nonn":true},"other_id":null,"other":null},{"id":"l-9592008c369981e2","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A155734","in_catalog":0,"target":"row_sums","row_alignment":null,"rows_matched":null,"oeis_nonn":1,"details":{"alignment":{"first_row":0,"low_zeros_dropped":false,"oeis_offset":0,"oeis_term_position":1,"target":"row_sums","terms_compared":15},"in_catalog":false,"oeis_id":"A155734","oeis_nonn":true},"other_id":null,"other":null},{"id":"l-afb7c4ada6f265b6","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A027313","in_catalog":0,"target":"row_sums","row_alignment":null,"rows_matched":null,"oeis_nonn":1,"details":{"alignment":{"first_row":3,"low_zeros_dropped":false,"oeis_offset":0,"oeis_term_position":2,"target":"row_sums","terms_compared":12},"in_catalog":false,"oeis_id":"A027313","oeis_nonn":true},"other_id":null,"other":null},{"id":"l-bfcae4031069a88d","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A104029","in_catalog":1,"target":"reversed_triangle","row_alignment":"tabl","rows_matched":10,"oeis_nonn":1,"details":{"alignment":{"first_row":0,"low_zeros_dropped":false,"oeis_offset":0,"oeis_term_position":0,"row_alignment":"tabl","rows_matched":10,"target":"reversed_triangle","terms_compared":62},"in_catalog":true,"oeis_id":"A104029","oeis_nonn":true},"other_id":null,"other":null},{"id":"l-c94496323eb2b7a5","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A330381","in_catalog":1,"target":"triangle","row_alignment":"tabl","rows_matched":10,"oeis_nonn":1,"details":{"alignment":{"first_row":0,"low_zeros_dropped":false,"oeis_offset":0,"oeis_term_position":0,"row_alignment":"tabl","rows_matched":10,"target":"triangle","terms_compared":61},"in_catalog":true,"oeis_id":"A330381","oeis_nonn":true},"other_id":null,"other":null},{"id":"l-e3a74d88d24c3084","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A000244","in_catalog":0,"target":"row_sums","row_alignment":null,"rows_matched":null,"oeis_nonn":1,"details":{"alignment":{"first_row":0,"low_zeros_dropped":false,"oeis_offset":0,"oeis_term_position":0,"target":"row_sums","terms_compared":15},"in_catalog":false,"oeis_id":"A000244","oeis_nonn":true},"other_id":null,"other":null},{"id":"l-e91d3056ef9c50d8","kind":"oeis_match","node_a_id":"n-b1a7dcc8610d7e32","node_b_id":null,"fingerprint":null,"oeis_id":"A376478","in_catalog":0,"target":"row_sums","row_alignment":null,"rows_matched":null,"oeis_nonn":1,"details":{"alignment":{"first_row":1,"low_zeros_dropped":false,"oeis_offset":1,"oeis_term_position":2,"target":"row_sums","terms_compared":14},"in_catalog":false,"oeis_id":"A376478","oeis_nonn":true},"other_id":null,"other":null}],"oeis":[{"oeis_id":"A330381","relation":"identification"},{"oeis_id":"A104029","relation":"match_reversed_triangle"},{"oeis_id":"A000244","relation":"match_row_sums"},{"oeis_id":"A027313","relation":"match_row_sums"},{"oeis_id":"A133494","relation":"match_row_sums"},{"oeis_id":"A140429","relation":"match_row_sums"},{"oeis_id":"A155734","relation":"match_row_sums"},{"oeis_id":"A354269","relation":"match_row_sums"},{"oeis_id":"A376478","relation":"match_row_sums"},{"oeis_id":"A330381","relation":"match_triangle"}],"bfiles":[{"node_id":"n-b1a7dcc8610d7e32","oeis_id":"A000244","target":"row_sums","oeis_offset":0,"first_row":0,"rows_used":200,"terms_matched":15,"oeis_terms_agreeing":28,"oeis_terms_available":28,"term_count":200,"raw_size":10484},{"node_id":"n-b1a7dcc8610d7e32","oeis_id":"A104029","target":"reversed_triangle","oeis_offset":0,"first_row":0,"rows_used":44,"terms_matched":62,"oeis_terms_agreeing":62,"oeis_terms_available":62,"term_count":990,"raw_size":14429},{"node_id":"n-b1a7dcc8610d7e32","oeis_id":"A330381","target":"triangle","oeis_offset":0,"first_row":0,"rows_used":44,"terms_matched":61,"oeis_terms_agreeing":61,"oeis_terms_available":61,"term_count":990,"raw_size":14429}],"oeis_texts":[{"oeis_id":"","target":"node","first_row":0,"oeis_offset":0,"reversed":false,"trim_zeros":"none","regular_triangle":false,"rows_shown":10,"polytool_commit":"c48629374597092cc41ef4d6273f37991516f984","triangle_example":"Triangle begins:\n  0: 1;\n  1: 1,  2;\n  2: 1,  5,   3;\n  3: 1,  9,  13,    4;\n  4: 1, 14,  35,   26,    5;\n  5: 1, 20,  75,   96,   45,    6;\n  6: 1, 27, 140,  267,  216,   71,    7;\n  7: 1, 35, 238,  623,  750,  427,  105,    8;\n  8: 1, 44, 378, 1288, 2123, 1800,  770,  148,   9;\n  9: 1, 54, 570, 2436, 5211, 6046, 3858, 1296, 201, 10;\n","recurrence_sentence":"The row polynomials satisfy P(n,x) = (2+2*x)*P(n-1,x) - (1+x+x^2)*P(n-2,x) for n >= 2, with P(0,x) = 1, P(1,x) = 1 + 2*x.","mathematica":"P[0, x_] := 1;\nP[1, x_] := 1 + 2*x;\nP[n_, x_] := P[n, x] = Expand[(2 + 2*x)*P[n - 1, x] - (1 + x + x^2)*P[n - 2, x]];\nTable[CoefficientList[P[n, x], x], {n, 0, 9}] // Flatten","pari":"P(N) = {my(v = vector(N + 1)); v[1] = 1; v[2] = 1 + 2*x; for(n = 2, N, my(i = n + 1); v[i] = (2 + 2*x)*v[i - 1] - (1 + x + x^2)*v[i - 2]); v};\nrow(n, p) = {my(c = Vecrev(p)); c};\nT(N) = {my(v = P(N)); concat(vector(#v, i, row(i - 1, v[i])))};\nT(9)","reading":{"first_row":0,"offset":0,"reversed":false,"trim_zeros":"none","regular_triangle":false}},{"oeis_id":"A104029","target":"reversed_triangle","first_row":0,"oeis_offset":0,"reversed":true,"trim_zeros":"none","regular_triangle":true,"rows_shown":10,"polytool_commit":"c48629374597092cc41ef4d6273f37991516f984","triangle_example":"Triangle begins:\n  0:  1;\n  1:  2,   1;\n  2:  3,   5,    1;\n  3:  4,  13,    9,    1;\n  4:  5,  26,   35,   14,    1;\n  5:  6,  45,   96,   75,   20,    1;\n  6:  7,  71,  216,  267,  140,   27,    1;\n  7:  8, 105,  427,  750,  623,  238,   35,   1;\n  8:  9, 148,  770, 1800, 2123, 1288,  378,  44,  1;\n  9: 10, 201, 1296, 3858, 6046, 5211, 2436, 570, 54, 1;\n","recurrence_sentence":"Row n lists the coefficients of P(n,x) in descending powers of x, where P(n,x) = (2+2*x)*P(n-1,x) - (1+x+x^2)*P(n-2,x) for n >= 2, with P(0,x) = 1, P(1,x) = 1 + 2*x.","mathematica":"P[0, x_] := 1;\nP[1, x_] := 1 + 2*x;\nP[n_, x_] := P[n, x] = Expand[(2 + 2*x)*P[n - 1, x] - (1 + x + x^2)*P[n - 2, x]];\nTable[Reverse[PadRight[CoefficientList[P[n, x], x], n + 1]], {n, 0, 9}] // Flatten","pari":"P(N) = {my(v = vector(N + 1)); v[1] = 1; v[2] = 1 + 2*x; for(n = 2, N, my(i = n + 1); v[i] = (2 + 2*x)*v[i - 1] - (1 + x + x^2)*v[i - 2]); v};\nrow(n, p) = {my(c = Vecrev(p)); c = concat(c, vector(n + 1 - #c)); c = Vecrev(c); c};\nT(N) = {my(v = P(N)); concat(vector(#v, i, row(i - 1, v[i])))};\nT(9)","reading":{"first_row":0,"offset":0,"reversed":true,"trim_zeros":"none","regular_triangle":true}},{"oeis_id":"A330381","target":"triangle","first_row":0,"oeis_offset":0,"reversed":false,"trim_zeros":"none","regular_triangle":true,"rows_shown":10,"polytool_commit":"c48629374597092cc41ef4d6273f37991516f984","triangle_example":"Triangle begins:\n  0: 1;\n  1: 1,  2;\n  2: 1,  5,   3;\n  3: 1,  9,  13,    4;\n  4: 1, 14,  35,   26,    5;\n  5: 1, 20,  75,   96,   45,    6;\n  6: 1, 27, 140,  267,  216,   71,    7;\n  7: 1, 35, 238,  623,  750,  427,  105,    8;\n  8: 1, 44, 378, 1288, 2123, 1800,  770,  148,   9;\n  9: 1, 54, 570, 2436, 5211, 6046, 3858, 1296, 201, 10;\n","recurrence_sentence":"The row polynomials satisfy P(n,x) = (2+2*x)*P(n-1,x) - (1+x+x^2)*P(n-2,x) for n >= 2, with P(0,x) = 1, P(1,x) = 1 + 2*x.","mathematica":"P[0, x_] := 1;\nP[1, x_] := 1 + 2*x;\nP[n_, x_] := P[n, x] = Expand[(2 + 2*x)*P[n - 1, x] - (1 + x + x^2)*P[n - 2, x]];\nTable[PadRight[CoefficientList[P[n, x], x], n + 1], {n, 0, 9}] // Flatten","pari":"P(N) = {my(v = vector(N + 1)); v[1] = 1; v[2] = 1 + 2*x; for(n = 2, N, my(i = n + 1); v[i] = (2 + 2*x)*v[i - 1] - (1 + x + x^2)*v[i - 2]); v};\nrow(n, p) = {my(c = Vecrev(p)); c = concat(c, vector(n + 1 - #c)); c};\nT(N) = {my(v = P(N)); concat(vector(#v, i, row(i - 1, v[i])))};\nT(9)","reading":{"first_row":0,"offset":0,"reversed":false,"trim_zeros":"none","regular_triangle":true}}],"derivation":{"root":"n-b1a7dcc8610d7e32","steps":[],"edges":[],"text":"A330381"},"headline":"A330381: Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n.","chain":null}
