A090365
Shifts 1 place left under the INVERT transform of the BINOMIAL transform of this sequence.
Original entry on oeis.org
1, 1, 3, 11, 47, 225, 1177, 6625, 39723, 251939, 1681535, 11764185, 86002177, 655305697, 5193232611, 42726002123, 364338045647, 3215471252769, 29331858429241, 276224445794785, 2682395337435723, 26832698102762435, 276221586866499839, 2923468922184615897
Offset: 0
-
bintr:= proc(p) proc(n) add(p(k) *binomial(n,k), k=0..n) end end:
invtr:= proc(p) local b;
b:= proc(n) option remember; local i;
`if`(n<1, 1, add(b(n-i) *p(i-1), i=1..n+1))
end;
end:
b:= invtr(bintr(a)):
a:= n-> `if`(n<0, 0, b(n-1)):
seq(a(n), n=0..30); # Alois P. Heinz, Jun 28 2012
-
a[n_] := Module[{A, B}, A = 1+x; For[k=1, k <= n, k++, B = (A /. x -> x/(1 - x))/(1-x) + O[x]^n // Normal; A = 1 + x*A*B]; SeriesCoefficient[A, {x, 0, n}]]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Oct 23 2016, adapted from PARI *)
-
{a(n)=local(A); if(n<0,0,A=1+x+x*O(x^n); for(k=1,n,B=subst(A,x, x/(1-x))/(1-x)+x*O(x^n); A=1+x*A*B);polcoeff(A,n,x))}
A006014
a(n+1) = (n+1)*a(n) + Sum_{k=1..n-1} a(k)*a(n-k).
Original entry on oeis.org
1, 2, 7, 32, 178, 1160, 8653, 72704, 679798, 7005632, 78939430, 965988224, 12762344596, 181108102016, 2748049240573, 44405958742016, 761423731533286, 13809530704348160, 264141249701936818, 5314419112717217792, 112201740111374359516, 2480395343617443024896
Offset: 1
G.f. = x + 2*x^2 + 7*x^3 + 32*x^4 + 178*x^5 + 1160*x^6 + 8653*x^7 + 72704*x^8 + ...
- D. E. Knuth, personal communication.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Michael De Vlieger, Table of n, a(n) for n = 1..449
- Jimmy Devillet and Bruno Teheux, Associative, idempotent, symmetric, and order-preserving operations on chains, arXiv:1805.11936 [math.RA], 2018.
- E. Duchi, V. Guerrini, S. Rinaldi, and G. Schaeffer, Fighting fish. J. Phys. A, Math. Theor. 50, No. 2, Article ID 024002, 16 p. (2017), chapter 4.
-
Nest[Append[#1, #1[[-1]] (#2 + 1) + Total@ Table[#1[[k]] #1[[#2 - k]], {k, #2 - 1}]] & @@ {#, Length@ #} &, {1}, 17] (* Michael De Vlieger, Aug 22 2018 *)
(* or *)
a[1] = 1; a[n_] := a[n] = n a[n-1] + Sum[a[k] a[n-1-k], {k, n-2}]; Array[a, 18] (* Giovanni Resta, Aug 23 2018 *)
-
{a(n) = local(A); if( n<1, 0, A = vector(n); A[1] = 1; for( k=2, n, A[k] = k * A[k-1] + sum( j=1, k-2, A[j] * A[k-1-j])); A[n])} /* Michael Somos, Jul 24 2011 */
-
from sage.all import *
@CachedFunction
def a(n): # a = A006014
if n<5: return (pow(5,n-1) + 3)//4
else: return n*a(n-1) + 2*sum(a(k)*a(n-k-1) for k in range(1,(n//2))) + (n%2)*pow(a((n-1)//2),2)
print([a(n) for n in range(1,61)]) # G. C. Greubel, Jan 10 2025
A152884
Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} with excedance set equal to the k-th subset of {1,2,...,n-1} (n>=0, 0<=k<=ceiling(2^(n-1))-1). The subsets of {1,2,...,n-1} are ordered according to size, while the subsets of the same size follow the lexicographic order.
Original entry on oeis.org
1, 1, 1, 1, 1, 3, 1, 1, 1, 7, 3, 1, 7, 3, 1, 1, 1, 15, 7, 3, 1, 31, 17, 7, 7, 3, 1, 15, 7, 3, 1, 1, 1, 31, 15, 7, 3, 1, 115, 69, 37, 15, 31, 17, 7, 7, 3, 1, 115, 69, 31, 37, 17, 7, 15, 7, 3, 1, 31, 15, 7, 3, 1, 1, 1, 63, 31, 15, 7, 3, 1, 391, 245, 145, 77, 31, 115, 69, 37, 15, 31, 17, 7, 7, 3, 1
Offset: 0
T(5,3) = 3 because the 3rd subset of {1,2,3,4} is {3} and the permutations of {1,2,3,4,5} with excedance set {3} are 12435, 12534 and 12543.
T(5,4) = 1: 12354 (4th subset of {1,2,3,4} is {4}).
Triangle starts:
k=0 1 2 3 4 5 6 7 8 ...
n=0: 1;
n=1: 1;
n=2: 1, 1;
n=3: 1, 3, 1, 1;
n=4: 1, 7, 3, 1, 7, 3, 1, 1;
n=5: 1, 15, 7, 3, 1, 31, 17, 7, 7, 3, 1, 15, 7, 3, 1, 1;
...
-
n := 7: A := {1, 2, 4}: with(combinat): P := permute(n): EX := proc (p) local S, i: S := {}: for i to n-1 do if i < p[i] then S := `union`(S, {i}) else end if end do: S end proc: ct := 0: for j to factorial(n) do if EX(P[j]) = A then ct := ct+1 else end if end do: ct;
# second Maple program:
T:= proc(n) option remember; uses combinat; local b, i, l;
l:= map(x-> {x[]}, [seq(choose([$1..n-1], i)[], i=0..n-1)]):
for i to nops(l) do h(l[i]):=i od:
b:= proc(s, l) option remember; (m->
`if`(m=0, x^h(l), add(b(s minus {i}, {l[],
`if`(i
seq(coeff(p, x, i), i=1..degree(p)))(b({$1..n}, {}))
end: T(0):=1:
seq(T(n), n=0..8); # Alois P. Heinz, Jan 29 2023
T(0,0)=1 prepended and indexing adapted by
Alois P. Heinz, Jan 29 2023
A290615
Number of maximal independent vertex sets (and minimal vertex covers) in the n-triangular honeycomb bishop graph.
Original entry on oeis.org
1, 2, 5, 14, 45, 164, 661, 2906, 13829, 70736, 386397, 2242118, 13759933, 88975628, 604202693, 4296191090, 31904681877, 246886692680, 1986631886029, 16592212576862, 143589971363981, 1285605080403332, 11891649654471285, 113491862722958474, 1116236691139398565
Offset: 1
- Andrew Howroyd, Table of n, a(n) for n = 1..150
- Max Alekseyev, Subsequences of odd powers, answer to question on Mathoverflow.
- Max Alekseyev, Generating function for partial sums of the sequence, answer to question on Mathoverflow.
- Peter Taylor, Subsequence of the cubes, answer to question on Mathoverflow.
- Eric Weisstein's World of Mathematics, Maximal Independent Vertex Set
- Eric Weisstein's World of Mathematics, Minimal Vertex Cover
-
Table[Sum[k! StirlingS2[m, k] StirlingS2[n + 1 - m, k + 1], {m, 0, n}, {k, 0, Min[m, n - m]}], {n, 20}] (* Eric W. Weisstein, Feb 01 2024 *)
-
{ A290615(n) = sum(m=0, n, sum(k=0, min(m,n-m), k! * stirling(m,k,2) * stirling(n+1-m,k+1,2) )); } \\ Max Alekseyev, Oct 14 2021
A092920
Number of strongly monotone partitions of [n].
Original entry on oeis.org
1, 1, 2, 4, 9, 22, 58, 164, 496, 1601, 5502, 20075, 77531, 315947, 1354279, 6087421, 28611385, 140239297, 715116827, 3785445032, 20760746393, 117759236340, 689745339984, 4165874930885, 25911148634728, 165775085602106, 1089773992530717, 7353740136527305
Offset: 0
-
G:=1/(1-x-x^2/(1-x-x^2/(1-2*x-x^2/(1-3*x-x^2/(1-4*x-x^2/(1-5*x-x^2/(1-6*x-x^2/(1-7*x-x^2/(1-8*x-x^2/(1-9*x-x^2/(1-10*x-x^2/(1-11*x-x^2/(1-12*x-x^2/(1-13*x-x^2/(1-14*x-x^2/(1-15*x-x^2/(1-16*x-x^2/(1-17*x-x^2)))))))))))))))))): Gser:=series(G,x=0,32): seq(coeff(Gser, x, n), n=0..28); # Emeric Deutsch, Apr 13 2005
-
terms = 26;
f[1] = 1; f[k_ /; k>1] = -x^2;
g[1] = 1-x; g[k_ /; k>1] := 1-(k-1)x;
A[x_] = ContinuedFractionK[f[k], g[k], {k, 1, Ceiling[terms/2]}];
CoefficientList[A[x] + O[x]^terms, x] (* Jean-François Alcover, Aug 07 2018 *)
A329718
The number of open tours by a biased rook on a specific f(n) X 1 board, where f(n) = A070941(n) and cells are colored white or black according to the binary representation of 2n.
Original entry on oeis.org
1, 2, 4, 4, 8, 6, 14, 8, 16, 10, 24, 10, 46, 24, 46, 16, 32, 18, 44, 14, 84, 34, 68, 18, 146, 68, 138, 44, 230, 84, 146, 32, 64, 34, 84, 22, 160, 54, 112, 22, 276, 106, 224, 54, 376, 106, 192, 34, 454, 192, 406, 112, 690, 224, 406, 84, 1066, 376, 690, 160
Offset: 0
a(1) = 2 because the binary expansion of 2 is 10 and there are 2 open biased rook's tours, namely 12 and 21.
a(2) = 4 because the binary expansion of 4 is 100 and there are 4 open biased rook's tours, namely 132, 213, 231 and 321.
a(3) = 4 because the binary expansion of 6 is 110 and there are 4 open biased rook's tours, namely 123, 132, 231 and 312.
A347204
a(n) = a(f(n)/2) + a(floor((n+f(n))/2)) for n > 0 with a(0) = 1 where f(n) = A129760(n).
Original entry on oeis.org
1, 2, 3, 5, 4, 7, 10, 15, 5, 9, 13, 20, 17, 27, 37, 52, 6, 11, 16, 25, 21, 34, 47, 67, 26, 43, 60, 87, 77, 114, 151, 203, 7, 13, 19, 30, 25, 41, 57, 82, 31, 52, 73, 107, 94, 141, 188, 255, 37, 63, 89, 132, 115, 175, 235, 322, 141, 218, 295, 409, 372, 523, 674
Offset: 0
Cf.
A000110,
A000120,
A002720,
A005493,
A005494,
A007814,
A008277,
A035009,
A045379,
A053645,
A129760,
A143494,
A143495,
A196834,
A265649,
A295989.
-
function a = A347204(max_n)
a(1) = 1;
a(2) = 2;
for nloop = 3:max_n
n = nloop-1;
s = 0;
for k = 0:floor(log2(n))-1
s = s + a(1+A053645(n)-2^k*(mod(floor(n/(2^k)),2)));
end
a(nloop) = 2*a(A053645(n)+1) + s;
end
end
function a_n = A053645(n)
a_n = n - 2^floor(log2(n));
end % Thomas Scheuerle, Oct 25 2021
-
f[n_] := BitAnd[n, n - 1]; a[0] = 1; a[n_] := a[n] = a[f[n]/2] + a[Floor[(n + f[n])/2]]; Array[a, 100, 0] (* Amiram Eldar, Nov 19 2021 *)
-
f(n) = bitand(n, n-1); \\ A129760
a(n) = if (n<=1, n+1, if (n%2, a(n\2)+a(n-1), a(f(n/2)) + a(n/2+f(n/2)))); \\ Michel Marcus, Oct 25 2021
-
\\ Also see links.
-
A129760(n) = bitand(n, n-1);
memoA347204 = Map();
A347204(n) = if (n<=1, n+1, my(v); if(mapisdefined(memoA347204,n,&v), v, v = if(n%2, A347204(n\2)+A347204(n-1), A347204(A129760(n/2)) + A347204(n/2+A129760(n/2))); mapput(memoA347204,n,v); (v))); \\ (Memoized version of Michel Marcus's program given above) - Antti Karttunen, Nov 20 2021
A360288
Number T(n,k) of permutations of [n] whose excedance set is the k-th finite subset of positive integers in standard order; triangle T(n,k), n>=0, 0<=k<=ceiling(2^(n-1))-1, read by rows.
Original entry on oeis.org
1, 1, 1, 1, 1, 3, 1, 1, 1, 7, 3, 7, 1, 3, 1, 1, 1, 15, 7, 31, 3, 17, 7, 15, 1, 7, 3, 7, 1, 3, 1, 1, 1, 31, 15, 115, 7, 69, 31, 115, 3, 37, 17, 69, 7, 37, 15, 31, 1, 15, 7, 31, 3, 17, 7, 15, 1, 7, 3, 7, 1, 3, 1, 1, 1, 63, 31, 391, 15, 245, 115, 675, 7, 145, 69
Offset: 0
T(5,4) = 3: there are 3 permutations of [5] with excedance set {3} (the 4th subset in standard order): 12435, 12534, 12543.
Triangle T(n,k) begins:
1;
1;
1, 1;
1, 3, 1, 1;
1, 7, 3, 7, 1, 3, 1, 1;
1, 15, 7, 31, 3, 17, 7, 15, 1, 7, 3, 7, 1, 3, 1, 1;
...
-
b:= proc(s, t) option remember; (m->
`if`(m=0, x^(t/2), add(b(s minus {i}, t+
`if`(i (p-> seq(coeff(p, x, i), i=0..degree(p)))(b({$1..n}, 0)):
seq(T(n), n=0..7);
-
b[s_, t_] := b[s, t] = Function [m, If[m == 0, x^(t/2), Sum[b[s ~Complement~ {i}, t + If[i < m, 2^i, 0]], {i, s}]]][Length[s]];
T[n_] := CoefficientList[b[Range[n], 0], x];
Table[T[n], {n, 0, 7}] // Flatten (* Jean-François Alcover, Feb 13 2023, after Alois P. Heinz *)
A344902
Number of open tours by a biased rook on a specific f(n) X 1 board, where f(n) = A070941(n) and cells are colored white or black according to the binary representation of 2n.
Original entry on oeis.org
1, 2, 4, 6, 8, 18, 18, 24, 16, 54, 54, 96, 54, 96, 96, 120, 32, 162, 162, 384, 162, 384, 384, 600, 162, 384, 384, 600, 384, 600, 600, 720, 64, 486, 486, 1536, 486, 1536, 1536, 3000, 486, 1536, 1536, 3000, 1536, 3000, 3000, 4320, 486, 1536, 1536, 3000, 1536
Offset: 0
-
a[n_] := With[{s = DigitCount[n, 2]}, s[[1]]! * (1 + s[[1]])^(1 + s[[2]])]; a[0] = 1; Array[a, 50, 0] (* Amiram Eldar, Aug 03 2023 *)
A357990
Square array T(n, k), n >= 0, k > 0, read by antidiagonals, where T(0, k) = 1 for k > 0 and where T(n, k) = R(n, k+1) - R(n, k) for n > 0, k > 0. Here R(n, k) = T(A053645(n), k)*k^(A290255(n) + 1).
Original entry on oeis.org
1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 7, 1, 7, 1, 1, 3, 19, 1, 9, 1, 1, 7, 5, 37, 1, 11, 1, 1, 1, 11, 7, 61, 1, 13, 1, 1, 15, 1, 15, 9, 91, 1, 15, 1, 1, 7, 65, 1, 19, 11, 127, 1, 17, 1, 1, 17, 19, 175, 1, 23, 13, 169, 1, 19, 1, 1, 3, 43, 37, 369, 1, 27, 15, 217, 1, 21
Offset: 0
Square array begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
3, 5, 7, 9, 11, 13, 15, 17, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
7, 19, 37, 61, 91, 127, 169, 217, ...
3, 5, 7, 9, 11, 13, 15, 17, ...
7, 11, 15, 19, 23, 27, 31, 35, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
15, 65, 175, 369, 671, 1105, 1695, 2465, ...
-
R(n,k)=my(L=logint(n, 2), A=n - 2^L); T(A, k)*k^(L - if(A>0, logint(A, 2) + 1) + 1)
T(n,k)=if(n==0, 1, R(n, k+1) - R(n, k))
-
T(n, k) = my(A = 2*n+1, B, C, v1, v2); v1 = []; while(A > 0, B=valuation(A, 2); v1=concat(v1, B+1); A \= 2^(B+1)); v1 = Vecrev(v1); A = #v1; v2 = vector(A, i, 1); for(i=1, A-1, B = A-i; for(j=1, B, C = B-j+k+1; v2[j] = v2[j]*C^v1[B] - v2[j+1]*(C-1)^v1[B])); v2[1] \\ Mikhail Kurkov, Apr 30 2024
Comments