Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #15 Oct 18 2023 09:08:40
%S 1,1,2,4,8,15,28,52,96,177,345,694,1386,2751,5431,10672,20885,40724,
%T 79153,153402,296528,571845,1129293,2264749,4527029,9021498,17926740,
%U 35527082,70230422,138504765,272545323,535184340,1048842743,2051669285,4006253136,7954830148
%N a(n) is the largest number in the n-th row of triangle A140997.
%C Also the largest number of the n-th row of A140994.
%H Juri-Stepan Gerasimov, <a href="/A140998/a140998.jpg">Stepan's triangles and Pascal's triangle are connected by the recurrence relation ...</a>
%e The largest number of 1 is a(0) = 1.
%e The largest number of 1 1 is a(1) = 1.
%e The largest number of 1 2 1 is a(2) = 2.
%e The largest number of 1 4 2 1 is a(3) = 4.
%e The largest number of 1 8 4 2 1 is a(4) = 8.
%e The largest number of 1 15 9 4 2 1 is a(5) = 15.
%e The largest number of 1 28 19 9 4 2 1 is a(6) = 28.
%e The largest number of 1 52 40 19 9 4 2 1 is a(7) = 52.
%p A140997 := proc(n,k) option remember ; if k<0 or k>n then 0 ; elif k=0 or k=n then 1 ; elif k=n-1 then 2 ; elif k=n-2 then 4 ; else procname(n-1,k)+procname(n-2,k)+procname(n-3,k)+procname(n-3,k-1) ; fi; end:
%p A141018 := proc(n) max(seq(A140997(n,k),k=0..n)) ; end: for n from 0 to 60 do printf("%d,",A141018(n)) ; od: # _R. J. Mathar_, Sep 19 2008
%t T[n_, k_] := T[n, k] = Which[k < 0 || k > n, 0, k == 0 || k == n, 1, k == n-1, 2, k == n-2, 4, True, T[n-1, k]+T[n-2, k]+T[n-3, k]+T[n-3, k-1]];
%t a[n_] := Max[Table[T[n, k], {k, 0, n}]];
%t Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Oct 18 2023, after _R. J. Mathar_ *)
%Y Cf. A007318, A140993, A140994, A140995, A140996, A140997, A140998, A141020, A141021.
%K nonn
%O 0,3
%A _Juri-Stepan Gerasimov_, Jul 11 2008
%E Partially edited by _N. J. A. Sloane_, Jul 18 2008
%E Simplified definition, corrected from a(12) on and extended by _R. J. Mathar_, Sep 19 2008