A141018
a(n) is the largest number in the n-th row of triangle A140997.
Original entry on oeis.org
1, 1, 2, 4, 8, 15, 28, 52, 96, 177, 345, 694, 1386, 2751, 5431, 10672, 20885, 40724, 79153, 153402, 296528, 571845, 1129293, 2264749, 4527029, 9021498, 17926740, 35527082, 70230422, 138504765, 272545323, 535184340, 1048842743, 2051669285, 4006253136, 7954830148
Offset: 0
The largest number of 1 is a(0) = 1.
The largest number of 1 1 is a(1) = 1.
The largest number of 1 2 1 is a(2) = 2.
The largest number of 1 4 2 1 is a(3) = 4.
The largest number of 1 8 4 2 1 is a(4) = 8.
The largest number of 1 15 9 4 2 1 is a(5) = 15.
The largest number of 1 28 19 9 4 2 1 is a(6) = 28.
The largest number of 1 52 40 19 9 4 2 1 is a(7) = 52.
-
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:
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[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]];
a[n_] := Max[Table[T[n, k], {k, 0, n}]];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Oct 18 2023, after R. J. Mathar *)
Simplified definition, corrected from a(12) on and extended by
R. J. Mathar, Sep 19 2008
A008937
a(n) = Sum_{k=0..n} T(k) where T(n) are the tribonacci numbers A000073.
Original entry on oeis.org
0, 1, 2, 4, 8, 15, 28, 52, 96, 177, 326, 600, 1104, 2031, 3736, 6872, 12640, 23249, 42762, 78652, 144664, 266079, 489396, 900140, 1655616, 3045153, 5600910, 10301680, 18947744, 34850335, 64099760, 117897840, 216847936, 398845537, 733591314, 1349284788
Offset: 0
G.f. = x + 2*x^2 + 4*x^3 + 8*x^4 + 15*x^5 + 28*x^6 + 52*x^7 + 96*x^8 + 177*x^9 + ... [edited by _Petros Hadjicostas_, Jun 12 2019]
- A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 41.
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Isha Agarwal, Matvey Borodin, Aidan Duncan, Kaylee Ji, Tanya Khovanova, Shane Lee, Boyan Litchev, Anshul Rastogi, Garima Rastogi, and Andrew Zhao, From Unequal Chance to a Coin Game Dance: Variants of Penney's Game, arXiv:2006.13002 [math.HO], 2020.
- Kassie Archer and Noel Bourne, Pattern avoidance in compositions and powers of permutations, arXiv:2505.05218 [math.CO], 2025. See pp. 6, 9.
- Erik Bates, Blan Morrison, Mason Rogers, Arianna Serafini, and Anav Sood, A new combinatorial interpretation of partial sums of m-step Fibonacci numbers, arXiv:2503.11055 [math.CO], 2025. See p. 3.
- Otto Dunkel, Solutions of a probability difference equation, Amer. Math. Monthly, 32 (1925), 354-370; see pp. 356 and 369.
- Jia Huang, A coin flip game and generalizations of Fibonacci numbers, arXiv:2501.07463 [math.CO], 2025. See p. 7.
- Thomas Langley, Jeffrey Liese, and Jeffrey Remmel, Generating Functions for Wilf Equivalence Under Generalized Factor Order, J. Int. Seq. 14 (2011), Article # 11.4.2.
- William Verreault, MacMahon Partition Analysis: a discrete approach to broken stick problems, arXiv:2107.10318 [math.CO], 2021.
- Index entries for linear recurrences with constant coefficients, signature (2,0,0,-1).
-
a:=[0,1,1];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Sep 13 2019
-
a008937 n = a008937_list !! n
a008937_list = tail $ scanl1 (+) a000073_list
-- Reinhard Zumkeller, Apr 07 2012
-
[ n eq 1 select 0 else n eq 2 select 1 else n eq 3 select 2 else n eq 4 select 4 else 2*Self(n-1)-Self(n-4): n in [1..40] ]; // Vincenzo Librandi, Aug 21 2011
-
A008937 := proc(n) option remember; if n <= 3 then 2^n else 2*procname(n-1)-procname(n-4) fi; end;
a:= n-> (Matrix([[1,1,0,0], [1,0,1,0], [1,0,0,0], [1,0,0,1]])^n)[4,1]: seq(a(n), n=0..50); # Alois P. Heinz, Jul 24 2008
-
CoefficientList[Series[x/(1-2x+x^4), {x, 0, 40}], x]
Accumulate[LinearRecurrence[{1,1,1},{0,1,1},40]] (* Harvey P. Dale, Dec 04 2017 *)
LinearRecurrence[{2, 0, 0, -1},{0, 1, 2, 4},40] (* Ray Chandler, Mar 01 2024 *)
-
{a(n) = if( n<0, polcoeff( - x^3 / (1 - 2*x^3 + x^4) + x * O(x^-n), -n), polcoeff( x / (1 - 2*x + x^4) + x * O(x^n), n))}; /* Michael Somos, Aug 23 2014 */
-
a(n) = sum(j=0, n\2, sum(k=0, j, binomial(n-2*j,k+1)*binomial(j,k)*2^k)); \\ Michel Marcus, Sep 08 2017
-
def A008937_list(prec):
P = PowerSeriesRing(ZZ, 'x', prec)
x = P.gen().O(prec)
return (x/(1-2*x+x^4)).list()
A008937_list(40) # G. C. Greubel, Sep 13 2019
A140993
Triangle G(n, k) read by rows, for 1 <= k <= n, where G(n, n) = G(n+1, 1) = 1, G(n+2, 2) = 2, G(n+3, m) = G(n+1, m-1) + G(n+1, m-2) + G(n+2, m-1) for n >= 1 and m = 3..(n+2).
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 5, 7, 1, 1, 2, 5, 11, 12, 1, 1, 2, 5, 12, 23, 20, 1, 1, 2, 5, 12, 28, 46, 33, 1, 1, 2, 5, 12, 29, 63, 89, 54, 1, 1, 2, 5, 12, 29, 69, 137, 168, 88, 1, 1, 2, 5, 12, 29, 70, 161, 289, 311, 143, 1, 1, 2, 5, 12, 29, 70, 168, 367, 594, 567, 232, 1, 1, 2, 5, 12, 29, 70, 169, 399, 817, 1194, 1021, 376, 1
Offset: 1
Triangle G(n,k) (with rows for n >= 1 and columns for 1 <= k <= n) begins:
1
1 1
1 2 1
1 2 4 1
1 2 5 7 1
1 2 5 11 12 1
1 2 5 12 23 20 1
1 2 5 12 28 46 33 1
1 2 5 12 29 63 89 54 1
1 2 5 12 29 69 137 168 88 1
1 2 5 12 29 70 161 289 311 143 1
1 2 5 12 29 70 168 367 594 567 232 1
1 2 5 12 29 70 169 399 817 1194 1021 376 1
1 2 5 12 29 70 169 407 934 1778 2355 1820 609 1
...
From _Petros Hadjicostas_, Feb 09 2021: (Start)
Rectangular array RA(n,k) (with rows for n >= 1 and columns for k >= 1) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 4, 7, 12, 20, 33, 54, 88, 143, ...
1, 2, 5, 11, 23, 46, 89, 168, 311, 567, ...
1, 2, 5, 12, 28, 63, 137, 289, 594, 1194, ...
1, 2, 5, 12, 29, 69, 161, 367, 817, 1778, ...
1, 2, 5, 12, 29, 70, 168, 399, 934, 2150, ...
1, 2, 5, 12, 29, 70, 169, 407, 975, 2316, ...
1, 2, 5, 12, 29, 70, 169, 408, 984, 2367, ...
1, 2, 5, 12, 29, 70, 169, 408, 985, 2377, ...
1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, ...
...
Reading the array RA(n,k) by ascending antidiagonals, we get triangle G(n,k) above. (End)
Cf.
A000071,
A000079,
A000129,
A007318,
A140994,
A140995,
A140996,
A140997,
A140998,
A141020,
A141021.
-
A140993 := proc(n,k) if k = n then 1; elif k = 1 then 1; elif k = 2 then 2; else procname(n-2,k-1)+procname(n-2,k-2)+procname(n-1,k-1) ; end if; end proc: seq(seq(A140993(n,k),k=1..n),n=1..15) ; # R. J. Mathar, Apr 28 2010
-
t[n_, k_] := If[k == n, 1, If[k == 1, 1, If[k == 2, 2, t[n - 2, k - 1] + t[n - 2, k - 2] + t[n - 1, k - 1]]]]; Flatten[Table[ t[n, k], {n, 13}, {k, n}]] (* Robert G. Wilson v, Dec 22 2011 *)
A140994
Triangle G(n, k), for 0 <= k <= n, read by rows, where G(n, n) = G(n+1, 0) = 1, G(n+2, 1) = 2, G(n+3, 2) = 4, G(n+4, m) = G(n+1, m-2) + G(n+1, m-3) + G(n+2, m-2) + G(n+3, m-1) for n >= 0 and m = 3..(n+3).
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 4, 8, 1, 1, 2, 4, 9, 15, 1, 1, 2, 4, 9, 19, 28, 1, 1, 2, 4, 9, 19, 40, 52, 1, 1, 2, 4, 9, 19, 41, 83, 96, 1, 1, 2, 4, 9, 19, 41, 88, 170, 177, 1, 1, 2, 4, 9, 19, 41, 88, 188, 345, 326, 1, 1, 2, 4, 9, 19, 41, 88, 189, 400, 694, 600, 1, 1, 2, 4, 9, 19, 41, 88, 189, 406, 846, 1386, 1104, 1
Offset: 0
Triangle begins:
1
1 1
1 2 1
1 2 4 1
1 2 4 8 1
1 2 4 9 15 1
1 2 4 9 19 28 1
1 2 4 9 19 40 52 1
1 2 4 9 19 41 83 96 1
1 2 4 9 19 41 88 170 177 1
1 2 4 9 19 41 88 188 345 326 1
1 2 4 9 19 41 88 189 400 694 600 1
1 2 4 9 19 41 88 189 406 846 1386 1104 1
... [corrected by _Petros Hadjicostas_, Jun 12 2019]
E.g., G(12, 9) = G(9, 7) + G(9, 6) + G(10, 7) + G(11, 8) = 170 + 88 + 188 + 400 = 846.
Cf.
A007318,
A008937,
A140993,
A140995,
A140996,
A140997,
A140998,
A141015,
A141018,
A141020,
A141021,
A141031,
A141065,
A141066,
A141067.
-
G := proc(n,k) if k=0 or n =k then 1; elif k= 1 then 2 ; elif k =2 then 4; elif k > n or k < 0 then 0 ; else procname(n-3,k-2)+procname(n-3,k-3)+procname(n-2,k-2)+procname(n-1,k-1) ; end if; end proc: seq(seq(G(n,k),k=0..n),n=0..15) ; # R. J. Mathar, Apr 14 2010
-
nlim = 50;
Do[G[n, 0] = 1, {n, 0, nlim}];
Do[G[n, n] = 1, {n, 1, nlim}];
Do[G[n + 2, 1] = 2, {n, 0, nlim}];
Do[G[n + 3, 2] = 4, {n, 0, nlim}];
Do[G[n + 4, m] =
G[n + 1, m - 2] + G[n + 1, m - 3] + G[n + 2, m - 2] +
G[n + 3, m - 1], {n, 0, nlim}, {m, 3, n + 3}];
A140994 = {}; For[n = 0, n <= nlim, n++,
For[k = 0, k <= n, k++, AppendTo[A140994, G[n, k]]]];
A140994 (* Robert Price, Aug 19 2019 *)
A140998
Triangle G(n, k), read by rows, for 0 <= k <= n, where G(n, 0) = G(n+1, n+1) = 1, G(n+2, n+1) = 2, and G(n+3, m) = G(n+1, m-1) + G(n+1, m) + G(n+2, m) for n >= 0 and m = 1..n+1.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 7, 5, 2, 1, 1, 12, 11, 5, 2, 1, 1, 20, 23, 12, 5, 2, 1, 1, 33, 46, 28, 12, 5, 2, 1, 1, 54, 89, 63, 29, 12, 5, 2, 1, 1, 88, 168, 137, 69, 29, 12, 5, 2, 1, 1, 143, 311, 289, 161, 70, 29, 12, 5, 2, 1, 1, 232, 567, 594, 367, 168, 70, 29, 12, 5, 2, 1
Offset: 0
Triangle begins (with rows for n >= 0 and columns for k >= 0):
1;
1, 1;
1, 2, 1;
1, 4, 2, 1;
1, 7, 5, 2, 1;
1, 12, 11, 5, 2, 1;
1, 20, 23, 12, 5, 2, 1;
1, 33, 46, 28, 12, 5, 2, 1;
1, 54, 89, 63, 29, 12, 5, 2, 1;
1, 88, 168, 137, 69, 29, 12, 5, 2, 1;
1, 143, 311, 289, 161, 70, 29, 12, 5, 2, 1;
-
G[n_,k_] := G[n,k] = Which[k==0 || k==n, 1, k==n-1, 2, True, G[n-2,k-1] + G[n-2,k] + G[n-1,k]]; Table[G[n,k], {n,0,12}, {k,0,n}] (* Jean-François Alcover, Jun 09 2019 *)
-
G(n,k) = if(k==0 || k==n, 1, if(k==n-1, 2, G(n-1, k) + G(n-2, k) + G(n-2, k-1)));
for(n=0,12, for(k=0,n, print1(G(n,k), ", "))) \\ G. C. Greubel, Jun 09 2019
-
def G(n,k):
if (k==0 or k==n): return 1
elif (k==n-1): return 2
else: return G(n-1, k) + G(n-2, k) + G(n-2, k-1)
[[G(n,k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jun 09 2019
Indices in the definition corrected by
R. J. Mathar, Aug 02 2009
A140996
Triangle G(n, k) read by rows for 0 <= k <= n, where G(n, 0) = G(n+1, n+1) = 1, G(n+2, n+1) = 2, G(n+3, n+1) = 4, G(n+4, n+1) = 8, and G(n+5, m) = G(n+1, m-1) + G(n+1, m) + G(n+2, m) + G(n+3, m) + G(n+4, m) for n >= 0 for m = 1..(n+1).
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, 31, 17, 8, 4, 2, 1, 1, 60, 35, 17, 8, 4, 2, 1, 1, 116, 72, 35, 17, 8, 4, 2, 1, 1, 224, 148, 72, 35, 17, 8, 4, 2, 1, 1, 432, 303, 149, 72, 35, 17, 8, 4, 2, 1, 1, 833, 618, 308, 149, 72, 35, 17, 8, 4, 2, 1, 1, 1606, 1257, 636, 308, 149, 72, 35, 17, 8, 4, 2, 1
Offset: 0
Triangle (with rows n >= 0 and columns k >= 0) begins as follows:
1
1 1
1 2 1
1 4 2 1
1 8 4 2 1
1 16 8 4 2 1
1 31 17 8 4 2 1
1 60 35 17 8 4 2 1
1 116 72 35 17 8 4 2 1
1 224 148 72 35 17 8 4 2 1
1 432 303 149 72 35 17 8 4 2 1
1 833 618 308 149 72 35 17 8 4 2 1
...
Cf.
A007318,
A107066,
A140993,
A140994,
A140995,
A140997,
A140998,
A141020,
A141021,
A141031,
A141065,
A141066,
A141067,
A141068,
A141069,
A141070,
A141072,
A141073,
A309462.
-
nlim = 100;
For[n = 0, n <= nlim, n++, G[n, 0] = 1];
For[n = 1, n <= nlim, n++, G[n, n] = 1];
For[n = 2, n <= nlim, n++, G[n, n-1] = 2];
For[n = 3, n <= nlim, n++, G[n, n-2] = 4];
For[n = 4, n <= nlim, n++, G[n, n-3] = 8];
For[n = 5, n <= nlim, n++, For[k = 1, k < n - 3, k++,
G[n, k] = G[n-4, k-1] + G[n-4, k] + G[n-3, k] + G[n-2, k] + G[n-1, k]]];
A140996 = {}; For[n = 0, n <= nlim, n++,
For[k = 0, k <= n, k++, AppendTo[A140996, G[n, k]]]];
A140996 (* Robert Price, Jul 03 2019 *)
G[n_, k_] := G[n, k] = Which[k < 0 || k > n, 0, k == 0 || k == n, 1, k == n - 1, 2, k == n - 2, 4, k == n - 3, 8, True, G[n - 1, k] + G[n - 2, k] + G[n - 3, k] + G[n - 4, k] + G[n - 4, k - 1]];
Table[G[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 28 2024 *)
A140995
Triangle G(n, k) read by rows, for 0 <= k <= n, where G(n, n) = G(n+1, 0) = 1, G(n+2, 1) = 2, G(n+3, 2) = 4, G(n+4, 3) = 8, and G(n+5, m) = G(n+1, m-3) + G(n+1, m-4) + G(n+2, m-3) + G(n+3, m-2) + G(n+4, m-1) for n >= 0 and m = 4..(n+4).
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 16, 1, 1, 2, 4, 8, 17, 31, 1, 1, 2, 4, 8, 17, 35, 60, 1, 1, 2, 4, 8, 17, 35, 72, 116, 1, 1, 2, 4, 8, 17, 35, 72, 148, 224, 1, 1, 2, 4, 8, 17, 35, 72, 149, 303, 432, 1, 1, 2, 4, 8, 17, 35, 72, 149, 308, 618, 833, 1, 1, 2, 4, 8, 17, 35, 72, 149, 308, 636, 1257, 1606, 1
Offset: 0
Triangle begins:
1
1 1
1 2 1
1 2 4 1
1 2 4 8 1
1 2 4 8 16 1
1 2 4 8 17 31 1
1 2 4 8 17 35 60 1
1 2 4 8 17 35 72 116 1
1 2 4 8 17 35 72 148 224 1
1 2 4 8 17 35 72 149 303 432 1
1 2 4 8 17 35 72 149 308 618 833 1
...
Cf.
A000079,
A007318,
A140993,
A140994,
A140996,
A140997,
A140998,
A141020,
A141021,
A141031,
A141065,
A141066,
A141067,
A141068,
A141069,
A141070,
A141072,
A141073,
A309462.
A141021
Pascal-like triangle with index of asymmetry y = 4 and index of obliqueness z = 1.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 16, 1, 1, 2, 4, 8, 16, 32, 1, 1, 2, 4, 8, 16, 33, 63, 1, 1, 2, 4, 8, 16, 33, 67, 124, 1, 1, 2, 4, 8, 16, 33, 67, 136, 244, 1, 1, 2, 4, 8, 16, 33, 67, 136, 276, 480, 1
Offset: 0
Pascal-like triangle with y = 4 and z = 1 (with rows n >= 0 and columns k >= 0) begins as follows:
1
1 1
1 2 1
1 2 4 1
1 2 4 8 1
1 2 4 8 16 1
1 2 4 8 16 32 1
1 2 4 8 16 33 63 1
1 2 4 8 16 33 67 124 1
1 2 4 8 16 33 67 136 244 1
1 2 4 8 16 33 67 136 276 480 1
1 2 4 8 16 33 67 136 276 560 944 1
...
Cf.
A007318,
A140993,
A140994,
A140995,
A140996,
A140997,
A140998,
A141020,
A141031,
A172119,
A308808.
-
# This is a slight modification of R. J. Mathar's Maple program from array A141020:
A141020 := 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 ; elif k=n-3 then 8 ; elif k=n-4 then 16 ; else procname(n-1, k) +procname(n-2, k)+procname(n-3, k)+procname(n-4, k) +procname(n-5, k)+procname(n-5, k-1) ; fi; end:
A141021 := proc(n, k) A141020(n, n-k): end:
for n1 from 0 to 20 do for k1 from 0 to n1 do printf("%d, ", A141021(n1, k1)) ; od: od: # Petros Hadjicostas, Jun 16 2019
-
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, k == n - 3, 8, k == n - 4, 16, True, t[n - 1, k] + t[n - 2, k] + t[n - 3, k] + t[n - 4, k] + t[n - 5, k] + t[n - 5, k - 1]];
T[n_, k_] := t[n, n - k];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 24 2020 *)
A141020
Pascal-like triangle with index of asymmetry y = 4 and index of obliqueness z = 0.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, 32, 16, 8, 4, 2, 1, 1, 63, 33, 16, 8, 4, 2, 1, 1, 124, 67, 33, 16, 8, 4, 2, 1, 1, 244, 136, 67, 33, 16, 8, 4, 2, 1, 1, 480, 276, 136, 67, 33, 16, 8, 4, 2, 1, 1, 944, 560, 276, 136, 67, 33, 16, 8, 4, 2, 1
Offset: 0
Pascal-like triangle with y = 4 and z = 0 begins as follows:
1
1 1
1 2 1
1 4 2 1
1 8 4 2 1
1 16 8 4 2 1
1 32 16 8 4 2 1
1 63 33 16 8 4 2 1
1 124 67 33 16 8 4 2 1
1 244 136 67 33 16 8 4 2 1
1 480 276 136 67 33 16 8 4 2 1
1 944 560 276 136 67 33 16 8 4 2 1
...
Cf.
A001949,
A007318,
A140993,
A140994,
A140995,
A140996,
A140997,
A140998,
A141021,
A141031,
A141064,
A141065,
A141066,
A141067,
A141069,
A141070,
A141072,
A141073.
-
A141020 := 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 ; elif k=n-3 then 8 ; elif k=n-4 then 16 ; else procname(n-1,k) +procname(n-2,k)+procname(n-3,k)+procname(n-4,k) +procname(n-5,k)+procname(n-5,k-1) ; fi; end:
for n from 0 to 20 do for k from 0 to n do printf("%d,",A141020(n,k)) ; od: od: # R. J. Mathar, Sep 19 2008
-
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, k == n-3, 8, k == n-4, 16, True, T[n-1, k] + T[n-2, k] + T[n-3, k] + T[n-4, k] + T[n-5, k] + T[n-5, k-1]];
Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 18 2019, after R. J. Mathar *)
A141066
List of different composites in Pascal-like triangles with index of asymmetry y = 2 and index of obliquity z = 0 or z = 1.
Original entry on oeis.org
4, 8, 9, 15, 28, 40, 52, 96, 88, 170, 177, 188, 326, 345, 189, 400, 600, 694, 406, 846, 1104, 1386, 871, 1779, 2031, 2751, 872, 1866, 3736, 6872, 7730, 10672, 4022, 8505, 12640, 15979, 20885, 4023, 8633, 18079, 23249, 32859, 40724, 42762, 67240, 18559, 39677, 78652, 80866, 153402
Offset: 1
Pascal-like triangle with y = 2 and z = 0 (i.e., A140997) begins as follows:
1, so no composite.
1 1, so no composite.
1 2 1, so no composite.
1 4 2 1, so a(1) = 4.
1 8 4 2 1, so a(2) = 8.
1 15 9 4 2 1, so a(3) = 9 and a(4) = 15.
1 28 19 9 4 2 1, so a(5) = 28.
1 52 40 19 9 4 2 1, so a(6) = 40 and a(7) = 52.
1 96 83 41 19 9 4 2 1, so a(8) = 96.
1 177 170 88 41 19 9 4 2 1, so a(9) = 88, a(10) = 170, and a(11) = 177.
1 326 345 188 88 41 19 9 4 2 1, so a(12) = 188, a(13) = 326, and a(14) = 345.
1 600 694 400 189 88 41 19 9 4 2 1, so a(15) = 189, a(16) = 400, a(17) = 600, and a(18) = 694.
... [example edited by _Petros Hadjicostas_, Jun 11 2019]
Cf.
A007318 (y = 0),
A140993 (y = 1 and z = 1),
A140994 (y = 2 and z = 1),
A140995 (y = 3 and z = 1),
A140996 (y = 3 and z = 0),
A140997 (y = 2 and z = 0),
A140998 (y = 1 and z = 0),
A141020 (y = 4 and z = 0),
A141021 (y = 4 and z = 1),
A141064 (has primes when y = 1),
A141065 (has composites when y = 1),
A141067 (has primes when y = 2),
A141068 (has primes when y = 3),
A141069 (has composites when y = 3).
-
# This is a modification of R. J. Mathar's program for A141031 (for the case y = 4 and z = 0).
# Construction of array A140997 (y = 2 and z = 0):
A140997 := proc(n, k) option remember; if k < 0 or n < k 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); end if; end proc;
# Construction of the current sequence:
A141066 := proc(nmax) local a, b, n, k, new; a := []; for n from 0 to nmax do b := []; for k from 0 to n do new := A140997(n, k); if not (new = 1 or isprime(new) or new in a or new in b) then b := [op(b), new]; end if; end do; a := [op(a), op(sort(b))]; end do; RETURN(a); end proc;
# Generation of numbers in the current sequence:
A141066(19);
# If one wishes to sort the numbers, then replace RETURN(a) with RETURN(sort(a)) in the above Maple code. In this case, however, the sequence is not uniquely defined because it depends on the maximum n. - Petros Hadjicostas, Jun 15 2019
Showing 1-10 of 23 results.
Comments