A233323
Triangle read by rows: T(n,k) = number of palindromic compositions of n in which the largest part is equal to k, 1 <= k <= n.
Original entry on oeis.org
1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 1, 0, 1, 1, 4, 1, 1, 0, 1, 1, 2, 3, 0, 1, 0, 1, 1, 7, 3, 3, 0, 1, 0, 1, 1, 4, 6, 1, 2, 0, 1, 0, 1, 1, 12, 7, 7, 1, 2, 0, 1, 0, 1, 1, 7, 12, 3, 5, 0, 2, 0, 1, 0, 1, 1, 20, 16, 15, 3, 5, 0, 2, 0, 1, 0, 1
Offset: 1
There are eight palindromic compositions of n=7, namely, {7}, {3,1,3}, {2,3,2}, {2,1,1,1,2}, {1,5,1}, {1,2,1,2,1}, {1,1,3,1,1}, {1,1,1,1,1,1,1}, and three of them have the largest part equal to 3, so T(7,3) = 3.
Triangle T(n,k) begins:
1;
1, 1;
1, 0, 1,
1, 2, 0, 1;
1, 1, 1, 0, 1;
1, 4, 1, 1, 0, 1;
1, 2, 3, 0, 1, 0, 1;
1, 7, 3, 3, 0, 1, 0, 1;
1, 4, 6, 1, 2, 0, 1, 0, 1;
1, 12, 7, 7, 1, 2, 0, 1, 0, 1;
...
-
b:= proc(n, k) option remember; `if`(n<=k, 1, 0)+
add(b(n-2*j, k), j=1..min(k, iquo(n, 2)))
end:
T:= (n, k)-> b(n, k) -b(n, k-1):
seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Dec 11 2013
-
b[n_, k_] := b[n, k] = If[n <= k, 1, 0] + Sum[b[n-2*j, k], { j, 1, Min[k, Quotient[n, 2]]}]; t[n_, k_] := b[n, k] - b[n, k-1]; Table[Table[t[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Alois P. Heinz's Maple code *)
-
T(n,k,ok=0)={
if(n<1,return(n==0 && ok));
if(k>n/2 && !ok,
n-=k;
if(n<0||n%2, return(0));
return(2^max(n/2-1,0))
);
sum(i=1,k,
T(n-2*i,k,ok||i==k)
)+(n==k || (ok && nCharles R Greathouse IV, Dec 11 2013
A233324
Triangle read by rows: T(n,k) = number of palindromic compositions of n in which no part exceeds k, 1 <= k <= n.
Original entry on oeis.org
1, 1, 2, 1, 1, 2, 1, 3, 3, 4, 1, 2, 3, 3, 4, 1, 5, 6, 7, 7, 8, 1, 3, 6, 6, 7, 7, 8, 1, 8, 11, 14, 14, 15, 15, 16, 1, 5, 11, 12, 14, 14, 15, 15, 16, 1, 13, 20, 27, 28, 30, 30, 31, 31, 32, 1, 8, 20, 23, 28, 28, 30, 30, 31, 31, 32, 1, 21, 37, 52, 55, 60, 60, 62, 62, 63, 63, 64
Offset: 1
Triangle T(n,k) begins:
1;
1, 2;
1, 1, 2;
1, 3, 3, 4;
1, 2, 3, 3, 4;
1, 5, 6, 7, 7, 8;
1, 3, 6, 6, 7, 7, 8;
1, 8, 11, 14, 14, 15, 15, 16;
1, 5, 11, 12, 14, 14, 15, 15, 16;
1, 13, 20, 27, 28, 30, 30, 31, 31, 32;
-
T:= proc(n, k) option remember; `if`(n<=k, 1, 0)+
add(T(n-2*j, k), j=1..min(k, iquo(n, 2)))
end:
seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Dec 11 2013
-
T[n_, k_] := T[n, k] = If[n <= k, 1, 0] + Sum[T[n-2*j, k], {j, 1, Min[k, Quotient[ n, 2]]}]; Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Mar 09 2015, after Alois P. Heinz *)
-
T(n,k)=if(n<1,return(n==0));sum(i=1,k,T(n-2*i,k))+(n<=k) \\ Charles R Greathouse IV, Dec 11 2013
A272912
Difference sequence of the sequence A116470 of all distinct Fibonacci numbers and Lucas numbers (A000032).
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 3, 2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025
Offset: 1
A116470 = (1, 2, 3, 4, 5, 7, 8, 11, 13, 18, 21, 29, 34, 47, 55, 76,...), so that (a(n)) = (1,1,1,1,2,1,3,2,5,3,8,5,13,8,12,...).
-
u = Table[Fibonacci[n], {n, 1, 200}]; v = Table[LucasL[n], {n, 1, 200}];
Take[Differences[Union[u, v]], 100]
-
Vec(x*(1+x-x^5)/(1-x^2-x^4) + O(x^50)) \\ Colin Barker, May 10 2016
A382478
Number of palindromic binary strings of length n having no 4-runs of 1's.
Original entry on oeis.org
1, 2, 2, 4, 3, 7, 6, 14, 12, 27, 23, 52, 44, 100, 85, 193, 164, 372, 316, 717, 609, 1382, 1174, 2664, 2263, 5135, 4362, 9898, 8408, 19079, 16207, 36776, 31240, 70888, 60217, 136641, 116072, 263384, 223736, 507689, 431265, 978602, 831290, 1886316, 1602363, 3635991, 3088654, 7008598, 5953572
Offset: 0
- Vincenzo Librandi, Table of n, a(n) for n = 0..2000
- M. A. Nyblom, Counting Palindromic Binary Strings Without r-Runs of Ones, J. Int. Seq. 16 (2013) #13.8.7, P_4(n).
- Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,1,0,1).
-
m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(-(x^2+1)*(x^5+2*x+1) / (-1+x^2+x^4+x^6+x^8))); // Vincenzo Librandi, May 19 2025
-
LinearRecurrence[{0,1,0,1,0,1,0,1},{1,2,2,4,3,7,6,14},50] (* Vincenzo Librandi, May 19 2025 *)
A382479
Number of palindromic binary strings of length n having no 6-runs of 1's.
Original entry on oeis.org
1, 2, 2, 4, 4, 8, 7, 15, 14, 30, 28, 60, 56, 119, 111, 236, 220, 468, 436, 928, 865, 1841, 1716, 3652, 3404, 7244, 6752, 14369, 13393, 28502, 26566, 56536, 52696, 112144, 104527, 222447, 207338, 441242, 411272, 875240, 815792, 1736111, 1618191, 3443720, 3209816, 6830904, 6366936
Offset: 0
- Vincenzo Librandi, Table of n, a(n) for n = 0..2000
- M. A. Nyblom, Counting Palindromic Binary Strings Without r-Runs of Ones, J. Int. Seq. 16 (2013) #13.8.7, P_6(n).
- Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,1,0,1,0,1,0,1).
-
m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(-(1+x+x^2)*(x^2-x+1)*(x^7+2*x+1)/(-1+x^2+x^4+x^6+x^8+x^10+x^12))); // Vincenzo Librandi, May 20 2025
-
LinearRecurrence[{0,1,0,1,0,1,0,1,0,1,0,1},{1,2,2,4,4,8,7,15,14,30,28,60},50] (* Vincenzo Librandi, May 20 2025 *)
A380696
a(n) = A007598(floor(n/2) - (-1)^n).
Original entry on oeis.org
1, 1, 0, 1, 1, 4, 1, 9, 4, 25, 9, 64, 25, 169, 64, 441, 169, 1156, 441, 3025, 1156, 7921, 3025, 20736, 7921, 54289, 20736, 142129, 54289, 372100, 142129, 974169, 372100, 2550409, 974169, 6677056, 2550409, 17480761, 6677056, 45765225, 17480761, 119814916
Offset: 0
-
A380696[n_] := Fibonacci[Floor[n/2] - (-1)^n]^2; Array[A380696, 50, 0] (* or *)
LinearRecurrence[{0, 2, 0, 2, 0, -1}, {1, 1, 0, 1, 1, 4}, 50] (* Paolo Xausa, Mar 27 2025 *)
-
from sympy import fibonacci
def A380696(n): return fibonacci(n+1>>1 if n&1 else (n>>1)-1)**2 # Chai Wah Wu, Mar 26 2025
Showing 1-6 of 6 results.
Comments