[go: up one dir, main page]

login
Search: a052548 -id:a052548
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = 2^n - 2.
(Formerly M1599 N0625)
+10
154
-1, 0, 2, 6, 14, 30, 62, 126, 254, 510, 1022, 2046, 4094, 8190, 16382, 32766, 65534, 131070, 262142, 524286, 1048574, 2097150, 4194302, 8388606, 16777214, 33554430, 67108862, 134217726, 268435454, 536870910, 1073741822, 2147483646, 4294967294, 8589934590, 17179869182, 34359738366, 68719476734, 137438953470
OFFSET
0,3
COMMENTS
For n > 1, a(n) is the expected number of tosses of a fair coin to get n-1 consecutive heads. - Pratik Poddar, Feb 04 2011
For n > 2, Sum_{k=1..a(n)} (-1)^binomial(n, k) = A064405(a(n)) + 1 = 0. - Benoit Cloitre, Oct 18 2002
For n > 0, the number of nonempty proper subsets of an n-element set. - Ross La Haye, Feb 07 2004
Numbers j such that abs( Sum_{k=0..j} (-1)^binomial(j, k)*binomial(j + k, j - k) ) = 1. - Benoit Cloitre, Jul 03 2004
For n > 2 this formula also counts edge-rooted forests in a cycle of length n. - Woong Kook (andrewk(AT)math.uri.edu), Sep 08 2004
For n >= 1, conjectured to be the number of integers from 0 to (10^n)-1 that lack 0, 1, 2, 3, 4, 5, 6 and 7 as a digit. - Alexandre Wajnberg, Apr 25 2005
Beginning with a(2) = 2, these are the partial sums of the subsequence of A000079 = 2^n beginning with A000079(1) = 2. Hence for n >= 2 a(n) is the smallest possible sum of exactly one prime, one semiprime, one triprime, ... and one product of exactly n-1 primes. A060389 (partial sums of the primorials, A002110, beginning with A002110(1)=2) is the analog when all the almost primes must also be squarefree. - Rick L. Shepherd, May 20 2005
From the second term on (n >= 1), the binary representation of these numbers is a 0 preceded by (n - 1) 1's. This pattern (0)111...1110 is the "opposite" of the binary 2^n+1: 1000...0001 (cf. A000051). - Alexandre Wajnberg, May 31 2005
The numbers 2^n - 2 (n >= 2) give the positions of 0's in A110146. Also numbers k such that k^(k + 1) = 0 mod (k + 2). - Zak Seidov, Feb 20 2006
Partial sums of A155559. - Zerinvary Lajos, Oct 03 2007
Number of surjections from an n-element set onto a two-element set, with n >= 2. - Mohamed Bouhamida, Dec 15 2007
It appears that these are the numbers n such that 3*A135013(n) = n*(n + 1), thus answering Problem 2 on the Mathematical Olympiad Foundation of Japan, Final Round Problems, Feb 11 1993 (see link Japanese Mathematical Olympiad).
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x is a proper subset of y or y is a proper subset of x and x and y are disjoint. Then a(n+1) = |R|. - Ross La Haye, Mar 19 2009
The permutohedron Pi_n has 2^n - 2 facets [Pashkovich]. - Jonathan Vos Post, Dec 17 2009
First differences of A005803. - Reinhard Zumkeller, Oct 12 2011
For n >= 1, a(n + 1) is the smallest even number with bit sum n. Cf. A069532. - Jason Kimberley, Nov 01 2011
a(n) is the number of branches of a complete binary tree of n levels. - Denis Lorrain, Dec 16 2011
For n>=1, a(n) is the number of length-n words on alphabet {1,2,3} such that the gap(w)=1. For a word w the gap g(w) is the number of parts missing between the minimal and maximal elements of w. Generally for words on alphabet {1,2,...,m} with g(w)=g>0 the e.g.f. is Sum_{k=g+2..m} (m - k + 1)*binomial((k - 2),g)*(exp(x) - 1)^(k - g). a(3)=6 because we have: 113, 131, 133, 311, 313, 331. Cf. A240506. See the Heubach/Mansour reference. - Geoffrey Critzer, Apr 13 2014
For n > 0, a(n) is the minimal number of internal nodes of a red-black tree of height 2*n-2. See the Oct 02 2015 comment under A027383. - Herbert Eberle, Oct 02 2015
Conjecture: For n>0, a(n) is the least m such that A007814(A000108(m)) = n-1. - L. Edson Jeffery, Nov 27 2015
Actually this follows from the procedure for determining the multiplicity of prime p in C(n) given in A000108 by Franklin T. Adams-Watters: For p=2, the multiplicity is the number of 1 digits minus 1 in the binary representation of n+1. Obviously, the smallest k achieving "number of 1 digits" = k is 2^k-1. Therefore C(2^k-2) is divisible by 2^(k-1) for k > 0 and there is no smaller m for which 2^(k-1) divides C(m) proving the conjecture. - Peter Schorn, Feb 16 2020
For n >= 0, a(n) is the largest number you can write in bijective base-2 (a.k.a. the dyadic system, A007931) with n digits. - Harald Korneliussen, May 18 2019
The terms of this sequence are also the sum of the terms in each row of Pascal's triangle other than the ones. - Harvey P. Dale, Apr 19 2020
For n > 1, binomial(a(n),k) is odd if and only if k is even. - Charlie Marion, Dec 22 2020
For n >= 2, a(n+1) is the number of n X n arrays of 0's and 1's with every 2 X 2 square having density exactly 2. - David desJardins, Oct 27 2022
For n >= 1, a(n+1) is the number of roots of unity in the unique degree-n unramified extension of the 2-adic field Q_2. Note that for each p, the unique degree-n unramified extension of Q_p is the splitting field of x^(p^n) - x, hence containing p^n - 1 roots of unity for p > 2 and 2*(2^n - 1) for p = 2. - Jianing Song, Nov 08 2022
REFERENCES
H. T. Davis, Tables of the Mathematical Functions. Vols. 1 and 2, 2nd ed., 1963, Vol. 3 (with V. J. Fisher), 1962; Principia Press of Trinity Univ., San Antonio, TX, Vol. 2, p. 212.
Ralph P. Grimaldi, Discrete and Combinatorial Mathematics: An Applied Introduction, Fifth Edition, Addison-Wesley, 2004, p. 134. [From Mohammad K. Azarian, October 27 2011]
S. Heubach and T. Mansour, Combinatorics of Compositions and Words, Chapman and Hall, 2009 page 86, Exercise 3.16.
J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 33.
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).
A. H. Voigt, Theorie der Zahlenreihen und der Reihengleichungen, Goschen, Leipzig, 1911, p. 31.
LINKS
Andrei Asinowski, Cyril Banderier, and Benjamin Hackl, Flip-sort and combinatorial aspects of pop-stack sorting, arXiv:2003.04912 [math.CO], 2020.
O. Bagdasar, On some functions involving the lcm and gcd of integer tuples, Scientific Publications of the State University of Novi Pazar, Appl. Maths. Inform. and Mech., Vol. 6, 2 (2014), 91--100.
S. Bilotta, E. Grazzini, and E. Pergola, Enumeration of Two Particular Sets of Minimal Permutations, J. Int. Seq. 18 (2015) 15.10.2
R. B. Campbell, The effect of inbreeding constraints and offspring distribution on time to the most recent common ancestor, Journal of Theoretical Biology, Volume 382, 7 October 2015, Pages 74-80.
Adam M. Goyt and Lara K. Pudwell, Avoiding colored partitions of two elements in the pattern sense, arXiv preprint arXiv:1203.3786 [math.CO], 2012. - From N. J. A. Sloane, Sep 17 2012
M. A. Hill, M. J. Hopkins and D. C. Ravenel, On the non-existence of elements of Kervaire invariant one [From N. J. A. Sloane, Sep 27 2010]
Milan Janjic and B. Petkovic, A Counting Function, arXiv 1301.4550 [math.CO], 2013.
Japanese Mathematical Olympiad 1993, Final Round - Problem 2, Feb 11 1993.
Ross La Haye, Binary Relations on the Power Set of an n-Element Set, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.6.
T. Manneville, V. Pilaud, Compatibility fans for graphical nested complexes, arXiv preprint arXiv:1501.07152 [math.CO], 2015.
Kanstantsin Pashkovich, Symmetry in Extended Formulations of the Permutahedron [sic], arXiv:0912.3446 [math.CO], 2009-2013. [Jonathan Vos Post, Dec 17 2009]
P. A. Piza, Kummer numbers, Mathematics Magazine, 21 (1947/1948), 257-260.
P. A. Piza, Kummer numbers, Mathematics Magazine, 21 (1947/1948), 257-260. [Annotated scanned copy]
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
Pratik Poddar, Consecutive Heads Puzzle, Oct 2009.
A. H. Voigt, Theorie der Zahlenreihen und der Reihengleichungen, Goschen, Leipzig, 1911. [Annotated scans of pages 30-33 only]
Eric Weisstein's World of Mathematics, Sphere Line Picking
FORMULA
a(n) = 2*A000225(n-1).
G.f.: 1/(1 - 2*x) - 2/(1 - x), e.g.f.: (e^x - 1)^2 - 1. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 07 2001
For n >= 1, a(n) = A008970(n + 1, 2). - Philippe Deléham, Feb 21 2004
G.f.: (3*x - 1)/((2*x - 1)*(x - 1)). - Simon Plouffe in his 1992 dissertation for the sequence without the leading -1
a(n) = 2*a(n - 1) + 2. - Alexandre Wajnberg, Apr 25 2005
a(n) = A000079(n) - 2. - Omar E. Pol, Dec 16 2008
a(n) = A058896(n)/A052548(n). - Reinhard Zumkeller, Feb 14 2009
a(n) = A164874(n - 1, n - 1) for n > 1. - Reinhard Zumkeller, Aug 29 2009
a(n) = A173787(n,1); a(n) = A028399(2*n)/A052548(n), n > 0. - Reinhard Zumkeller, Feb 28 2010
a(n + 1) = A027383(2*n - 1). - Jason Kimberley, Nov 02 2011
G.f.: U(0) - 1, where U(k) = 1 + x/(2^k + 2^k/(x - 1 - x^2*2^(k + 1)/(x*2^(k + 1) - (k + 1)/U(k + 1) ))); (continued fraction, 3rd kind, 4-step). - Sergei N. Gladkovskii, Dec 01 2012
a(n+1) is the sum of row n in triangle A051601. - Reinhard Zumkeller, Aug 05 2013
a(n+1) = A127330(n,0). - Reinhard Zumkeller, Nov 16 2013
a(n) = Sum_{k=1..n-1} binomial(n, k) for n > 0. - Dan McCandless, Nov 14 2015
From Miquel Cerda, Aug 16 2016: (Start)
a(n) = A000225(n) - 1.
a(n) = A125128(n-1) - A000325(n).
a(n) = A095151(n) - A125128(n) - 1. (End)
a(n+1) = 2*(n + Sum_{j=1..n-1} (n-j)*2^(j-1)), n >= 1. This is the number of the rationals k/2, k = 1..2*n for n >= 1 and (2*k+1)/2^j for j = 2..n, n >= 2, and 2*k+1 < n-(j-1). See the example for n = 3 below. Motivated by the proposal A287012 by Mark Rickert. - Wolfdieter Lang, Jun 14 2017
EXAMPLE
a(4) = 14 because the 14 = 6 + 4 + 4 rationals (in lowest terms) for n = 3 are (see the Jun 14 2017 formula above): 1/2, 1, 3/2, 2, 5/2, 3; 1/4, 3/4, 5/4, 7/4; 1/8, 3/8, 5/8, 7/8. - Wolfdieter Lang, Jun 14 2017
MAPLE
seq(2^n-2, n=0..20) ;
[-1, seq(Stirling2(n, 2)*2, n=1..28)]; # Zerinvary Lajos, Dec 06 2006
ZL := [S, {S=Prod(B, B), B=Set(Z, 1 <= card)}, labeled]: [-1, seq(combstruct[count](ZL, size=n), n=1..28)]; # Zerinvary Lajos, Mar 13 2007
MATHEMATICA
Table[2^n - 2, {n, 0, 29}] (* Alonso del Arte, Dec 01 2012 *)
PROG
(Sage) [gaussian_binomial(n, 1, 2)-1 for n in range(0, 29)] # Zerinvary Lajos, May 31 2009
(PARI) a(n)=2^n-2 \\ Charles R Greathouse IV, Jun 16 2011
(Magma) [2^n - 2: n in [0..40]]; // Vincenzo Librandi, Jun 23 2011
(Haskell)
a000918 = (subtract 2) . (2 ^)
a000918_list = iterate ((subtract 2) . (* 2) . (+ 2)) (- 1)
-- Reinhard Zumkeller, Apr 23 2013
CROSSREFS
Row sums of triangle A026998.
Cf. A058809 (3^n-3, n>0).
KEYWORD
sign,easy
EXTENSIONS
Maple programs fixed by Vaclav Kotesovec, Dec 13 2014
STATUS
approved
a(n) = 2^n - 4.
+10
31
0, 4, 12, 28, 60, 124, 252, 508, 1020, 2044, 4092, 8188, 16380, 32764, 65532, 131068, 262140, 524284, 1048572, 2097148, 4194300, 8388604, 16777212, 33554428, 67108860, 134217724, 268435452, 536870908, 1073741820, 2147483644, 4294967292, 8589934588, 17179869180
OFFSET
2,2
COMMENTS
Number of permutations of [n] with 2 sequences.
Number of 2 X n binary matrices that avoid simultaneously the right angled numbered polyomino patterns (ranpp) (00;1) and (11;0). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1<i2, j1<j2 and these elements are in same relative order as those in the triple (x,y,z). - Sergey Kitaev, Nov 11 2004
The number of edges in the dual Edwards-Venn diagram graph with n-1 digits when n>2.
a(n) (n>=6) is the number of vertices in the molecular graph NS2[n-5], defined pictorially in the Ashrafi et al. reference (Fig. 2, where NS2[2] is shown). - Emeric Deutsch, May 16 2018
From Petros Hadjicostas, Aug 08 2019: (Start)
With regard to the comment above about a(n) being the "number of permutations of [n] with 2 sequences", we refer to Ex. 13 (pp. 260-261) of Comtet (1974), who uses the definition of a "séquence" given by André in several of his papers in the 19th century.
In the terminology of array A059427, these so-called "séquences" in permutations (defined by Comtet and André) are called "alternating runs" (or just "runs"). We discuss these so-called "séquences" below.
If b = (b_1, b_2, ..., b_n) is a permutation of [n], written in one-line notation (not in cycle notation), a "séquence" in a permutation of length l >= 2 (according to Comtet) is a maximal interval of integers {i, i+1, ..., i+l-1} for some i (where 1 <= i <= n-l+1) such that b_i < b_{i+1} < ... < b_{i+l-1} or b_i > b_{i+1} > ... > b_{i+l-1}. (The word "maximal" means that, in the first case, we have b_{i-1} > b_i and b_{i+l} < b_{i+l-1}, while in the second case, we have b_{i-1} < b_i and b_{i+l} > b_{i+l-1} provided b_{i-1} and b_{i+l} can be defined.)
When defining a "séquence", André (1884) actually refers to the list of terms (b_i, b_{i+1}, ..., b_{i+l-1}) rather than the corresponding index set {i, i+1, ..., i+l-1} (which is essentially the same thing).
For more details about these so-called "séquences" (or "alternate runs"), see the comments and examples for sequence A000708.
(End)
For n >= 1, a(n+2) is the number of shortest paths from (0,0) of a square grid to {(x,y): |x|+|y| = n} along the grid line. - Jianing Song, Aug 23 2021
REFERENCES
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 261.
A. W. F. Edwards, Cogwheels of the Mind, Johns Hopkins University Press, 2004, p. 82.
LINKS
Désiré André, Sur les permutations alternées, J. Math. Pur. Appl., 7 (1881), 167-184.
Désiré André, Étude sur les maxima, minima et séquences des permutations, Ann. Sci. Ecole Norm. Sup., 3, no. 1 (1884), 121-135.
Désiré André, Mémoire sur les permutations quasi-alternées, Journal de mathématiques pures et appliquées 5e série, tome 1 (1895), 315-350.
Désiré André, Mémoire sur les séquences des permutations circulaires, Bulletin de la S. M. F., tome 23 (1895), pp. 122-184.
Ali Reza Ashrafi and Parisa Nikzad, Kekulé index and bounds of energy for nanostar dendrimers, Digest J. of Nanomaterials and Biostructures, 4, No. 2, 2009, 383-388.
Sergey Kitaev, On multi-avoidance of right angled numbered polyomino patterns, Integers: Electronic Journal of Combinatorial Number Theory 4 (2004), A21, 20pp.
Sergey Kitaev, On multi-avoidance of right angled numbered polyomino patterns, University of Kentucky Research Reports (2004).
László Németh, Pascal pyramid in the space H^2 x R, arXiv:1701.06022 [math.CO], 2017 (3rd line of Table 2 is a(n+1)).
I. Strazdins, Universal affine classification of Boolean functions, Acta Applic. Math. 46 (1997), 147-167.
FORMULA
O.g.f.: 4*x^3/((1-x)*(1-2*x)). - R. J. Mathar, Aug 07 2008
From Reinhard Zumkeller, Feb 28 2010: (Start)
a(n) = A175164(2*n)/A140504(n+2);
a(2*n) = A052548(n)*A000918(n) for n > 0;
a(n) = A173787(n,2). (End)
a(n) = a(n-1) + 2^(n-1) (with a(2)=0). - Vincenzo Librandi, Nov 22 2010
a(n) = 4*A000225(n-2). - R. J. Mathar, Dec 15 2015
E.g.f.: 3 + 2*x - 4*exp(x) + exp(2*x). - Stefano Spezia, Apr 06 2021
a(n) = sigma(A003945(n-2)) for n>=3. - Flávio V. Fernandes, Apr 20 2021
EXAMPLE
From Petros Hadjicostas, Aug 08 2019: (Start)
We have a(3) = 4 because each of the following permutations of [3] has the following so-called "séquences" ("alternate runs"):
123 -> 123 (one),
132 -> 13, 32 (two),
213 -> 21, 13 (two),
231 -> 23, 31 (two),
312 -> 31, 12 (two),
321 -> 321 (one).
Recall that a so-called "séquence" ("alternate run") must start with a "maximum" and end with "minimum", or vice versa, and it should not contain any other maxima and minima in between. Two consecutive such "séquences" ("alternate runs") have exactly one minimum or exactly one maximum in common.
(End)
MAPLE
seq(2^n-4, n=2..40); # Muniru A Asiru, May 17 2018
MATHEMATICA
2^Range[2, 40]-4 (* Harvey P. Dale, Jul 05 2019 *)
PROG
(PARI) a(n)=if(n<2, 0, 2^n-4)
(GAP) a:=List([2..40], n->2^n-4); # Muniru A Asiru, May 17 2018
(Python)
def A028399(n): return (1<<n)-4 # Chai Wah Wu, Jun 27 2023
CROSSREFS
Column k = 2 of A059427.
Row n = 2 of A371064.
KEYWORD
nonn,easy
EXTENSIONS
Additional comments from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Dec 02 2001
STATUS
approved
a(n) = 2^n + 3.
+10
29
4, 5, 7, 11, 19, 35, 67, 131, 259, 515, 1027, 2051, 4099, 8195, 16387, 32771, 65539, 131075, 262147, 524291, 1048579, 2097155, 4194307, 8388611, 16777219, 33554435, 67108867, 134217731, 268435459, 536870915, 1073741827, 2147483651, 4294967299, 8589934595, 17179869187
OFFSET
0,1
COMMENTS
Written in binary a(n) is 1000...00011 for n > 1.
For n >= 2, a(n) is the minimal k for which A000120(k(2^n-1)) is not multiple of n. - Vladimir Shevelev, Jun 05 2009
FORMULA
a(n) = 2a(n-1) - 3 = A052548(n) + 1 = A000051(n) + 2 = A000079(n) + 3 = A000225(n) + 4 = A030101(A004119(n)) for n > 1.
G.f.: (4 - 7*x)/((1 - 2*x)*(1 - x)).
a(n) = A173921(A000051(n+1)). - Reinhard Zumkeller, Mar 04 2010
E.g.f.: exp(x)*(3 + exp(x)). - Stefano Spezia, May 06 2023
EXAMPLE
a(3) = 2^3 + 3 = 8 + 3 = 11.
a(4) = 2^4 + 3 = 16 + 3 = 19.
MATHEMATICA
LinearRecurrence[{3, -2}, {4, 5}, 40] (* Vincenzo Librandi, Jan 31 2012 *)
NestList[2 * # - 3 &, 4, 20] (* Zak Seidov, Mar 28 2015 *)
2^Range[0, 29] + 3 (* Alonso del Arte, Mar 28 2015 *)
PROG
(Sage) [gaussian_binomial(n, 1, 2)+4 for n in range(0, 32)] # Zerinvary Lajos, May 31 2009
(PARI) a(n)=2^n+3 \\ Charles R Greathouse IV, Jan 30 2012
(Magma) [2^n+3: n in [0..40]] // Vincenzo Librandi, Jan 31 2012
CROSSREFS
Primes in this sequence are A057733.
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Jul 13 2001
STATUS
approved
Next larger integer with same binary weight (number of 1 bits) as n.
+10
28
2, 4, 5, 8, 6, 9, 11, 16, 10, 12, 13, 17, 14, 19, 23, 32, 18, 20, 21, 24, 22, 25, 27, 33, 26, 28, 29, 35, 30, 39, 47, 64, 34, 36, 37, 40, 38, 41, 43, 48, 42, 44, 45, 49, 46, 51, 55, 65, 50, 52, 53, 56, 54, 57, 59, 67, 58, 60, 61, 71, 62, 79, 95, 128, 66, 68, 69, 72, 70, 73, 75
OFFSET
1,1
COMMENTS
Binary weight is given by A000120.
REFERENCES
Donald Knuth, The Art of Computer Programming, Vol. 4A, section 7.1.3, exercises 20-21.
LINKS
M. Beeler, R. W. Gosper, and R. Schroeppel, HAKMEM, MIT Artificial Intelligence Laboratory, Memo AIM-239, February 1972, Item 175 by Gosper, page 81. Also HTML transcription.
Donald E. Knuth, The Art of Computer Programming, Pre-Fascicle 1A, Draft of Section 7.1.3, 2008. Exercises 20 and 21 page 54 and answers pages 75-76.
FORMULA
From Reinhard Zumkeller, Aug 18 2008: (Start)
a(A000079(n)) = A000079(n+1);
a(A000051(n)) = A052548(n);
a(A052548(n)) = A140504(n);
a(A000225(n)) = A055010(n);
a(A007283(n)) = A000051(n+2). (End)
a(n) = MIN{m: A000120(m)=A000120(n) and m>n}. - Reinhard Zumkeller, Aug 15 2009
EXAMPLE
a(6)=9 since 6 has two one-bits (i.e., 6=2+4) and 9 is the next higher integer of binary weight two (7 is weight three and 8 is weight one).
MATHEMATICA
a[n_] := (bw = DigitCount[n, 2, 1]; k = n+1; While[ DigitCount[k, 2, 1] != bw, k++]; k); Table[a[n], {n, 1, 71}](* Jean-François Alcover, Nov 28 2011 *)
PROG
(PARI) a(n)=my(u=bitand(n, -n), v=u+n); (bitxor(v, n)/u)>>2+v \\ Charles R Greathouse IV, Oct 28 2009
(PARI) A057168(n)=n+bitxor(n, n+n=bitand(n, -n))\n\4+n \\ M. F. Hasler, Aug 27 2014
(Haskell)
a057168 n = a057168_list !! (n-1)
a057168_list = f 2 $ tail a000120_list where
f x (z:zs) = (x + length (takeWhile (/= z) zs)) : f (x + 1) zs
-- Reinhard Zumkeller, Aug 26 2012
(Python)
def a(n): u = n&-n; v = u+n; return (((v^n)//u)>>2)+v
print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Jul 10 2022 after Charles R Greathouse IV
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
Marc LeBrun, Sep 14 2000
STATUS
approved
Triangle read by rows: T(n,k) = 2^n + 2^k, 0 <= k <= n.
+10
25
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, 1040, 1056, 1088, 1152, 1280, 1536, 2048
OFFSET
0,1
COMMENTS
Essentially the same as A048645. - T. D. Noe, Mar 28 2011
FORMULA
1 <= A000120(T(n,k)) <= 2.
For n>0, 0<=k<n: T(n,k) = A048645(n+1,k+2) and T(n,n) = A048645(n+2,1).
Row sums give A006589(n).
Central terms give A161168(n).
T(2*n+1,n) = A007582(n+1).
T(2*n+1,n+1) = A028403(n+1).
T(n,k) = A140513(n,k) - A173787(n,k), 0<=k<=n.
T(n,k) = A059268(n+1,k+1) + A173787(n,k), 0<k<=n.
T(n,k) * A173787(n,k) = A173787(2*n,2*k), 0<=k<=n.
T(n,0) = A000051(n).
T(n,1) = A052548(n) for n>0.
T(n,2) = A140504(n) for n>1.
T(n,3) = A175161(n-3) for n>2.
T(n,4) = A175162(n-4) for n>3.
T(n,5) = A175163(n-5) for n>4.
T(n,n-4) = A110287(n-4) for n>3.
T(n,n-3) = A005010(n-3) for n>2.
T(n,n-2) = A020714(n-2) for n>1.
T(n,n-1) = A007283(n-1) for n>0.
T(n,n) = 2*A000079(n).
EXAMPLE
Triangle begins as:
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, 1040, 1056, 1088, 1152, 1280, 1536, 2048;
MATHEMATICA
Flatten[Table[2^n + 2^m, {n, 0, 10}, {m, 0, n}]] (* T. D. Noe, Jun 18 2013 *)
PROG
(Magma) [2^n + 2^k: k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 07 2021
(Sage) flatten([[2^n + 2^k for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 07 2021
(PARI) A173786(n) = { my(c = (sqrtint(8*n + 1) - 1) \ 2); 1 << c + 1 << (n - binomial(c + 1, 2)); }; \\ Antti Karttunen, Feb 29 2024, after David A. Corneth's PARI-program in A048645
CROSSREFS
Cf. also A087112, A370121.
KEYWORD
nonn,tabl,easy
AUTHOR
Reinhard Zumkeller, Feb 28 2010
EXTENSIONS
Typo in first comment line fixed by Reinhard Zumkeller, Mar 07 2010
STATUS
approved
Number T(n,k) of set partitions of [n] such that k is the largest element of the last block; triangle T(n,k), n>=1, 1<=k<=n, read by rows.
+10
23
1, 0, 2, 0, 1, 4, 0, 1, 4, 10, 0, 1, 6, 15, 30, 0, 1, 10, 29, 59, 104, 0, 1, 18, 63, 139, 250, 406, 0, 1, 34, 149, 365, 692, 1145, 1754, 0, 1, 66, 375, 1039, 2110, 3627, 5649, 8280, 0, 1, 130, 989, 3149, 6932, 12521, 20085, 29874, 42294, 0, 1, 258, 2703, 10039, 24190, 46299, 77133, 117488, 168509, 231950
OFFSET
1,3
COMMENTS
Each set partition is written as a sequence of blocks, ordered by the smallest elements in the blocks.
LINKS
FORMULA
T(n,n) = 2 * A000110(n-1) = 2 * Sum_{j=0..n-1} T(n-1,j) for n>1.
EXAMPLE
T(1,1) = 1: 1.
T(2,2) = 2: 12, 1|2.
T(3,2) = 1: 13|2.
T(3,3) = 4: 123, 12|3, 1|23, 1|2|3.
T(4,2) = 1: 134|2.
T(4,3) = 4: 124|3, 14|23, 14|2|3, 1|24|3.
T(4,4) = 10: 1234, 123|4, 12|34, 12|3|4, 13|24, 13|2|4, 1|234, 1|23|4, 1|2|34, 1|2|3|4.
T(5,2) = 1: 1345|2.
T(5,3) = 6: 1245|3, 145|23, 145|2|3, 14|25|3, 15|24|3, 1|245|3.
T(5,4) = 15: 1235|4, 125|34, 125|3|4, 12|35|4, 135|24, 135|2|4, 13|25|4, 15|234, 15|23|4, 1|235|4, 15|2|34, 1|25|34, 15|2|3|4, 1|25|3|4, 1|2|35|4.
Triangle T(n,k) begins:
1;
0, 2;
0, 1, 4;
0, 1, 4, 10;
0, 1, 6, 15, 30;
0, 1, 10, 29, 59, 104;
0, 1, 18, 63, 139, 250, 406;
0, 1, 34, 149, 365, 692, 1145, 1754;
0, 1, 66, 375, 1039, 2110, 3627, 5649, 8280;
0, 1, 130, 989, 3149, 6932, 12521, 20085, 29874, 42294;
...
MAPLE
b:= proc(n, m, c) option remember; `if`(n=0, x^c, add(
b(n-1, max(m, j), `if`(j>=m, n, c)), j=1..m+1))
end:
T:= n-> (p-> seq(coeff(p, x, n-i), i=0..n-1))(b(n, 0$2)):
seq(T(n), n=1..12);
MATHEMATICA
b[n_, m_, c_] := b[n, m, c] = If[n == 0, x^c, Sum[b[n-1, Max[m, j], If[j >= m, n, c]], {j, 1, m+1}]];
T[n_] := Function[p, Table[Coefficient[p, x, n-i], {i, 0, n-1}]][b[n, 0, 0]];
Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Apr 24 2016, translated from Maple *)
CROSSREFS
Columns k=1-10 give: A000007(n-1), A054977(n-2), A052548(n-3) for n>3, A271743, A271744, A271745, A271746, A271747, A271748, A271749.
Main diagonal gives A186021(n-1).
Lower diagonals d=1-10 give: A271752, A271753, A271754, A271755, A271756, A271757, A271758, A271759, A271760, A271761.
Row sums give A000110.
T(2n,n) gives A271467.
T(2n+1,n+1) gives A271607.
Cf. A095149 (k is maximum of the first block), A113547 (k is minimum of the last block).
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Apr 08 2016
STATUS
approved
a(n) = 2^n + 4.
+10
20
5, 6, 8, 12, 20, 36, 68, 132, 260, 516, 1028, 2052, 4100, 8196, 16388, 32772, 65540, 131076, 262148, 524292, 1048580, 2097156, 4194308, 8388612, 16777220, 33554436, 67108868, 134217732, 268435460, 536870916, 1073741828
OFFSET
0,1
FORMULA
G.f.: (5 - 9*x)/((1 - x)*(1 - 2*x)). - Jaume Oliver Lafont, Aug 30 2009
a(n) = 2*a(n-1) - 4 with a(0) = 5. - Vincenzo Librandi, Nov 24 2009
From Reinhard Zumkeller, Feb 28 2010: (Start)
a(n) = A173786(n,2) for n > 1.
a(n+2)*A028399(n) = A175164(2*n). (End)
From G. C. Greubel, Jul 08 2021: (Start)
a(n) = m*(2^(n-2) + 1), with m = 4.
E.g.f.: exp(2*x) + 4*exp(x). (End)
MATHEMATICA
Table[2^n + 4, {n, 0, 30}] (* Stefan Steinerberger, Aug 04 2008 *)
LinearRecurrence[{3, -2}, {5, 6}, 40] (* Harvey P. Dale, May 26 2018 *)
PROG
(Sage) [2^n + 4 for n in range(0, 31)] # Zerinvary Lajos, May 31 2009
(PARI) a(n)=2^n+4 \\ Charles R Greathouse IV, Dec 21 2011
(Magma) [2^n +4: n in [0..30]]; // G. C. Greubel, Jul 08 2021
CROSSREFS
Cf. A000051 (m=0), A052548 (m=2), this sequence (m=4), A153973 (m=6), A231643 (m=5), A175161 (m=8), A175162 (m=16), A175163 (m=32).
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jun 30 2008
EXTENSIONS
More terms from Stefan Steinerberger, Aug 04 2008
STATUS
approved
Total sum A(n,k) of k-th powers of parts in all partitions of n; square array A(n,k), n>=0, k>=0, read by antidiagonals.
+10
20
0, 0, 1, 0, 1, 3, 0, 1, 4, 6, 0, 1, 6, 9, 12, 0, 1, 10, 17, 20, 20, 0, 1, 18, 39, 44, 35, 35, 0, 1, 34, 101, 122, 87, 66, 54, 0, 1, 66, 279, 392, 287, 180, 105, 86, 0, 1, 130, 797, 1370, 1119, 660, 311, 176, 128, 0, 1, 258, 2319, 5024, 4775, 2904, 1281, 558, 270, 192
OFFSET
0,6
COMMENTS
In general, if k > 0 then column k is asymptotic to 2^((k-3)/2) * 3^(k/2) * k! * Zeta(k+1) / Pi^(k+1) * exp(Pi*sqrt(2*n/3)) * n^((k-1)/2). - Vaclav Kotesovec, May 27 2018
LINKS
FORMULA
A(n,k) = Sum_{j=1..n} A066633(n,j) * j^k.
EXAMPLE
Square array A(n,k) begins:
: 0, 0, 0, 0, 0, 0, 0, ...
: 1, 1, 1, 1, 1, 1, 1, ...
: 3, 4, 6, 10, 18, 34, 66, ...
: 6, 9, 17, 39, 101, 279, 797, ...
: 12, 20, 44, 122, 392, 1370, 5024, ...
: 20, 35, 87, 287, 1119, 4775, 21447, ...
: 35, 66, 180, 660, 2904, 14196, 73920, ...
MAPLE
b:= proc(n, p, k) option remember; `if`(n=0, [1, 0], `if`(p<1, [0, 0],
add((l->`if`(m=0, l, l+[0, l[1]*p^k*m]))
(b(n-p*m, p-1, k)), m=0..n/p)))
end:
A:= (n, k)-> b(n, n, k)[2]:
seq(seq(A(n, d-n), n=0..d), d=0..10);
MATHEMATICA
b[n_, p_, k_] := b[n, p, k] = If[n == 0, {1, 0}, If[p < 1, {0, 0}, Sum[Function[l, If[m == 0, l, l + {0, First[l]*p^k*m}]][b[n - p*m, p - 1, k]], { m, 0, n/p}]]] ; a[n_, k_] := b[n, n, k][[2]]; Table[Table[a[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 12 2013, translated from Maple *)
(* T = A066633 *) T[n_, n_] = 1; T[n_, k_] /; k<n := T[n, k] = T[n-k, k] + PartitionsP[n-k]; T[_, _] = 0; A[n_, k_] := Sum[T[n, j]*j^k, {j, 1, n}]; Table[A[n-k, k], {n, 0, 10}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Dec 15 2016 *)
CROSSREFS
Main diagonal gives A252761.
Cf. A213180.
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Feb 28 2013
STATUS
approved
Sum of the k-th powers of the numbers of standard Young tableaux over all partitions of n; square array A(n,k), n>=0, k>=0, read by antidiagonals.
+10
18
1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 5, 1, 1, 2, 6, 10, 7, 1, 1, 2, 10, 24, 26, 11, 1, 1, 2, 18, 64, 120, 76, 15, 1, 1, 2, 34, 180, 596, 720, 232, 22, 1, 1, 2, 66, 520, 3060, 8056, 5040, 764, 30, 1, 1, 2, 130, 1524, 16076, 101160, 130432, 40320, 2620, 42
OFFSET
0,6
LINKS
Alois P. Heinz, Antidiagonals n = 0..50
Wikipedia, Young tableau
EXAMPLE
A(3,2) = 1^2 + 2^2 + 1^2 = 6 = 3! because 3 has partitions 111, 21, 3 with 1, 2, 1 standard Young tableaux, respectively:
.111. . 21 . . . . . . . . 3 . . . .
+---+ +------+ +------+ +---------+
| 1 | | 1 2 | | 1 3 | | 1 2 3 |
| 2 | | 3 .--+ | 2 .--+ +---------+
| 3 | +---+ +---+
+---+
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, ...
2, 2, 2, 2, 2, 2, 2, ...
3, 4, 6, 10, 18, 34, 66, ...
5, 10, 24, 64, 180, 520, 1524, ...
7, 26, 120, 596, 3060, 16076, 86100, ...
11, 76, 720, 8056, 101160, 1379176, 19902600, ...
MAPLE
h:= proc(l) local n; n:=nops(l); add(i, i=l)! /mul(mul(1+l[i]-j
+add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
end:
g:= proc(n, i, k, l) `if`(n=0, h(l)^k, `if`(i<1, 0, g(n, i-1, k, l)
+ `if`(i>n, 0, g(n-i, i, k, [l[], i]))))
end:
A:= (n, k)-> `if`(n=0, 1, g(n, n, k, [])):
seq(seq(A(n, d-n), n=0..d), d=0..10);
MATHEMATICA
h[l_] := With[{n = Length[l]}, Sum[i, {i, l}]! / Product[Product[1 + l[[i]] - j + Sum [If[l[[k]] >= j, 1, 0], { k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]]; g[n_, i_, k_, l_] := If[n == 0, h[l]^k, If[i < 1, 0, g[n, i-1, k, l] + If[i > n, 0, g[n-i, i, k, Append[l, i]]]]]; a [n_, k_] := If[n == 0, 1, g[n, n, k, {}]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 11 2013, translated from Maple *)
CROSSREFS
Rows 0+1, 2, 3 give: A000012, A007395, A052548.
Main diagonal gives A319607.
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Feb 26 2012
STATUS
approved
T(n,k)=Number of (n+2)X(k+2) 0..3 arrays with every 3X3 subblock row and diagonal sum equal to 1 2 5 6 or 7 and every 3X3 column and antidiagonal sum not equal to 1 2 5 6 or 7
+10
16
702, 843, 742, 1069, 868, 890, 1694, 1795, 1558, 1469, 2985, 3441, 4168, 3286, 2637, 5401, 8980, 9051, 10885, 7610, 4583, 9936, 23007, 30532, 25882, 34532, 17261, 8279, 18972, 47737, 92725, 107651, 88844, 96099, 39419, 15476, 36144, 133142, 208375
OFFSET
1,1
COMMENTS
Table starts
...702....843....1069.....1694......2985.......5401........9936........18972
...742....868....1795.....3441......8980......23007.......47737.......133142
...890...1558....4168.....9051.....30532......92725......208375.......715437
..1469...3286...10885....25882....107651.....395500......959944......4006901
..2637...7610...34532....88844....498696....2538669.....6590930.....37656158
..4583..17261...96099...263046...1887578...11285381....31059674....225598956
..8279..39419..275252...802760...7115253...53055996...155864925...1380518004
.15476..94224..896803..2655311..31894631..337833222...994640586..12185963853
.28007.218717.2561903..7860183.122743127.1537313257..4728064653..74805119002
.51488.504824.7521424.24273030.470091119.7468646942.24277561799.469290271873
LINKS
FORMULA
Empirical for column k:
k=1: [linear recurrence of order 54] for n>60
k=2: [order 45] for n>50
k=3: [order 39] for n>46
k=4: [order 54] for n>60
k=5: [order 84] for n>89
Empirical for row n:
n=1: [linear recurrence of order 33] for n>43
n=2: [order 27] for n>34
n=3: [order 24] for n>32
n=4: [order 24] for n>31
n=5: [order 24] for n>32
n=6: [order 42] for n>50
n=7: [order 36] for n>45
EXAMPLE
Some solutions for n=4 k=4
..3..2..2..3..2..1....0..2..0..0..2..0....0..0..2..0..0..2....0..0..2..0..0..2
..0..2..0..0..2..0....1..1..3..1..1..0....3..2..1..3..1..2....3..2..2..3..2..1
..0..0..2..0..0..2....2..0..0..2..0..0....0..2..0..0..2..0....0..2..0..0..2..0
..3..1..1..3..2..1....0..2..0..0..2..0....0..0..2..0..0..2....0..0..2..0..0..2
..0..2..0..0..2..0....2..1..3..2..2..3....3..1..2..3..1..2....3..1..2..3..2..1
..0..0..2..0..0..2....2..0..0..1..0..0....0..2..0..0..2..0....0..2..0..0..1..0
CROSSREFS
Column 1 is A005010(n-1)
Column 2 is A052548(n+3)
Row 1 is A083706(n+1)
KEYWORD
nonn,tabl
AUTHOR
R. H. Hardin, Dec 18 2014
STATUS
approved

Search completed in 0.033 seconds