%I #13 Aug 06 2024 21:43:03
%S 6,19,10,36,45,16,61,100,103,26,90,193,256,239,42,127,318,549,676,553,
%T 68,168,493,960,1629,1764,1281,110,217,712,1579,3102,4753,4624,2967,
%U 178,270,993,2368,5515,9726,13961,12100,6873,288,331,1330,3433,8840,18505,30900
%N T(n,k)=Number of length n+2 0..k arrays with some pair in every consecutive three terms totalling exactly k.
%C Table starts
%C .....6.......19........36.........61..........90..........127..........168
%C ....10.......45.......100........193.........318..........493..........712
%C ....16......103.......256........549.........960.........1579.........2368
%C ....26......239.......676.......1629........3102.........5515.........8840
%C ....42......553......1764.......4753........9726........18505........31176
%C ....68.....1281......4624......13961.......30900........63241.......113024
%C ...110.....2967.....12100......40901.......97602.......214315.......404264
%C ...178.....6873.....31684.....119953......309078.......729097......1455496
%C ...288....15921.....82944.....351649......977664......2475985......5223552
%C ...466....36881....217156....1031057.....3094038......8415217.....18775816
%C ...754....85435....568516....3022933.....9789654.....28590415.....67437448
%C ..1220...197911...1488400....8863117....30977796.....97151683....242306240
%C ..1974...458463...3896676...25986061....98020170....330100459....870461352
%C ..3194..1062035..10201636...76189749...310161870...1121650903...3127322696
%C ..5168..2460217..26708224..223384017...981426624...3811203385..11235107264
%C ..8362..5699123..69923044..654949861..3105480558..12950003383..40363689352
%C .13530.13202089.183060900.1920277409..9826505742..44002376953.145010699592
%C .21892.30582803.479259664.5630150189.31093507092.149514426895.520968428032
%H R. H. Hardin, <a href="/A245869/b245869.txt">Table of n, a(n) for n = 1..9999</a>
%H Robert Israel, <a href="/A245869/a245869.pdf">Proof of recurrences for columns</a>
%H Robert Israel et al, <a href="https://math.stackexchange.com/questions/4952174/a-pattern-for-oeis-sequence-a245869"> A Pattern for OEIS Sequence A245869</a>, Mathematics StackExchange, Jul 29-30, 2024.
%F Empirical for column k:
%F k=1: a(n) = a(n-1) +a(n-2)
%F k=2: a(n) = 2*a(n-1) +a(n-2) -a(n-4) -a(n-5)
%F k=3: a(n) = 2*a(n-1) +2*a(n-2) -a(n-3)
%F k=4: a(n) = 3*a(n-1) +a(n-2) -a(n-3) -5*a(n-4) -8*a(n-5) +3*a(n-6)
%F k=5: a(n) = 2*a(n-1) +4*a(n-2) -a(n-3)
%F k=6: a(n) = 3*a(n-1) +3*a(n-2) -a(n-3) -9*a(n-4) -24*a(n-5) +5*a(n-6)
%F k=7: a(n) = 2*a(n-1) +6*a(n-2) -a(n-3)
%F k=8: a(n) = 3*a(n-1) +5*a(n-2) -a(n-3) -13*a(n-4) -48*a(n-5) +7*a(n-6)
%F k=9: a(n) = 2*a(n-1) +8*a(n-2) -a(n-3)
%F Empirical for row n:
%F n=1: a(n) = 2*a(n-1) -2*a(n-3) +a(n-4)
%F n=2: a(n) = 3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5)
%F n=3: a(n) = 2*a(n-1) +a(n-2) -4*a(n-3) +a(n-4) +2*a(n-5) -a(n-6)
%F n=4: a(n) = 3*a(n-1) -a(n-2) -5*a(n-3) +5*a(n-4) +a(n-5) -3*a(n-6) +a(n-7)
%F n=5: a(n) = 2*a(n-1) +2*a(n-2) -6*a(n-3) +6*a(n-5) -2*a(n-6) -2*a(n-7) +a(n-8)
%F n=6: a(n) = 3*a(n-1) -8*a(n-3) +6*a(n-4) +6*a(n-5) -8*a(n-6) +3*a(n-8) -a(n-9)
%F n=7: a(n) = 2*a(n-1) +3*a(n-2) -8*a(n-3) -2*a(n-4) +12*a(n-5) -2*a(n-6) -8*a(n-7) +3*a(n-8) +2*a(n-9) -a(n-10)
%F From _Robert Israel_, Aug 06 2024: (Start) For odd k, T(n,k) = 2 T(n-1,k) + (k-1) T(n-2,k) - T(n-3,k).
%F For even k, T(n,k) = 3 T(n-1,k) + (k-3) T(n-2,k) - T(n-3,k) + (2 k - 3) T(n-4,k) - k (k-2) T(n-5,k) + (k-1) T(n-6,k).
%F See links. (End)
%e Some solutions for n=6 k=4
%e ..1....4....0....4....0....1....2....3....1....2....0....3....3....0....2....4
%e ..4....2....1....1....4....2....4....1....0....3....1....0....3....4....1....3
%e ..0....2....4....0....3....2....0....3....3....1....3....1....1....2....3....1
%e ..4....0....0....4....0....1....4....0....1....1....1....3....0....0....4....3
%e ..4....2....4....4....4....2....1....4....4....3....2....1....4....4....1....2
%e ..0....2....0....0....3....2....0....0....0....3....2....2....4....3....0....2
%e ..2....0....4....4....0....1....4....4....3....1....4....3....0....1....4....2
%e ..4....4....0....1....1....2....3....0....1....4....0....1....0....2....1....2
%Y Column 1 is A006355(n+4)
%Y Column 3 is A206981(n+2)
%Y Row 1 is A090381.
%K nonn,tabl
%O 1,1
%A _R. H. Hardin_, Aug 04 2014