A011782
Coefficients of expansion of (1-x)/(1-2*x) in powers of x.
Original entry on oeis.org
1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0
Lee D. Killough (killough(AT)wagner.convex.com)
G.f. = 1 + x + 2*x^2 + 4*x^3 + 8*x^4 + 16*x^5 + 32*x^6 + 64*x^7 + 128*x^8 + ...
( -1 1 -1)
det ( 1 1 1) = 4
( -1 -1 -1)
- Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
- S. Kitaev, Patterns in Permutations and Words, Springer-Verlag, 2011. see p. 399 Table A.7
- Xavier Merlin, Methodix Algèbre, Ellipses, 1995, p. 153.
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Michael A. Allen, On a Two-Parameter Family of Generalizations of Pascal's Triangle, arXiv:2209.01377 [math.CO], 2022.
- Christopher Bao, Yunseo Choi, Katelyn Gan, and Owen Zhang, On a Conjecture by Baril, Cerbai, Khalil, and Vajnovszki on Two Restricted Stacks, arXiv:2308.09344 [math.CO], 2023.
- Jean-Luc Baril, Sergey Kirgizov and Armen Petrossian, Enumeration of Łukasiewicz paths modulo some patterns, arXiv:1804.01293 [math.CO], 2018.
- Jean-Luc Baril, Sergey Kirgizov, and Vincent Vajnovszki, Descent distribution on Catalan words avoiding a pattern of length at most three, arXiv:1803.06706 [math.CO], 2018.
- Jean-Luc Baril and José Luis Ramírez, Descent distribution on Catalan words avoiding ordered pairs of Relations, arXiv:2302.12741 [math.CO], 2023.
- Paul Barry, A Catalan Transform and Related Transformations on Integer Sequences, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.5.
- Christian Bean, Bjarki Gudmundsson, and Henning Ulfarsson, Automatic discovery of structural rules of permutation classes, arXiv:1705.04109 [math.CO], 2017.
- Daniel Birmajer, Juan B. Gil, Jordan O. Tirrell, and Michael D. Weiner, Pattern-avoiding stabilized-interval-free permutations, arXiv:2306.03155 [math.CO], 2023.
- Joshua P. Bowman, Compositions with an Odd Number of Parts, and Other Congruences, J. Int. Seq (2024) Vol. 27, Art. 24.3.6. See p. 14.
- Giulio Cerbai, Anders Claesson, and Luca Ferrari, Stack sorting with restricted stacks, arXiv:1907.08142 [cs.DS], 2019.
- Johann Cigler, Some remarks and conjectures related to lattice paths in strips along the x-axis, arXiv:1501.04750 [math.CO], 2015.
- Johann Cigler, Recurrences for certain sequences of binomial sums in terms of (generalized) Fibonacci and Lucas polynomials, arXiv:2212.02118 [math.NT], 2022.
- Bishal Deb, Cyclic sieving phenomena via combinatorics of continued fractions, arXiv:2508.13709 [math.CO], 2025. See p. 42.
- Colin Defant and Kai Zheng, Stack-sorting with consecutive-pattern-avoiding stacks, arXiv:2008.12297 [math.CO], 2020.
- John B. Dobson, A matrix variation on Ramus's identity for lacunary sums of binomial coefficients, arXiv preprint arXiv:1610.09361 [math.NT], 2016.
- Mareike Fischer, Extremal Values of the Sackin Tree Balance Index, Ann. Comb. (2021) Vol. 25, 515-541, Remark 10.
- Juan B. Gil and Jessica A. Tomasko, Fibonacci colored compositions and applications, arXiv:2108.06462 [math.CO], 2021.
- Hannah Golab, Pattern avoidance in Cayley permutations, Master's Thesis, Northern Arizona Univ. (2024). See p. 25.
- Ricardo Gómez Aíza, Trees with flowers: A catalog of integer partition and integer composition trees with their asymptotic analysis, arXiv:2402.16111 [math.CO], 2024. See p. 23.
- Mats Granvik, Alternating powers of 2 as convoluted divisor recurrence
- Nickolas Hein and Jia Huang, Variations of the Catalan numbers from some nonassociative binary operations, arXiv:1807.04623 [math.CO], 2018.
- Nickolas Hein and Jia Huang, Modular Catalan Numbers, arXiv:1508.01688 [math.CO], 2015-2016. See Table 1.1 p. 2.
- S. Heubach and T. Mansour, Counting rises, levels and drops in compositions, arXiv:math/0310197 [math.CO], 2003.
- S. Hougardy, Classes of perfect graphs, Discr. Math. 306 (2006), 2529-2571.
- Sergey Kitaev, Jeffrey Remmel and Mark Tiefenbruck, Marked mesh patterns in 132-avoiding permutations I, arXiv:1201.6243v1 [math.CO], 2012 (Corollary 3, case k=2, pages 10-11). - From _N. J. A. Sloane_, May 09 2012
- Sergey Kitaev, Jeffrey Remmel, and Mark Tiefenbruck, Quadrant Marked Mesh Patterns in 132-Avoiding Permutations II, Electronic Journal of Combinatorial Number Theory, Volume 15 #A16. Also on arXiv, arXiv:1302.2274 [math.CO], 2013.
- Olivia Nabawanda and Fanja Rakotondrajao, The sets of flattened partitions with forbidden patterns, arXiv:2011.07304 [math.CO], 2020.
- R. A. Proctor, Let's Expand Rota's Twelvefold Way for Counting Partitions!, arXiv:math/0606404 [math.CO], 2006-2007.
- L. Pudwell, Pattern avoidance in trees (slides from a talk, mentions many sequences), 2012. - From _N. J. A. Sloane_, Jan 03 2013
- Santiago Rojas-Rojas, Camila Muñoz, Edgar Barriga, Pablo Solano, Aldo Delgado, and Carla Hermann-Avigliano, Analytic Evolution for Complex Coupled Tight-Binding Models: Applications to Quantum Light Manipulation, arXiv:2310.12366 [quant-ph], 2023. See p. 12.
- R. Simion and F. W. Schmidt, Restricted permutations, European J. Combin., 6, 383-406, 1985, see pp. 392-393.
- Christoph Wernhard and Wolfgang Bibel, Learning from Łukasiewicz and Meredith: Investigations into Proof Structures (Extended Version), arXiv:2104.13645 [cs.AI], 2021.
- Yan X. Zhang, Four Variations on Graded Posets, arXiv preprint arXiv:1508.00318 [math.CO], 2015.
- Index entries for sequences related to Boolean functions
- Index to divisibility sequences
- Index entries for related partition-counting sequences
- Index entries for linear recurrences with constant coefficients, signature (2).
- Index entries for sequences related to Chebyshev polynomials.
-
a011782 n = a011782_list !! n
a011782_list = 1 : scanl1 (+) a011782_list
-- Reinhard Zumkeller, Jul 21 2013
-
[Floor((1+2^n)/2): n in [0..35]]; // Vincenzo Librandi, Aug 21 2011
-
A011782:= n-> ceil(2^(n-1)): seq(A011782(n), n=0..50); # Wesley Ivan Hurt, Feb 21 2015
with(PolynomialTools): A011782:=seq(coeftayl((1-x)/(1-2*x), x = 0, k),k=0..10^2); # Muniru A Asiru, Sep 26 2017
-
f[s_] := Append[s, Ceiling[Plus @@ s]]; Nest[f, {1}, 32] (* Robert G. Wilson v, Jul 07 2006 *)
CoefficientList[ Series[(1-x)/(1-2x), {x, 0, 32}], x] (* Robert G. Wilson v, Jul 07 2006 *)
Table[Sum[StirlingS2[n, k], {k,0,2}], {n, 0, 30}] (* Robert A. Russell, Apr 25 2018 *)
Join[{1},NestList[2#&,1,40]] (* Harvey P. Dale, Dec 06 2018 *)
-
{a(n) = if( n<1, n==0, 2^(n-1))};
-
Vec((1-x)/(1-2*x) + O(x^30)) \\ Altug Alkan, Oct 31 2015
-
def A011782(n): return 1 if n == 0 else 2**(n-1) # Chai Wah Wu, May 11 2022
-
[sum(stirling_number2(n,j) for j in (0..2)) for n in (0..35)] # G. C. Greubel, Jun 02 2020
A000051
a(n) = 2^n + 1.
Original entry on oeis.org
2, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649, 4294967297, 8589934593
Offset: 0
- Paul Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 75.
- Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 46, 60, 244.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 141.
- Ivan Panchenko, Table of n, a(n) for n = 0..100
- E. R. Berlekamp, A contribution to mathematical psychometrics, Unpublished Bell Labs Memorandum, Feb 08 1968 [Annotated scanned copy]
- Bakir Farhi, Summation of Certain Infinite Lucas-Related Series, J. Int. Seq., Vol. 22 (2019), Article 19.1.6.
- Massimiliano Fasi and Gian Maria Negri Porzio, Determinants of Normalized Bohemian Upper Hessemberg Matrices, University of Manchester (England, 2019).
- Bartomeu Fiol, Jairo Martínez-Montoya, and Alan Rios Fukelman, The planar limit of N=2 superconformal field theories, arXiv:2003.02879 [hep-th], 2020.
- Bernard Frénicle de Bessy, Solutio duorum problematum circa numeros cubos et quadratos, (1657). Bibliothèque Nationale de Paris.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 114
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 362
- Edouard Lucas, The Theory of Simply Periodic Numerical Functions, Fibonacci Association, 1969. English translation of article "Théorie des Fonctions Numériques Simplement Périodiques, I", Amer. J. Math., 1 (1878), 184-240.
- Kival Ngaokrajang, Illustration of Hilbert curve for n = 1..5
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
- D. C. Santos, E. A. Costa, and P. M. M. C. Catarino, On Gersenne Sequence: A Study of One Family in the Horadam-Type Sequence, Axioms 14, 203, (2025). See p. 1.
- Amelia Carolina Sparavigna, On the generalized sums of Mersenne, Fermat, Cullen and Woodall Numbers, Politecnico di Torino (Italy, 2019).
- Amelia Carolina Sparavigna, Composition Operations of Generalized Entropies Applied to the Study of Numbers, International Journal of Sciences (2019) Vol. 8, No. 4, 87-92.
- Amelia Carolina Sparavigna, The groupoids of Mersenne, Fermat, Cullen, Woodall and other Numbers and their representations by means of integer sequences, Politecnico di Torino, Italy (2019), [math.NT].
- Amelia Carolina Sparavigna, Some Groupoids and their Representations by Means of Integer Sequences, International Journal of Sciences (2019) Vol. 8, No. 10.
- Eric Weisstein's World of Mathematics, Crossed Prism Graph.
- Eric Weisstein's World of Mathematics, Cunningham Number.
- Eric Weisstein's World of Mathematics, Fermat-Lucas Number.
- Eric Weisstein's World of Mathematics, Hilbert curve.
- Eric Weisstein's World of Mathematics, Independent Vertex Set.
- Eric Weisstein's World of Mathematics, Irredundant Set.
- Eric Weisstein's World of Mathematics, Matching Number.
- Eric Weisstein's World of Mathematics, Maximum Independent Edge Set.
- Eric Weisstein's World of Mathematics, Rudin-Shapiro Sequence.
- Eric Weisstein's World of Mathematics, Star Graph.
- Eric Weisstein's World of Mathematics, Vertex Cover.
- Index entries for linear recurrences with constant coefficients, signature (3,-2).
Apart from the initial 1, identical to
A094373.
See
A008776 for definitions of Pisot sequences.
Cf.
A007583 (a((n-1)/2)/3 for odd n).
-
a000051 = (+ 1) . a000079
a000051_list = iterate ((subtract 1) . (* 2)) 2
-- Reinhard Zumkeller, May 03 2012
-
[2^n+1: n in [0..40]]; // G. C. Greubel, Jan 18 2025
-
A000051:=-(-2+3*z)/(2*z-1)/(z-1); # Simon Plouffe in his 1992 dissertation
a := n -> add(binomial(n,k)*bernoulli(n-k,1)*2^(k+1)/(k+1),k=0..n); # Peter Luschny, Apr 20 2009
-
Table[2^n + 1, {n,0,40}]
2^Range[0,40] + 1 (* Eric W. Weisstein, Jul 17 2017 *)
LinearRecurrence[{3, -2}, {2, 3}, 40] (* Eric W. Weisstein, Sep 21 2017 *)
-
a(n)=2^n+1
-
first(n) = Vec((2 - 3*x)/((1 - x)*(1 - 2*x)) + O(x^n)) \\ Iain Fox, Dec 31 2017
-
def A000051(n): return (1<Chai Wah Wu, Dec 21 2022
A006127
a(n) = 2^n + n.
Original entry on oeis.org
1, 3, 6, 11, 20, 37, 70, 135, 264, 521, 1034, 2059, 4108, 8205, 16398, 32783, 65552, 131089, 262162, 524307, 1048596, 2097173, 4194326, 8388631, 16777240, 33554457, 67108890, 134217755, 268435484, 536870941, 1073741854, 2147483679, 4294967328, 8589934625
Offset: 0
From _Viktar Karatchenia_, Feb 29 2016: (Start)
a(0) = 1. There are n=0 leaves, it is a trivial tree consisting of a single parent node P.
a(1) = 3. There is n=1 leaf, the tree is P-A, the subtrees are: 2 singles: P, A; 1 pair: P-A; 2+1 = 3 subtrees in total.
a(2) = 6. When n=2, the tree is P-A P-B, the subtrees are: 3 singles: P, A, B; 2 pairs: P-A, P-B; 1 triple: A-P-B (the whole tree); 3+2+1 = 6.
a(3) = 11. For n=3 leaf nodes, the tree is P-A P-B P-C, the subtrees are: 4 singles: P, A, B, C; 3 pairs: P-A, P-B, P-C; 3 triples: A-P-B, A-P-C, B-P-C; 1 quad: P-A P-B P-C (the whole tree); 4+3+3+1 = 11 in total.
a(4) = 20. For n=4 leaves, the tree is P-A P-B P-C P-D, the subtrees are: 5 singles: P, A, B, C, D; 4 pairs: P-A, P-B, P-C, P-D; 6 triples: A-P-B, A-P-C, B-P-C, A-P-D, B-P-D, C-P-D; 4 quads: P-A P-B P-C, P-A P-B P-D, P-A P-C P-D, P-B P-C P-D; the whole tree counts as 1; 5+4+6+4+1 = 20.
In general, for n leaves, connected to the parent node P, there will be: (n+1) singles; (n, 1) pairs; (n, 2) triples; (n, 3) quads; ... ; (n, n-1) subtrees having (n-1) edges; 1 whole tree, having all n edges. Thus, the total number of all distinct subtrees is: (n+1) + (n, 1) + (n, 2) + (n, 3) + ... + (n, n-1) + 1 = (n + (n, 0)) + (n, 1) + (n, 2) + (n, 3) + ... + (n, n-1) + (n, n) = n + (sum of all binomial coefficients of size n) = n + (2^n). (End)
- John H. Conway, R. K. Guy, The Book of Numbers, Copernicus Press, p. 84.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Reinhard Zumkeller, Table of n, a(n) for n = 0..100
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 435
- C. L. Mallows & N. J. A. Sloane, Emails, May 1991
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
- Eric Weisstein's World of Mathematics, Sierpiński Number of the First Kind
- Eric Weisstein's World of Mathematics, Star Graph
- Eric Weisstein's World of Mathematics, Vertex-Induced Subgraph
- Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
-
a006127 n = a000079 n + n
a006127_list = s [1] where
s xs = last xs : (s $ zipWith (+) [1..] (xs ++ reverse xs))
Reinhard Zumkeller, May 19 2015, Feb 05 2011
-
A006127:=(-1+z+z**2)/(2*z-1)/(z-1)**2; # conjectured by Simon Plouffe in his 1992 dissertation
-
Table[2^n + n, {n, 0, 50}] (* Vladimir Joseph Stephan Orlovsky, May 19 2011 *)
Table[BitXOr(i, 2^i), {i, 1, 100}] (* Peter Luschny, Jun 01 2011 *)
LinearRecurrence[{4,-5,2},{1,3,6},40] (* Harvey P. Dale, Feb 08 2023 *)
-
a(n)=1<Charles R Greathouse IV, Jul 19 2011
-
print([2**n + n for n in range(34)]) # Karl V. Keller, Jr., Aug 18 2020
-
def A006127(n): return (1<Chai Wah Wu, Jan 11 2023
A048645
Integers with one or two 1-bits in their binary expansion.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 16, 17, 18, 20, 24, 32, 33, 34, 36, 40, 48, 64, 65, 66, 68, 72, 80, 96, 128, 129, 130, 132, 136, 144, 160, 192, 256, 257, 258, 260, 264, 272, 288, 320, 384, 512, 513, 514, 516, 520, 528, 544, 576, 640, 768, 1024, 1025, 1026, 1028, 1032
Offset: 1
From _Omar E. Pol_, Feb 18 2015: (Start)
Also, written as a triangle T(j,k), k >= 1, in which row lengths are the terms of A028310:
1;
2;
3, 4;
5, 6, 8;
9, 10, 12, 16;
17, 18, 20, 24, 32;
33, 34, 36, 40, 48, 64;
65, 66, 68, 72, 80, 96, 128;
...
It appears that column 1 is A094373.
It appears that the right border gives A000079.
It appears that the first differences in every row that contains at least two terms give the first h-1 powers of 2, where h is the length of the row.
(End)
- Reinhard Zumkeller, Rows n = 1..100 of triangle, flattened
- Wawrzyniec Bieniawski, Piotr Masierak, Andrzej Tomski, and Szymon Łukaszyk, Assembly Theory - Formalizing Assembly Spaces and Discovering Patterns and Bounds, Preprints.org (2025).
- Michael P. Connolly, Probabilistic rounding error analysis for numerical linear algebra, Ph. D. Thesis, Univ. Manchester (UK, 2022). See p. 55.
- USA Mathematical Olympiad, Problem 4, 2008.
- Eric Weisstein's World of Mathematics, Automatic Set.
- Eric Weisstein's World of Mathematics, Binomial Coefficient.
- Index entries for sequences related to cellular automata.
- Index to sequences related to Olympiads and other Mathematical competitions.
Cf.
A018900,
A048623,
A046097,
A169707,
A147562,
A162795,
A003056,
A002262,
A094373,
A028310,
A179951.
-
import Data.List (insert)
a048645 n k = a048645_tabl !! (n-1) !! (k-1)
a048645_row n = a048645_tabl !! (n-1)
a048645_tabl = iterate (\xs -> insert (2 * head xs + 1) $ map ((* 2)) xs) [1]
a048645_list = concat a048645_tabl
-- Reinhard Zumkeller, Dec 19 2012
-
lincom:=proc(a,b,n) local i,j,s,m; s:={}; for i from 0 to n do for j from 0 to n do m:=a^i+b^j; if m<=n then s:={op(s),m} fi od; od; lprint(sort([op(s)])); end: lincom(2,2,1000); # Zerinvary Lajos, Feb 24 2007
-
Select[Range[2000], 1 <= DigitCount[#, 2, 1] <= 2&] (* Jean-François Alcover, Mar 06 2016 *)
-
isok(n) = my(hw = hammingweight(n)); (hw == 1) || (hw == 2); \\ Michel Marcus, Mar 06 2016
-
a(n) = if(n <= 2, return(n), n-=2); my(c = (sqrtint(8*n + 1) - 1) \ 2); 1 << c + 1 << (n - binomial(c + 1, 2)) \\ David A. Corneth, Jan 02 2019
-
nxt(n) = msb = 1 << logint(n, 2); if(n == msb, n + 1, t = n - msb; n + t) \\ David A. Corneth, Jan 02 2019
-
def ok(n): return 1 <= bin(n)[2:].count('1') <= 2
print([k for k in range(1033) if ok(k)]) # Michael S. Branicky, Jan 22 2022
-
from itertools import count, islice
def agen(): # generator of terms
for d in count(0):
msb = 2**d
yield msb
for lsb in range(d):
yield msb + 2**lsb
print(list(islice(agen(), 60))) # Michael S. Branicky, Jan 22 2022
-
from math import isqrt, comb
def A048645(n): return (1<<(m:=isqrt(n-1<<3)+1>>1)-1)+(1<<(n-2-comb(m,2))) if n>1 else 1 # Chai Wah Wu, Oct 30 2024
A175654
Eight bishops and one elephant on a 3 X 3 chessboard. G.f.: (1 - x - x^2)/(1 - 3*x - x^2 + 6*x^3).
Original entry on oeis.org
1, 2, 6, 14, 36, 86, 210, 500, 1194, 2822, 6660, 15638, 36642, 85604, 199626, 464630, 1079892, 2506550, 5811762, 13462484, 31159914, 72071654, 166599972, 384912086, 888906306, 2052031172, 4735527306, 10925175254, 25198866036, 58108609526, 133973643090
Offset: 0
- Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984.
- David Hooper and Kenneth Whyld, The Oxford Companion to Chess, pp. 74, 366, 1992.
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Viswanathan Anand, The Indian Defense, Time, Jun 19 2008.
- Vladimir Kruchinin, Composition of ordinary generating functions, arXiv:1009.2565 [math.CO], 2010.
- Johannes W. Meijer, The elephant sequences.
- Wikipedia, War Elephant.
- Index entries for linear recurrences with constant coefficients, signature (3,1,-6).
Cf. Elephant sequences corner squares [decimal value A[5]]:
A040000 [0],
A000027 [16],
A000045 [1],
A094373 [2],
A000079 [3],
A083329 [42],
A027934 [11],
A172481 [7],
A006138 [69],
A000325 [26],
A045623 [19],
A000129 [21],
A095121 [170],
A074878 [43],
A059570 [15],
A175654 [71, this sequence],
A026597 [325],
A097813 [58],
A057711 [27], 2*
A094723 [23; n>=-1],
A002605 [85],
A175660 [171],
A123203 [186],
A066373 [59],
A015518 [341],
A134401 [187],
A093833 [343].
-
[n le 3 select Factorial(n) else 3*Self(n-1) +Self(n-2) -6*Self(n-3): n in [1..41]]; // G. C. Greubel, Dec 08 2021
-
nmax:=28; m:=1; A[1]:=[0,0,0,0,1,0,0,0,1]: A[2]:=[0,0,0,1,0,1,0,0,0]: A[3]:=[0,0,0,0,1,0,1,0,0]: A[4]:=[0,1,0,0,0,0,0,1,0]: A[5]:=[0,0,1,0,0,0,1,1,1]: A[6]:=[0,1,0,0,0,0,0,1,0]: A[7]:=[0,0,1,0,1,0,0,0,0]: A[8]:=[0,0,0,1,0,1,0,0,0]: A[9]:=[1,0,0,0,1,0,0,0,0]: A:=Matrix([A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[8], A[9]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
-
LinearRecurrence[{3,1,-6}, {1,2,6}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 21 2012 *)
-
a(n)=([0,1,0; 0,0,1; -6,1,3]^n*[1;2;6])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
-
[( (1-x-x^2)/((1-2*x)*(1-x-3*x^2)) ).series(x,n+1).list()[n] for n in (0..40)] # G. C. Greubel, Dec 08 2021
A238016
Number A(n,k) of partitions of n^k into parts that are at most n; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 5, 12, 5, 1, 1, 1, 9, 75, 64, 7, 1, 1, 1, 17, 588, 2280, 377, 11, 1, 1, 1, 33, 5043, 123464, 106852, 2432, 15, 1, 1, 1, 65, 44652, 7566280, 55567352, 6889527, 16475, 22, 1
Offset: 0
A(3,1) = 3: 3, 21, 111.
A(3,2) = 12: 333, 3222, 3321, 22221, 32211, 33111, 222111, 321111, 2211111, 3111111, 21111111, 111111111.
A(2,3) = 5: 2222, 22211, 221111, 2111111, 11111111.
A(2,4) = 9: 22222222, 222222211, 2222221111, 22222111111, 222211111111, 2221111111111, 22111111111111, 211111111111111, 1111111111111111.
Square array A(n,k) begins:
0, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, ...
1, 2, 3, 5, 9, 17, ...
1, 3, 12, 75, 588, 5043, ...
1, 5, 64, 2280, 123464, 7566280, ...
1, 7, 377, 106852, 55567352, 33432635477, ...
Columns k=0-10 give:
A057427,
A000041,
A206226,
A238608,
A238609,
A238610,
A238611,
A238612,
A238613,
A238614,
A238615.
Rows n=0-10 give:
A057427,
A000012,
A094373,
A238630,
A238631,
A238632,
A238633,
A238634,
A238635,
A238636,
A238637.
-
A[n_, k_] := SeriesCoefficient[Product[1/(1-x^j), {j, 1, n}], {x, 0, n^k}]; A[0, 0] = 0; Table[A[n-k, k], {n, 0, 10}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Oct 11 2015 *)
A279553
Number of length n inversion sequences avoiding the patterns 110, 210, 120, 201, and 010.
Original entry on oeis.org
1, 1, 2, 5, 15, 50, 178, 663, 2552, 10071, 40528, 165682, 686151, 2872576, 12137278, 51690255, 221657999, 956265050, 4147533262, 18074429421, 79102157060, 347519074010, 1532070899412, 6775687911920, 30052744139440, 133649573395725, 595816470717728
Offset: 0
The length 3 inversion sequences avoiding (110, 210, 120, 201, 010) are 000, 001, 002, 011, 012.
The length 4 inversion sequences avoiding (110, 210, 120, 201, 010) are 0000, 0001, 0002, 0003, 0011, 0012, 0013, 0021, 0022, 0023, 0111, 0112, 0113, 0122, 0123.
Cf.
A263777,
A263778,
A263779,
A263780,
A279551,
A279552,
A279554,
A279555,
A279556,
A279557,
A279558,
A279559,
A279560,
A279561,
A279562,
A279563,
A279564,
A279565,
A279566,
A279567,
A279568,
A279569,
A279570,
A279571,
A279572,
A279573.
-
a:= proc(n) option remember; `if`(n<4, [1, 1, 2, 5][n+1],
((12*(n-1))*(182*n^3-1659*n^2+4628*n-3756)*a(n-1)
-(4*(91*n^4-1057*n^3+3812*n^2-4046*n-906))*a(n-2)
+(6*(n-4))*(182*n^3-1659*n^2+4901*n-4630)*a(n-3)
-(4*(n-4))*(n-5)*(91*n^2-511*n+690)*a(n-4))
/(5*n*(n-1)*(91*n^2-693*n+1292)))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Feb 22 2017
-
a[n_] := a[n] = If[n < 4, {1, 1, 2, 5}[[n + 1]], ((12*(n - 1))*(182*n^3 - 1659*n^2 + 4628*n - 3756)*a[n - 1] - (4*(91*n^4 - 1057*n^3 + 3812*n^2 - 4046*n - 906))*a[n - 2] + (6*(n - 4))*(182*n^3 - 1659*n^2 + 4901*n - 4630)*a[n - 3] - (4*(n - 4))*(n - 5)*(91*n^2 - 511*n + 690)*a[n - 4]) / (5*n*(n - 1)*(91*n^2 - 693*n + 1292))]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 06 2017, after Alois P. Heinz *)
-
seq(N) = my(x='x+O('x^N)); Vec(1+serreverse((-x^3+x^2+x)/(2*x^2+3*x+1)));
seq(27) \\ Gheorghe Coserea, Jul 11 2018
A144048
Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is Euler transform of (j->j^k).
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 6, 5, 1, 1, 9, 14, 13, 7, 1, 1, 17, 36, 40, 24, 11, 1, 1, 33, 98, 136, 101, 48, 15, 1, 1, 65, 276, 490, 477, 266, 86, 22, 1, 1, 129, 794, 1828, 2411, 1703, 649, 160, 30, 1, 1, 257, 2316, 6970, 12729, 11940, 5746, 1593, 282, 42, 1, 1, 513
Offset: 0
Square array begins:
1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, ...
2, 3, 5, 9, 17, 33, ...
3, 6, 14, 36, 98, 276, ...
5, 13, 40, 136, 490, 1828, ...
7, 24, 101, 477, 2411, 12729, ...
-
with(numtheory): etr:= proc(p) local b; b:= proc(n) option remember; `if`(n=0,1, add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n) end end: A:= (n,k)-> etr(j->j^k)(n); seq(seq(A(n,d-n), n=0..d), d=0..13);
-
etr[p_] := Module[{ b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b]; A[n_, k_] := etr[Function[j, j^k]][n]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 13}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
A275043
Number A(n,k) of set partitions of [k*n] such that within each block the numbers of elements from all residue classes modulo k are equal for k>0, A(n,0)=1; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 5, 1, 1, 1, 5, 16, 15, 1, 1, 1, 9, 64, 131, 52, 1, 1, 1, 17, 298, 1613, 1496, 203, 1, 1, 1, 33, 1540, 25097, 69026, 22482, 877, 1, 1, 1, 65, 8506, 461105, 4383626, 4566992, 426833, 4140, 1, 1, 1, 129, 48844, 9483041, 350813126, 1394519922, 437665649, 9934563, 21147, 1
Offset: 0
A(2,2) = 3: 1234, 12|34, 14|23.
A(2,3) = 5: 123456, 123|456, 126|345, 135|246, 156|234.
A(2,4) = 9: 12345678, 1234|5678, 1238|4567, 1247|3568, 1278|3456, 1346|2578, 1368|2457, 1467|2358, 1678|2345.
A(3,2) = 16: 123456, 1234|56, 1236|45, 1245|36, 1256|34, 12|3456, 12|34|56, 12|36|45, 1346|25, 1456|23, 14|2356, 14|23|56, 16|2345, 16|23|45, 14|25|36, 16|25|34.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, ...
1, 2, 3, 5, 9, 17, 33, ...
1, 5, 16, 64, 298, 1540, 8506, ...
1, 15, 131, 1613, 25097, 461105, 9483041, ...
1, 52, 1496, 69026, 4383626, 350813126, 33056715626, ...
1, 203, 22482, 4566992, 1394519922, 573843627152, 293327384637282, ...
Columns k=0-10 give:
A000012,
A000110,
A023998,
A061684,
A061685,
A061686,
A061687,
A061688,
A275097,
A275098,
A275099.
-
A:= proc(n, k) option remember; `if`(k*n=0, 1, add(
binomial(n, j)^k*(n-j)*A(j, k), j=0..n-1)/n)
end:
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
A[n_, k_] := A[n, k] = If[k*n == 0, 1, Sum[Binomial[n, j]^k*(n-j)*A[j, k], {j, 0, n-1}]/n]; Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jan 17 2017, translated from Maple *)
A152977
Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) is the number of partitions of 2^n into powers of 2 less than or equal to 2^k.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 5, 1, 1, 2, 4, 9, 9, 1, 1, 2, 4, 10, 25, 17, 1, 1, 2, 4, 10, 35, 81, 33, 1, 1, 2, 4, 10, 36, 165, 289, 65, 1, 1, 2, 4, 10, 36, 201, 969, 1089, 129, 1, 1, 2, 4, 10, 36, 202, 1625, 6545, 4225, 257, 1, 1, 2, 4, 10, 36, 202, 1827, 17361, 47905, 16641, 513, 1
Offset: 0
A(3,2) = 9, because there are 9 partitions of 2^3=8 into powers of 2 less than or equal to 2^2=4: [4,4], [4,2,2], [4,2,1,1], [4,1,1,1,1], [2,2,2,2], [2,2,2,1,1], [2,2,1,1,1,1], [2,1,1,1,1,1,1], [1,1,1,1,1,1,1,1].
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, ...
1, 2, 2, 2, 2, 2, ...
1, 3, 4, 4, 4, 4, ...
1, 5, 9, 10, 10, 10, ...
1, 9, 25, 35, 36, 36, ...
1, 17, 81, 165, 201, 202, ...
Columns k=0-10 give:
A000012,
A094373,
A028400(n-2) for n>1,
A210772,
A210773,
A210774,
A210775,
A210776,
A210777,
A210778,
A210779.
-
b:= proc(n,j) local nn, r;
if n<0 then 0
elif j=0 then 1
elif j=1 then n+1
elif n `if`(n=0, 1, b(2^(n-k), k)):
seq(seq(A(n, d-n), n=0..d), d=0..11);
-
b[n_, j_] := Module[{nn, r}, Which[n < 0, 0, j == 0, 1, j == 1, n+1, n < j, b[n, j] = b[n-1, j]+b[2*n, j-1], True, nn = 1+Floor[n]; r := n-nn; (nn-j)*Binomial[nn, j]*Sum[Binomial[j, h]/(nn-j+h)*b[j-h+r, j]*(-1)^h, {h, 0, j-1}]]]; a[n_, k_] := If[n == 0, 1, b[2^(n-k), k]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 11}] // Flatten (* Jean-François Alcover, Dec 18 2013, translated from Maple *)
Showing 1-10 of 35 results.
Comments