Search: a002144 -id:a002144
|
|
|
|
0, 0, 0, 28, 17, 39, 4, 72, 79, 65, 17, 65, 17, 29, 145, 65, 84, 65, 145, 17, 109, 17, 65, 0, 145, 65, 17, 145, 88, 17, 64, 145, 17, 28, 257, 65, 17, 65, 145, 145, 257, 65, 17, 269, 145, 401, 257, 145, 65, 257, 65, 145, 17, 577, 145, 65, 145, 17, 577, 65, 577
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Motivated by the fact that the first terms are zero (which is of course a coincidence). Other values (17, 65, 145, 257...) occur much more frequently.
|
|
LINKS
|
|
|
EXAMPLE
|
5^2+1 = 2*13, 13^2+1 = 10*17, 17^2=10*29; therefore a(1)=a(2)=a(3)=0.
29^2+1 = 22*37+28, therefore a(4)=28.
Kermit Rose's post in the primenumbers Yahoo group:
>>> (5**2+1)%13
0
>>> (13**2+1)%17
0
>>> (17**2+1)%29
0
Looks remarkable.
>>> (29**2+1)%37
28.
Oops: Break in the pattern. Another illustration of the law of small numbers. :)
|
|
PROG
|
(PARI) o=5; forprime(p=o+1, 900, p%4==1|next; print1((o^2+1)%o=p", "))
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A000984
|
|
Central binomial coefficients: binomial(2*n,n) = (2*n)!/(n!)^2.
(Formerly M1645 N0643)
|
|
+10
1052
|
|
|
1, 2, 6, 20, 70, 252, 924, 3432, 12870, 48620, 184756, 705432, 2704156, 10400600, 40116600, 155117520, 601080390, 2333606220, 9075135300, 35345263800, 137846528820, 538257874440, 2104098963720, 8233430727600, 32247603683100, 126410606437752, 495918532948104, 1946939425648112
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Devadoss refers to these numbers as type B Catalan numbers (cf. A000108).
Equal to the binomial coefficient sum Sum_{k=0..n} binomial(n,k)^2.
Number of possible interleavings of a program with n atomic instructions when executed by two processes. - Manuel Carro (mcarro(AT)fi.upm.es), Sep 22 2001
Convolving a(n) with itself yields A000302, the powers of 4. - T. D. Noe, Jun 11 2002
Number of ordered trees with 2n+1 edges, having root of odd degree and nonroot nodes of outdegree 0 or 2. - Emeric Deutsch, Aug 02 2002
Also number of directed, convex polyominoes having semiperimeter n+2.
Also number of diagonally symmetric, directed, convex polyominoes having semiperimeter 2n+2. - Emeric Deutsch, Aug 03 2002
The second inverse binomial transform of this sequence is this sequence with interpolated zeros. Its g.f. is (1 - 4*x^2)^(-1/2), with n-th term C(n,n/2)(1+(-1)^n)/2. - Paul Barry, Jul 01 2003
Number of possible values of a 2n-bit binary number for which half the bits are on and half are off. - Gavin Scott (gavin(AT)allegro.com), Aug 09 2003
Ordered partitions of n with zeros to n+1, e.g., for n=4 we consider the ordered partitions of 11110 (5), 11200 (30), 13000 (20), 40000 (5) and 22000 (10), total 70 and a(4)=70. See A001700 (esp. Mambetov Bektur's comment). - Jon Perry, Aug 10 2003
Number of nondecreasing sequences of n integers from 0 to n: a(n) = Sum_{i_1=0..n} Sum_{i_2=i_1..n}...Sum_{i_n=i_{n-1}..n}(1). - J. N. Bearden (jnb(AT)eller.arizona.edu), Sep 16 2003
Number of peaks at odd level in all Dyck paths of semilength n+1. Example: a(2)=6 because we have U*DU*DU*D, U*DUUDD, UUDDU*D, UUDUDD, UUU*DDD, where U=(1,1), D=(1,-1) and * indicates a peak at odd level. Number of ascents of length 1 in all Dyck paths of semilength n+1 (an ascent in a Dyck path is a maximal string of up steps). Example: a(2)=6 because we have uDuDuD, uDUUDD, UUDDuD, UUDuDD, UUUDDD, where an ascent of length 1 is indicated by a lower case letter. - Emeric Deutsch, Dec 05 2003
a(n-1) = number of subsets of 2n-1 distinct elements taken n at a time that contain a given element. E.g., n=4 -> a(3)=20 and if we consider the subsets of 7 taken 4 at a time with a 1 we get (1234, 1235, 1236, 1237, 1245, 1246, 1247, 1256, 1257, 1267, 1345, 1346, 1347, 1356, 1357, 1367, 1456, 1457, 1467, 1567) and there are 20 of them. - Jon Perry, Jan 20 2004
The dimension of a particular (necessarily existent) absolutely universal embedding of the unitary dual polar space DSU(2n,q^2) where q>2. - J. Taylor (jt_cpp(AT)yahoo.com), Apr 02 2004.
Number of standard tableaux of shape (n+1, 1^n). - Emeric Deutsch, May 13 2004
Erdős, Graham et al. conjectured that a(n) is never squarefree for sufficiently large n (cf. Graham, Knuth, Patashnik, Concrete Math., 2nd ed., Exercise 112). Sárközy showed that if s(n) is the square part of a(n), then s(n) is asymptotically (sqrt(2)-2)*(sqrt(n))*(Riemann Zeta Function(1/2)). Granville and Ramare proved that the only squarefree values are a(1)=2, a(2)=6 and a(4)=70. - Jonathan Vos Post, Dec 04 2004 [For more about this conjecture, see A261009. - N. J. A. Sloane, Oct 25 2015]
The MathOverflow link contains the following comment (slightly edited): The Erdős squarefree conjecture (that a(n) is never squarefree for n>4) was proved in 1980 by Sárközy, A. (On divisors of binomial coefficients. I. J. Number Theory 20 (1985), no. 1, 70-80.) who showed that the conjecture holds for all sufficiently large values of n, and by A. Granville and O. Ramaré (Explicit bounds on exponential sums and the scarcity of squarefree binomial coefficients. Mathematika 43 (1996), no. 1, 73-107) who showed that it holds for all n>4. - Fedor Petrov, Nov 13 2010. [From N. J. A. Sloane, Oct 29 2015]
p divides a((p-1)/2)-1=A030662(n) for prime p=5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, ... = A002144(n) Pythagorean primes: primes of form 4n+1. - Alexander Adamchuk, Jul 04 2006
The number of direct routes from my home to Granny's when Granny lives n blocks south and n blocks east of my home in Grid City. To obtain a direct route, from the 2n blocks, choose n blocks on which one travels south. For example, a(2)=6 because there are 6 direct routes: SSEE, SESE, SEES, EESS, ESES and ESSE. - Dennis P. Walsh, Oct 27 2006
Inverse: With q = -log(log(16)/(pi a(n)^2)), ceiling((q + log(q))/log(16)) = n. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 26 2007
Number of partitions with Ferrers diagrams that fit in an n X n box (including the empty partition of 0). Example: a(2) = 6 because we have: empty, 1, 2, 11, 21 and 22. - Emeric Deutsch, Oct 02 2007
The number of walks of length 2n on an infinite linear lattice that begins and ends at the origin. - Stefan Hollos (stefan(AT)exstrom.com), Dec 10 2007
The number of lattice paths from (0,0) to (n,n) using steps (1,0) and (0,1). - Joerg Arndt, Jul 01 2011
Integral representation: C(2n,n)=1/Pi Integral [(2x)^(2n)/sqrt(1 - x^2),{x,-1, 1}], i.e., C(2n,n)/4^n is the moment of order 2n of the arcsin distribution on the interval (-1,1). - N-E. Fahssi, Jan 02 2008
Straub, Amdeberhan and Moll: "... it is conjectured that there are only finitely many indices n such that C_n is not divisible by any of 3, 5, 7 and 11." - Jonathan Vos Post, Nov 14 2008
Also, in sports, the number of ordered ways for a "Best of 2n-1 Series" to progress. For example, a(2) = 6 means there are six ordered ways for a "best of 3" series to progress. If we write A for a win by "team A" and B for a win by "team B" and if we list the played games chronologically from left to right then the six ways are AA, ABA, BAA, BB, BAB, and ABB. (Proof: To generate the a(n) ordered ways: Write down all a(n) ways to designate n of 2n games as won by team A. Remove the maximal suffix of identical letters from each of these.) - Lee A. Newberg, Jun 02 2009
Number of n X n binary arrays with rows, considered as binary numbers, in nondecreasing order, and columns, considered as binary numbers, in nonincreasing order. - R. H. Hardin, Jun 27 2009
Hankel transform is 2^n. - Paul Barry, Aug 05 2009
It appears that a(n) is also the number of quivers in the mutation class of twisted type BC_n for n>=2.
Number of words on {a,b} of length 2n such that no prefix of the word contains more b's than a's. - Jonathan Nilsson, Apr 18 2012
From Pascal's triangle take row(n) with terms in order a1,a2,..a(n) and row(n+1) with terms b1,b2,..b(n), then 2*(a1*b1 + a2*b2 + ... + a(n)*b(n)) to get the terms in this sequence. - J. M. Bergot, Oct 07 2012. For example using rows 4 and 5: 2*(1*(1) + 4*(5) + 6*(10) + 4*(10) + 1*(5)) = 252, the sixth term in this sequence.
Take from Pascal's triangle row(n) with terms b1, b2, ..., b(n+1) and row(n+2) with terms c1, c2, ..., c(n+3) and find the sum b1*c2 + b2*c3 + ... + b(n+1)*c(n+2) to get A000984(n+1). Example using row(3) and row(5) gives sum 1*(5)+3*(10)+3*(10)+1*(5) = 70 = A000984(4). - J. M. Bergot, Oct 31 2012
a(n) == 2 mod n^3 iff n is a prime > 3. (See Mestrovic link, p. 4.) - Gary Detlefs, Feb 16 2013
Conjecture: For any positive integer n, the polynomial sum_{k=0}^n a(k)x^k is irreducible over the field of rational numbers. In general, for any integer m>1 and n>0, the polynomial f_{m,n}(x) = Sum_{k=0..n} (m*k)!/(k!)^m*x^k is irreducible over the field of rational numbers. - Zhi-Wei Sun, Mar 23 2013
This comment generalizes the comment dated Oct 31 2012 and the second of the sequence's original comments. For j = 1 to n, a(n) = Sum_{k=0..j} C(j,k)* C(2n-j, n-k) = 2*Sum_{k=0..j-1} C(j-1,k)*C(2n-j, n-k). - Charlie Marion, Jun 07 2013
The differences between consecutive terms of the sequence of the quotients between consecutive terms of this sequence form a sequence containing the reciprocals of the triangular numbers. In other words, a(n+1)/a(n)-a(n)/a(n-1) = 2/(n*(n+1)). - Christian Schulz, Jun 08 2013
Number of distinct strings of length 2n using n letters A and n letters B. - Hans Havermann, May 07 2014
Expansion of G.f. A(x) = 1/(1+q*x*c(x)), where parameter q is positive or negative (except q=-1), and c(x) is the g.f. of A000108 for Catalan numbers. The case of q=-1 recovers the g.f. of A000108 as xA^2-A+1=0. The present sequence A000984 refers to q=-2. Recurrence: (1+q)*(n+2)*a(n+2) + ((q*q-4*q-4)*n + 2*(q*q-q-1))*a(n+1) - 2*q*q*(2*n+1)*a(n) = 0, a(0)=1, a(1)=-q. Asymptotics: a(n) ~ ((q+2)/(q+1))*(q^2/(-q-1))^n, q<=-3, a(n) ~ (-1)^n*((q+2)/(q+1))*(q^2/(q+1))^n, q>=5, and a(n) ~ -Kq*2^(2*n)/sqrt(Pi*n^3), where the multiplicative constant Kq is given by K1=1/9 (q=1), K2=1/8 (q=2), K3=3/25 (q=3), K4=1/9 (q=4). These formulas apply to existing sequences A126983 (q=1), A126984 (q=2), A126982 (q=3), A126986 (q=4), A126987 (q=5), A127017 (q=6), A127016 (q=7), A126985 (q=8), A127053 (q=9), and to A007854 (q=-3), A076035 (q=-4), A076036 (q=-5), A127628 (q=-6), A126694 (q=-7), A115970 (q=-8). (End)
a(n)*(2^n)^(j-2) equals S(n), where S(n) is the n-th number in the self-convolved sequence which yields the powers of 2^j for all integers j, n>=0. For example, when n=5 and j=4, a(5)=252; 252*(2^5)^(4-2) = 252*1024 = 258048. The self-convolved sequence which yields powers of 16 is {1, 8, 96, 1280, 17920, 258048, ...}; i.e., S(5) = 258048. Note that the convolved sequences will be composed of numbers decreasing from 1 to 0, when j<2 (exception being j=1, where the first two numbers in the sequence are 1 and all others decreasing). - Bob Selcoe, Jul 16 2014
The variance of the n-th difference of a sequence of pairwise uncorrelated random variables each with variance 1. - Liam Patrick Roche, Jun 04 2015
Number of ordered trees with n edges where vertices at level 1 can be of 2 colors. Indeed, the standard decomposition of ordered trees leading to the equation C = 1 + zC^2 (C is the Catalan function), yields this time G = 1 + 2zCG, from where G = 1/sqrt(1-4z). - Emeric Deutsch, Jun 17 2015
Number of monomials of degree at most n in n variables. - Ran Pan, Sep 26 2015
Let V(n, r) denote the volume of an n-dimensional sphere with radius r, then V(n, 2^n) / Pi = V(n-1, 2^n) * a(n/2) for all even n. - Peter Luschny, Oct 12 2015
a(n) is the number of sets {i1,...,in} of length n such that n >= i1 >= i2 >= ... >= in >= 0. For instance, a(2) = 6 as there are only 6 such sets: (2,2) (2,1) (2,0) (1,1) (1,0) (0,0). - Anton Zakharov, Jul 04 2016
By analytic continuation to the entire complex plane there exist regularized values for divergent sums such as:
Sum_{k>=0} a(k)/(-2)^k = 1/sqrt(3).
Sum_{k>=0} a(k)/(-1)^k = 1/sqrt(5).
Sum_{k>=0} a(k)/(-1/2)^k = 1/3.
Sum_{k>=0} a(k)/(1/2)^k = -1/sqrt(7)i.
Sum_{k>=0} a(k)/(1)^k = -1/sqrt(3)i.
Sum_{k>=0} a(k)/2^k = -i. (End)
Number of sequences (e(1), ..., e(n+1)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) > e(j). [Martinez and Savage, 2.18] - Eric M. Schmidt, Jul 17 2017
The o.g.f. for the sequence equals the diagonal of any of the following the rational functions: 1/(1 - (x + y)), 1/(1 - (x + y*z)), 1/(1 - (x + x*y + y*z)) or 1/(1 - (x + y + y*z)). - Peter Bala, Jan 30 2018
Let s denote West's stack-sorting map. a(n) is the number of permutations pi of [n+1] such that s(pi) avoids the patterns 132, 231, and 321. a(n) is also the number of permutations pi of [n+1] such that s(pi) avoids the patterns 132, 312, and 321.
a(n) is the number of permutations of [n+1] that avoid the patterns 1342, 3142, 3412, and 3421. (End)
All binary self-dual codes of length 4n, for n>0, must contain at least a(n) codewords of weight 2n. More to the point, there will always be at least one, perhaps unique, binary self-dual code of length 4n that will contain exactly a(n) codewords that have a hamming weight equal to half the length of the code (2n). This code can be constructed by direct summing the unique binary self-dual code of length 2 (up to permutation equivalence) to itself an even number of times. A permutation equivalent code can be constructed by augmenting two identity matrices of length 2n together. - Nathan J. Russell, Nov 25 2018
Let [b/p] denote the Legendre symbol and 1/b denote the inverse of b mod p. Then, for m and n, where n is not divisible by p,
[(m+n)/p] == [n/p]*Sum_{k=0..(p-1)/2} (-m/(4*n))^k * a(k) (mod p).
Evaluating this identity for m = -1 and n = 1 demonstrates that, for all odd primes p, Sum_{k=0..(p-1)/2} (1/4)^k * a(k) is divisible by p. (End)
Number of vertices of the subgraph of the (2n-1)-dimensional hypercube induced by all bitstrings with n-1 or n many 1s. The middle levels conjecture asserts that this graph has a Hamilton cycle. - Torsten Muetze, Feb 11 2019
a(n) is the number of walks of length 2n from the origin with steps (1,1) and (1,-1) that stay on or above the x-axis. Equivalently, a(n) is the number of walks of length 2n from the origin with steps (1,0) and (0,1) that stay in the first octant. - Alexander Burstein, Dec 24 2019
Number of permutations of length n>0 avoiding the partially ordered pattern (POP) {3>1, 1>2} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first element is larger than the second element but smaller than the third elements. - Sergey Kitaev, Dec 08 2020
Also the number of integer compositions of 2n+1 with alternating sum 1, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. For example, the a(0) = 1 through a(2) = 6 compositions are:
(1) (2,1) (3,2)
(1,1,1) (1,2,2)
(2,2,1)
(1,1,2,1)
(2,1,1,1)
(1,1,1,1,1)
The following relate to these compositions:
- The unordered version is A000070.
- The alternating sum 0 version is counted by A088218, ranked by A344619.
- Including even indices gives A126869.
- The complement is counted by A202736.
Equivalently, a(n) counts binary numbers with 2n+1 digits and one more 1 than 0's. For example, the a(2) = 6 binary numbers are: 10011, 10101, 10110, 11001, 11010, 11100.
(End)
a(n) is the number of nx2 Young tableaux with a single horizontal wall between the first and second column. If there is a wall between two cells, the entries may be decreasing; see [Banderier, Wallner 2021].
Example for a(2)=6:
3 4 2 4 3 4 3|4 4|3 2|4
1|2, 1|3, 2|1, 1 2, 1 2, 1 3
a(n) is also the number of nx2 Young tableaux with n "walls" between the first and second column.
Example for a(2)=6:
3|4 2|4 4|3 3|4 4|3 4|2
1|2, 1|3, 1|2, 2|1, 2|1, 3|1 (End)
a(n)/4^n is the probability that a fair coin tossed 2n times will come up heads exactly n times and tails exactly n times, or that a random walk with steps of +-1 will return to the starting point after 2n steps (not necessarily for the first time). As n becomes large, this number asymptotically approaches 1/sqrt(n*Pi), using Stirling's approximation for n!.
a(n)/(4^n*(2n-1)) is the probability that a random walk with steps of +-1 will return to the starting point for the first time after 2n steps. The absolute value of the n-th term of A144704 is denominator of this fraction.
Considering all possible random walks of exactly 2n steps with steps of +-1, a(n)/(2n-1) is the number of such walks that return to the starting point for the first time after 2n steps. See the absolute values of A002420 or A284016 for these numbers. For comparison, as mentioned by Stefan Hollos, Dec 10 2007, a(n) is the number of such walks that return to the starting point after 2n steps, but not necessarily for the first time. (End)
Also the size of the shuffle product of two words of length n, such that the union of the two words consist of 2n distinct elements. - Robert C. Lyons, Mar 15 2023
|
|
REFERENCES
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 160.
Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 575, line -3, with a=b=n.
E. Deutsch and L. Shapiro, Seventeen Catalan identities, Bulletin of the Institute of Combinatorics and its Applications, 31, 31-38, 2001.
H. W. Gould, Combinatorial Identities, Morgantown, 1972, (3.66), page 30.
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, Second Ed., see Exercise 112.
M. Griffiths, The Backbone of Pascal's Triangle, United Kingdom Mathematics Trust (2008), 3-124.
Leonard Lipshitz and A. van der Poorten. "Rational functions, diagonals, automata and arithmetic." In Number Theory, Richard A. Mollin, ed., Walter de Gruyter, Berlin (1990): 339-358.
J. C. P. Miller, editor, Table of Binomial Coefficients. Royal Society Mathematical Tables, Vol. 3, Cambridge Univ. Press, 1954.
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).
|
|
LINKS
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
Dennis E. Davenport, Lara K. Pudwell, Louis W. Shapiro, and Leon C. Woodson, The Boundary of Ordered Trees, Journal of Integer Sequences, Vol. 18 (2015), Article 15.5.8.
L. W. Shapiro, S. Getu, Wen-Jin Woan and L. C. Woodson, The Riordan Group, Discrete Appl. Maths. 34 (1991) 229-239.
M. Wallner, Lattice Path Combinatorics, Diplomarbeit, Institut für Diskrete Mathematik und Geometrie der Technischen Universität Wien, 2013.
|
|
FORMULA
|
a(n)/(n+1) = A000108(n), the Catalan numbers.
G.f.: A(x) = (1 - 4*x)^(-1/2) = 1F0(1/2;;4x).
D-finite with recurrence: n*a(n) + 2*(1-2*n)*a(n-1)=0.
a(n) = 2^n/n! * Product_{k=0..n-1} (2*k+1).
Using Stirling's formula in A000142 it is easy to get the asymptotic expression a(n) ~ 4^n / sqrt(Pi * n). - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 07 2001
Integral representation as n-th moment of a positive function on the interval [0, 4]: a(n) = Integral_{x=0..4}(x^n*((x*(4-x))^(-1/2))/Pi), n=0, 1, ... This representation is unique. - Karol A. Penson, Sep 17 2001
a(n) = Max_{ (i+j)!/(i!j!) | 0<=i,j<=n }. - Benoit Cloitre, May 30 2002
E.g.f.: exp(2*x)*I_0(2x), where I_0 is Bessel function. - Michael Somos, Sep 08 2002
E.g.f.: I_0(2*x) = Sum a(n)*x^(2*n)/(2*n)!, where I_0 is Bessel function. - Michael Somos, Sep 09 2002
Determinant of n X n matrix M(i, j) = binomial(n+i, j). - Benoit Cloitre, Aug 28 2003
Given m = C(2*n, n), let f be the inverse function, so that f(m) = n. Letting q denote -log(log(16)/(m^2*Pi)), we have f(m) = ceiling( (q + log(q)) / log(16) ). - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Oct 30 2003
a(n+1) = Sum_{j=n..n*2+1} binomial(j, n). E.g., a(4) = C(7,3) + C(6,3) + C(5,3) + C(4,3) + C(3,3) = 35 + 20 + 10 + 4 + 1 = 70. - Jon Perry, Jan 20 2004
a(n) = (-1)^(n)*Sum_{j=0..(2*n)} (-1)^j*binomial(2*n, j)^2. - Helena Verrill (verrill(AT)math.lsu.edu), Jul 12 2004
a(n) = Sum_{k=0..n} binomial(2n+1, k)*sin((2n-2k+1)*Pi/2). - Paul Barry, Nov 02 2004
a(n-1) = (1/2)*(-1)^n*Sum_{0<=i, j<=n}(-1)^(i+j)*binomial(2n, i+j). - Benoit Cloitre, Jun 18 2005
G.f.: c(x)^2/(2*c(x)-c(x)^2) where c(x) is the g.f. of A000108. - Paul Barry, Feb 03 2006
G.f.: 1/(1-2x-2x^2/(1-2x-x^2/(1-2x-x^2/(1-2x-x^2/(1-... (continued fraction);
G.f.: 1/(1-2x/(1-x/(1-x/(1-x/(1-... (continued fraction). (End)
Let A(x) be the g.f. and B(x) = A(-x), then B(x) = sqrt(1-4*x*B(x)^2). - Vladimir Kruchinin, Jan 16 2011
a(n) = (-4)^n*sqrt(Pi)/(gamma((1/2-n))*gamma(1+n)). - Gerry Martens, May 03 2011
a(n) = upper left term in M^n, M = the infinite square production matrix:
2, 2, 0, 0, 0, 0, ...
1, 1, 1, 0, 0, 0, ...
1, 1, 1, 1, 0, 0, ...
1, 1, 1, 1, 1, 0, ...
1, 1, 1, 1, 1, 1, ....
a(n) = Hypergeometric([-n,-n],[1],1). - Peter Luschny, Nov 01 2011
G.f.: 1 + 2*x/(U(0)-2*x) where U(k) = 2*(2*k+1)*x + (k+1) - 2*(k+1)*(2*k+3)*x/U(k+1); (continued fraction, Euler's 1st kind, 1-step). - Sergei N. Gladkovskii, Jun 28 2012
a(n) = Sum_{k=0..n} binomial(n,k)^2*H(k)/(2*H(n)-H(2*n)), n>0, where H(n) is the n-th harmonic number. - Gary Detlefs, Mar 19 2013
G.f.: Q(0)*(1-4*x), where Q(k) = 1 + 4*(2*k+1)*x/( 1 - 1/(1 + 2*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 11 2013
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - 2*x*(2*k+1)/(2*x*(2*k+1) + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 24 2013
E.g.f.: E(0)/2, where E(k) = 1 + 1/(1 - 2*x/(2*x + (k+1)^2/(2*k+1)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 01 2013
Special values of Jacobi polynomials, in Maple notation: a(n) = 4^n*JacobiP(n,0,-1/2-n,-1). - Karol A. Penson, Jul 27 2013
a(n) = 2^(4*n)/((2*n+1)*Sum_{k=0..n} (-1)^k*C(2*n+1,n-k)/(2*k+1)). - Mircea Merca, Nov 12 2013
a(n) = C(2*n-1,n-1)*C(4*n^2,2)/(3*n*C(2*n+1,3)), n>0. - Gary Detlefs, Jan 02 2014
0 = a(n)*(16*a(n+1) - 6*a(n+2)) + a(n+1)*(-2*a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Sep 17 2014
G.f.: Sum_{n>=0} x^n/(1-x)^(2*n+1) * Sum_{k=0..n} C(n,k)^2 * x^k. - Paul D. Hanna, Nov 08 2014
a(n) = 4^n*hypergeom([-n,1/2],[1],1). - Peter Luschny, May 19 2015
a(n) = Sum_{k=0..floor(n/2)} C(n,k)*C(n-k,k)*2^(n-2*k). - Robert FERREOL, Aug 29 2015
a(n) ~ 4^n*(2-2/(8*n+2)^2+21/(8*n+2)^4-671/(8*n+2)^6+45081/(8*n+2)^8)/sqrt((4*n+1) *Pi). - Peter Luschny, Oct 14 2015
A(-x) = 1/x * series reversion( x*(2*x + sqrt(1 + 4*x^2)) ). Compare with the o.g.f. B(x) of A098616, which satisfies B(-x) = 1/x * series reversion( x*(2*x + sqrt(1 - 4*x^2)) ). See also A214377. - Peter Bala, Oct 19 2015
Sum_{n>=0} (-1)^n/a(n) = 4*(5 - sqrt(5)*log(phi))/25 = 0.6278364236143983844442267..., where phi is the golden ratio. - Ilya Gutkovskiy, Jul 04 2016
This sequence occurs as the closed-form expression for several binomial sums:
a(n) = Sum_{k = 0..2*n} (-1)^(n+k)*binomial(2*n,k)*binomial(2*n + 1,k).
a(n) = 2*Sum_{k = 0..2*n-1} (-1)^(n+k)*binomial(2*n - 1,k)*binomial(2*n,k) for n >= 1.
a(n) = 2*Sum_{k = 0..n-1} binomial(n - 1,k)*binomial(n,k) for n >= 1.
a(n) = Sum_{k = 0..2*n} (-1)^k*binomial(2*n,k)*binomial(x + k,n)*binomial(y + k,n) = Sum_{k = 0..2*n} (-1)^k*binomial(2*n,k)*binomial(x - k,n)*binomial(y - k,n) for arbitrary x and y.
For m = 3,4,5,... both Sum_{k = 0..m*n} (-1)^k*binomial(m*n,k)*binomial(x + k,n)*binomial(y + k,n) and Sum_{k = 0..m*n} (-1)^k*binomial(m*n,k)*binomial(x - k,n)*binomial(y - k,n) appear to equal Kronecker's delta(n,0).
a(n) = (-1)^n*Sum_{k = 0..2*n} (-1)^k*binomial(2*n,k)*binomial(x + k,n)*binomial(y - k,n) for arbitrary x and y.
For m = 3,4,5,... Sum_{k = 0..m*n} (-1)^k*binomial(m*n,k)*binomial(x + k,n)*binomial(y - k,n) appears to equal Kronecker's delta(n,0).
a(n) = Sum_{k = 0..2n} (-1)^k*binomial(2*n,k)*binomial(3*n - k,n)^2 = Sum_{k = 0..2*n} (-1)^k*binomial(2*n,k)* binomial(n + k,n)^2. (Gould, Vol. 7, 5.23).
a(n) = Sum_{k = 0..n} (-1)^(n+k)*binomial(2*n,n + k)*binomial(n + k,n)^2. (End)
Sum_{k>=0} a(k)/(p/q)^k = sqrt(p/(p-4q)) for q in N, p in Z/{-4q< (some p) <-2}.
...
Sum_{k>=0} a(k)/(-4)^k = 1/sqrt(2).
Sum_{k>=0} a(k)/(17/4)^k = sqrt(17).
Sum_{k>=0} a(k)/(18/4)^k = 3.
Sum_{k>=0} a(k)/5^k = sqrt(5).
Sum_{k>=0} a(k)/6^k = sqrt(3).
Sum_{k>=0} a(k)/8^k = sqrt(2).
...
Sum_{k>=0} a(k)/(p/q)^k = sqrt(p/(p-4q)) for p>4q.(End)
Boas-Buck recurrence: a(n) = (2/n)*Sum_{k=0..n-1} 4^(n-k-1)*a(k), n >= 1, a(0) = 1. Proof from a(n) = A046521(n, 0). See a comment there. - Wolfdieter Lang, Aug 10 2017
a(n) = Sum_{k = 0..n} (-1)^(n-k) * binomial(2*n+1, k) for n in N. - Rene Adad, Sep 30 2017
G.f. for {1/a(n)}: 4*(sqrt(4-x) + sqrt(x)*arcsin(sqrt(x)/2)) / (4-x)^(3/2).
E.g.f. for {1/a(n)}: 1 + exp(x/4)*sqrt(Pi*x)*erf(sqrt(x)/2)/2.
Sum_{n>=0} (-1)^n/a(n) = 4*(1/5 - arcsinh(1/2)/(5*sqrt(5))). (End)
a(n) = 2^(2*n)*Product_{k=1..2*n} k^((-1)^(k+1)) = A056040(2*n).
a(n) = 4^n*binomial(n-1/2,-1/2) = 4^n*GegenbauerC(n,1/4,1). - Gerry Martens, Oct 19 2022
Occurs on the right-hand side of the binomial sum identities Sum_{k = -n..n} (-1)^k * (n + x - k) * binomial(2*n, n+k)^2 = (x + n)*a(n) and Sum_{k = -n..n} (-1)^k * (n + x - k)^2 * binomial(2*n, n+k)^3 = x*(x + 2*n)*a(n) (x arbitrary). Compare with the identity: Sum_{k = -n..n} (-1)^k * binomial(2*n, n+k)^2 = a(n). - Peter Bala, Jul 31 2023
4^n*a(n) = Sum_{k = 0..2*n} (-1)^k*a(k)*a(2*n-k).
16^n = Sum_{k = 0..2*n} a(k)*a(2*n-k). (End)
a(n) = Sum_{k=0..floor(n/2)} binomial(n,2k)*binomial(2*k,k)*2^(n-2*k). (H. W. Gould) - Gary Detlefs, May 28 2024
a(n) = Sum_{k=0..2*n} (-1)^k*binomial(2n,k)*binomial(2*n+2*k,n+k)*3^(2*n-k). (H. W. Gould) (End)
|
|
EXAMPLE
|
G.f.: 1 + 2*x + 6*x^2 + 20*x^3 + 70*x^4 + 252*x^5 + 924*x^6 + ...
For n=2, a(2) = 4!/(2!)^2 = 24/4 = 6, and this is the middle coefficient of the binomial expansion (a + b)^4 = a^4 + 4a^3b + 6a^2b^2 + 4ab^3 + b^4. - Michael B. Porter, Jul 06 2016
|
|
MAPLE
|
with(combstruct); [seq(count([S, {S=Prod(Set(Z, card=i), Set(Z, card=i))}, labeled], size=(2*i)), i=0..20)];
with(combstruct); [seq(count([S, {S=Sequence(Union(Arch, Arch)), Arch=Prod(Epsilon, Sequence(Arch), Z)}, unlabeled], size=i), i=0..25)];
with(combstruct):bin := {B=Union(Z, Prod(B, B))}: seq (count([B, bin, unlabeled], size=n)*n, n=1..25); # Zerinvary Lajos, Dec 05 2007
A000984List := proc(m) local A, P, n; A := [1, 2]; P := [1];
for n from 1 to m - 2 do P := ListTools:-PartialSums([op(P), 2*P[-1]]);
A := [op(A), 2*P[-1]] od; A end: A000984List(28); # Peter Luschny, Mar 24 2022
|
|
MATHEMATICA
|
CoefficientList[Series[1/Sqrt[1-4x], {x, 0, 25}], x] (* Harvey P. Dale, Mar 14 2011 *)
|
|
PROG
|
(Magma) a:= func< n | Binomial(2*n, n) >; [ a(n) : n in [0..10]];
(PARI) A000984(n)=binomial(2*n, n) \\ much more efficient than (2n)!/n!^2. \\ M. F. Hasler, Feb 26 2014
(PARI) fv(n, p)=my(s); while(n\=p, s+=n); s
(PARI) fv(n, p)=my(s); while(n\=p, s+=n); s
(Haskell)
(Python)
from __future__ import division
for n in range(10**3):
b = b*(4*n+2)//(n+1)
(GAP) List([1..1000], n -> Binomial(2*n, n)); # Muniru A Asiru, Jan 30 2018
|
|
CROSSREFS
|
Bisection of A001405 and of A226302. See also A025565, the same ordered partitions but without all in which are two successive zeros: 11110 (5), 11200 (18), 13000 (2), 40000 (0) and 22000 (1), total 26 and A025565(4)=26.
See A261009 for a conjecture about this sequence.
The Apéry-like numbers [or Apéry-like sequences, Apery-like numbers, Apery-like sequences] include A000172, A000984, A002893, A002895, A005258, A005259, A005260, A006077, A036917, A063007, A081085, A093388, A125143 (apart from signs), A143003, A143007, A143413, A143414, A143415, A143583, A183204, A214262, A219692,A226535, A227216, A227454, A229111 (apart from signs), A260667, A260832, A262177, A264541, A264542, A279619, A290575, A290576. (The term "Apery-like" is not well-defined.)
Sum_{k = 0..n} C(n,k)^m for m = 1..12: A000079, A000984, A000172, A005260, A005261, A069865, A182421, A182422, A182446, A182447, A342294, A342295.
|
|
KEYWORD
|
nonn,easy,core,nice,walk,frac
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A106856
|
|
Primes of the form x^2 + xy + 2y^2, with x and y nonnegative.
|
|
+10
575
|
|
|
2, 11, 23, 37, 43, 53, 71, 79, 107, 109, 127, 137, 149, 151, 163, 193, 197, 211, 233, 239, 263, 281, 317, 331, 337, 373, 389, 401, 421, 431, 443, 463, 487, 491, 499, 541, 547, 557, 569, 599, 613, 617, 641, 653, 659, 673, 683, 739, 743, 751, 757, 809, 821
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Discriminant=-7. Binary quadratic forms ax^2 + bxy + cy^2 have discriminant d = b^2 - 4ac.
Consider sequences of primes produced by forms with -100<d<0, abs(b)<=a<=c and gcd(a,b,c)=1. When b is not zero, then there are two cases to consider: (1) nonnegative x and y, and (2) x and y any integers. These restrictions yield 203 sequences of prime numbers, which are organized by discriminant below.
The Mathematica function QuadPrimes2 is useful for finding the primes less than "lim" represented by the positive definite quadratic form ax^2 + bxy + cy^2 for any a, b and c satisfying a>0, c>0, and discriminant d<0. It does this by examining all x>=0 and y>=0 in the ellipse ax^2 + bxy + cy^2 <= lim. To find the primes generated by positive and negative x and y, compute the union of QuadPrimes2[a,b,c,lim] and QuadPrimes2[a,-b,c,lim]. - T. D. Noe, Sep 01 2009
For other programs see the "Binary Quadratic Forms and OEIS" link.
|
|
REFERENCES
|
David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.
L. E. Dickson, History of the Theory of Numbers, Vol. 3, Chelsea, 1923.
|
|
LINKS
|
|
|
MATHEMATICA
|
QuadPrimes2[a_, b_, c_, lmt_] := Module[{p, d, lst = {}, xMax, yMax}, d = b^2 - 4a*c; If[a > 0 && c > 0 && d < 0, xMax = Sqrt[lmt/a]*(1+Abs[b]/Floor[Sqrt[-d]])]; Do[ If[ 4c*lmt + d*x^2 >= 0, yMax = ((-b)*x + Sqrt[4c*lmt + d*x^2])/(2c), yMax = 0 ]; Do[p = a*x^2 + b*x*y + c*y^2; If[ PrimeQ[ p] && p <= lmt && !MemberQ[ lst, p], AppendTo[ lst, p]], {y, 0, yMax}], {x, 0, xMax}]; Sort[ lst]];
QuadPrimes2[1, 1, 2, 1000]
(This is a corrected version of the old, incorrect, program QuadPrimes. - N. J. A. Sloane, Jun 15 2014)
max = 1000; Table[yy = {y, 1, Floor[Sqrt[8 max - 7 x^2]/4 - x/4]}; Table[ x^2 + x y + 2 y^2, yy // Evaluate], {x, 0, Floor[Sqrt[max]]}] // Flatten // Union // Select[#, PrimeQ]& (* Jean-François Alcover, Oct 04 2018 *)
|
|
PROG
|
(PARI) list(lim)=my(q=Qfb(1, 1, 2), v=List([2])); forprime(p=2, lim, if(vecmin(qfbsolve(q, p))>0, listput(v, p))); Vec(v) \\ Charles R Greathouse IV, Aug 05 2016
|
|
CROSSREFS
|
Discriminants in the range -3 to -100: A007645 (d=-3), A002313 (d=-4), A045373, A106856 (d=-7), A033203 (d=-8), A056874, A106857 (d=-11), A002476 (d=-12), A033212, A106858-A106861 (d=-15), A002144, A002313 (d=-16), A106862-A106863 (d=-19), A033205, A106864-A106865 (d=-20), A106866-A106869 (d=-23), A033199, A084865 (d=-24), A002476, A106870 (d=-27), A033207 (d=-28), A033221, A106871-A106874 (d=-31), A007519, A007520, A106875-A106876 (d=-32), A106877-A106881 (d=-35), A040117, A068228, A106882 (d=-36), A033227, A106883-A106888 (d=-39), A033201, A106889 (d=-40), A106890-A106891 (d=-43), A033209, A106282, A106892-A106893 (d=-44), A033232, A106894-A106900 (d=-47), A068229 (d=-48), A106901-A106904 (d=-51), A033210, A106905-A106906 (d=-52), A033235, A106907-A106913 (d=-55), A033211, A106914-A106917 (d=-56), A106918-A106922 (d=-59), A033212, A106859 (d=-60), A106923-A106930 (d=-63), A007521, A106931 (d=-64), A106932-A106933 (d=-67), A033213, A106934-A106938 (d=-68), A033246, A106939-A106948 (d=-71), A106949-A106950 (d=-72), A033212, A106951-A106952 (d=-75), A033214, A106953-A106955 (d=-76), A033251, A106956-A106962 (d=-79), A047650, A106963-A106965 (d=-80), A106966-A106970 (d=-83), A033215, A102271, A102273, A106971-A106974 (d=-84), A033256, A106975-A106983 (d=-87), A033216, A106984 (d=-88), A106985-A106989 (d=-91), A033217 (d=-92), A033206, A106990-A107001 (d=-95), A107002-A107008 (d=-96), A107009-A107013 (d=-99).
For a more comprehensive list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Removed old Mathematica programs - T. D. Noe, Sep 09 2009
Edited (pointed out error in QuadPrimes, added new version of program, checked and extended b-file). - N. J. A. Sloane, Jun 06 2014
|
|
STATUS
|
approved
|
|
|
|
|
A000670
|
|
Fubini numbers: number of preferential arrangements of n labeled elements; or number of weak orders on n labeled elements; or number of ordered partitions of [n].
(Formerly M2952 N1191)
|
|
+10
553
|
|
|
1, 1, 3, 13, 75, 541, 4683, 47293, 545835, 7087261, 102247563, 1622632573, 28091567595, 526858348381, 10641342970443, 230283190977853, 5315654681981355, 130370767029135901, 3385534663256845323, 92801587319328411133, 2677687796244384203115
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Number of ways n competitors can rank in a competition, allowing for the possibility of ties.
Also number of asymmetric generalized weak orders on n points.
Also called the ordered Bell numbers.
A weak order is a relation that is transitive and complete.
Called Fubini numbers by Comtet: counts formulas in Fubini theorem when switching the order of summation in multiple sums. - Olivier Gérard, Sep 30 2002 [Named after the Italian mathematician Guido Fubini (1879-1943). - Amiram Eldar, Jun 17 2021]
If the points are unlabeled then the answer is a(0) = 1, a(n) = 2^(n-1) (cf. A011782).
For n>0, a(n) is the number of elements in the Coxeter complex of type A_{n-1}. The corresponding sequence for type B is A080253 and there one can find a worked example as well as a geometric interpretation. - Tim Honeywill and Paul Boddington, Feb 10 2003
Also number of labeled (1+2)-free posets. - Detlef Pauly, May 25 2003
Also the number of chains of subsets starting with the empty set and ending with a set of n distinct objects. - Andrew Niedermaier, Feb 20 2004
Stirling transform of A007680(n) = [3,10,42,216,...] gives [3,13,75,541,...].
Stirling transform of a(n) = [1,3,13,75,...] is A083355(n) = [1,4,23,175,...].
Stirling transform of A000142(n) = [1,2,6,24,120,...] is a(n) = [1,3,13,75,...].
Stirling transform of A005359(n-1) = [1,0,2,0,24,0,...] is a(n-1) = [1,1,3,13,75,...].
Stirling transform of A005212(n-1) = [0,1,0,6,0,120,0,...] is a(n-1) = [0,1,3,13,75,...].
(End)
Unreduced denominators in convergent to log(2) = lim_{n->infinity} n*a(n-1)/a(n).
a(n) is congruent to a(n+(p-1)p^(h-1)) (mod p^h) for n >= h (see Barsky).
Stirling-Bernoulli transform of 1/(1-x^2). - Paul Barry, Apr 20 2005
This is the sequence of moments of the probability distribution of the number of tails before the first head in a sequence of fair coin tosses. The sequence of cumulants of the same probability distribution is A000629. That sequence is twice the result of deletion of the first term of this sequence. - Michael Hardy (hardy(AT)math.umn.edu), May 01 2005
With p(n) = the number of integer partitions of n, p(i) = the number of parts of the i-th partition of n, d(i) = the number of different parts of the i-th partition of n, p(j,i) = the j-th part of the i-th partition of n, m(i,j) = multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i=1..p(n)} (n!/(Product_{j=1..p(i)} p(i,j)!)) * (p(i)!/(Product_{j=1..d(i)} m(i,j)!)). - Thomas Wieder, May 18 2005
The number of chains among subsets of [n]. The summed term in the new formula is the number of such chains of length k. - Micha Hofri (hofri(AT)wpi.edu), Jul 01 2006
Occurs also as first column of a matrix-inversion occurring in a sum-of-like-powers problem. Consider the problem for any fixed natural number m>2 of finding solutions to the equation Sum_{k=1..n} k^m = (k+1)^m. Erdős conjectured that there are no solutions for n, m > 2. Let D be the matrix of differences of D[m,n] := Sum_{k=1..n} k^m - (k+1)^m. Then the generating functions for the rows of this matrix D constitute a set of polynomials in n (for varying n along columns) and the m-th polynomial defining the m-th row. Let GF_D be the matrix of the coefficients of this set of polynomials. Then the present sequence is the (unsigned) first column of GF_D^-1. - Gottfried Helms, Apr 01 2007
Assuming A = log(2), D is d/dx and f(x) = x/(exp(x)-1), we have a(n) = (n!/2*A^(n+1)) Sum_{k=0..n} (A^k/k!) D^n f(-A) which gives Wilf's asymptotic value when n tends to infinity. Equivalently, D^n f(-a) = 2*( A*a(n) - 2*a(n-1) ). - Martin Kochanski (mjk(AT)cardbox.com), May 10 2007
A slightly more transparent interpretation of a(n) is as the number of 'factor sequences' of N for the case in which N is a product of n distinct primes. A factor sequence of N of length k is of the form 1 = x(1), x(2), ..., x(k) = N, where {x(i)} is an increasing sequence such that x(i) divides x(i+1), i=1,2,...,k-1. For example, N=70 has the 13 factor sequences {1,70}, {1,2,70}, {1,5,70}, {1,7,70}, {1,10,70}, {1,14,70}, {1,35,70}, {1,2,10,70}, {1,2,14,70}, {1,5,10,70}, {1,5,35,70}, {1,7,14,70}, {1,7,35,70}. - Martin Griffiths, Mar 25 2009
If f(x) = Sum_{n>=0} c(n)*x^n converges for every x, then Sum_{n>=0} f(n*x)/2^(n+1) = Sum_{n>=0} c(n)*a(n)*x^n. Example: Sum_{n>=0} exp(n*x)/2^(n+1) = Sum_{n>=0} a(n)*x^n/n! = 1/(2-exp(x)) = e.g.f. - Miklos Kristof, Nov 02 2009
It appears that the prime numbers greater than 3 in this sequence (13, 541, 47293, ...) are of the form 4n+1. - Paul Muljadi, Jan 28 2011
The Fi1 and Fi2 triangle sums of A028246 are given by the terms of this sequence. For the definitions of these triangle sums, see A180662. - Johannes W. Meijer, Apr 20 2011
The modified generating function A(x) = 1/(2-exp(x))-1 = x + 3*x^2/2! + 13*x^3/3! + ... satisfies the autonomous differential equation A' = 1 + 3*A + 2*A^2 with initial condition A(0) = 0. Applying [Bergeron et al., Theorem 1] leads to two combinatorial interpretations for this sequence: (A) a(n) gives the number of plane-increasing 0-1-2 trees on n vertices, where vertices of outdegree 1 come in 3 colors and vertices of outdegree 2 come in 2 colors. (B) a(n) gives the number of non-plane-increasing 0-1-2 trees on n vertices, where vertices of outdegree 1 come in 3 colors and vertices of outdegree 2 come in 4 colors. Examples are given below. - Peter Bala, Aug 31 2011
Starting with offset 1 = the eigensequence of A074909 (the beheaded Pascal's triangle), and row sums of triangle A208744. - Gary W. Adamson, Mar 05 2012
a(n) = number of words of length n on the alphabet of positive integers for which the letters appearing in the word form an initial segment of the positive integers. Example: a(2) = 3 counts 11, 12, 21. The map "record position of block containing i, 1<=i<=n" is a bijection from lists of sets on [n] to these words. (The lists of sets on [2] are 12, 1/2, 2/1.) - David Callan, Jun 24 2013
This sequence was the subject of one of the earliest uses of the database. Don Knuth, who had a computer printout of the database prior to the publication of the 1973 Handbook, wrote to N. J. A. Sloane on May 18, 1970, saying: "I have just had my first real 'success' using your index of sequences, finding a sequence treated by Cayley that turns out to be identical to another (a priori quite different) sequence that came up in connection with computer sorting." A000670 is discussed in Exercise 3 of Section 5.3.1 of The Art of Computer Programming, Vol. 3, 1973. - N. J. A. Sloane, Aug 21 2014
Ramanujan gives a method of finding a continued fraction of the solution x of an equation 1 = x + a2*x^2 + ... and uses log(2) as the solution of 1 = x + x^2/2 + x^3/6 + ... as an example giving the sequence of simplified convergents as 0/1, 1/1, 2/3, 9/13, 52/75, 375/541, ... of which the sequence of denominators is this sequence, while A052882 is the numerators. - Michael Somos, Jun 19 2015
For n>=1, a(n) is the number of Dyck paths (A000108) with (i) n+1 peaks (UD's), (ii) no UUDD's, and (iii) at least one valley vertex at every nonnegative height less than the height of the path. For example, a(2)=3 counts UDUDUD (of height 1 with 2 valley vertices at height 0), UDUUDUDD, UUDUDDUD. These paths correspond, under the "glove" or "accordion" bijection, to the ordered trees counted by Cayley in the 1859 reference, after a harmless pruning of the "long branches to a leaf" in Cayley's trees. (Cayley left the reader to infer the trees he was talking about from examples for small n and perhaps from his proof.) - David Callan, Jun 23 2015
Fix a set X and define two distance functions d,D on X to be metrically equivalent when d(x_1,y_1) <= d(x_2,y_2) iff D(x_1,y_1) <= D(x_2,y_2) for all x_1, y_1, x_2, y_2 in X.
Now suppose that we fix a function f from unordered pairs of distinct elements of X to {1,...,n}. Then choose positive real numbers d_1 <= ... <= d_n such that d(x,y) = d_{f(x,y)}; the set of all possible choices of the d_i's makes this an n-parameter family of distance functions on X. (The simplest example of such a family occurs when n is a triangular number: When that happens, write n = (k 2). Then the set of all distance functions on X, when |X| = k, is such a family.) The number of such distance functions, up to metric equivalence, is a(n).
It is easy to see that an equivalence class of distance functions gives rise to a well-defined weak order on {d_1, ..., d_n}. To see that any weak order is realizable, choose distances from the set of integers {n-1, ..., 2n-2} so that the triangle inequality is automatically satisfied. (End)
a(n) is the number of rooted labeled forests on n nodes that avoid the patterns 213, 312, and 321. - Kassie Archer, Aug 30 2018
Also the number of semantic different assignments to n variables (x_1, ..., x_n) including simultaneous assignments. From the example given by Joerg Arndt (Mar 18 2014), this is easely seen by replacing
"{i}" by "x_i := expression_i(x_1, ..., x_n)",
"{i, j}" by "x_i, x_j := expression_i(x_1, .., x_n), expression_j(x_1, ..., x_n)", i.e., simultaneous assignment to two different variables (i <> j),
similar for simultaneous assignments to more variables, and
"<" by ";", i.e., the sequential constructor. These examples are directly related to "Number of ways n competitors can rank in a competition, allowing for the possibility of ties." in the first comment.
From this also the number of different mean definitions as obtained by iteration of n different mean functions on n initial values. Examples:
the AGM(x1,x2) = AGM(x2,x1) is represented by {arithmetic mean, geometric mean}, i.e., simultaneous assignment in any iteration step;
Archimedes's scheme (for Pi) is represented by {geometric mean} < {harmonic mean}, i.e., sequential assignment in any iteration step;
the geometric mean of two values can also be observed by {arithmetic mean, harmonic mean};
the AGHM (as defined in A319215) is represented by {arithmetic mean, geometric mean, harmonic mean}, i.e., simultaneous assignment, but there are 12 other semantic different ways to assign the values in an AGHM scheme.
By applying power means (also called Holder means) this can be extended to any value of n. (End)
Total number of faces of all dimensions in the permutohedron of order n. For example, the permutohedron of order 3 (a hexagon) has 6 vertices + 6 edges + 1 2-face = 13 faces, and the permutohedron of order 4 (a truncated octahedron) has 24 vertices + 36 edges + 14 2-faces + 1 3-face = 75 faces. A001003 is the analogous sequence for the associahedron. - Noam Zeilberger, Dec 08 2019
Number of odd multinomial coefficients N!/(a_1!*a_2!*...*a_k!). Here each a_i is positive, and Sum_{i} a_i = N (so 2^{N-1} multinomial coefficients in all), where N is any positive integer whose binary expansion has n 1's. - Richard Stanley, Apr 05 2022 (edited Oct 19 2022)
Conjecture: Let k be a positive integer. The sequence obtained by reducing a(n) modulo k is eventually periodic with the period dividing phi(k) = A000010(k). For example, modulo 16 we obtain the sequence [1, 1, 3, 13, 11, 13, 11, 13, 11, 13, ...], with an apparent period of 2 beginning at a(4). Cf. A354242.
More generally, we conjecture that the same property holds for integer sequences having an e.g.f. of the form G(exp(x) - 1), where G(x) is an integral power series. (End)
a(n) is the number of ways to form a permutation of [n] and then choose a subset of its descent set. - Geoffrey Critzer, Apr 29 2023
This is the Akiyama-Tanigawa transform of A000079, the powers of two. - Shel Kaphan, May 02 2024
|
|
REFERENCES
|
Mohammad K. Azarian, Geometric Series, Problem 329, Mathematics and Computer Education, Vol. 30, No. 1, Winter 1996, p. 101. Solution published in Vol. 31, No. 2, Spring 1997, pp. 196-197.
Norman Biggs, E. Keith Lloyd and Robin J. Wilson, Graph Theory 1736-1936, Oxford, 1976, p. 44 (P(x)).
Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 183 (see R_n).
Kenneth S. Brown, Buildings, Springer-Verlag, 1988.
Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 228.
Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 13, pp 4, Ellipses, Paris 2008.
P. J. Freyd, On the size of Heyting semi-lattices, preprint, 2002.
Ian P. Goulden and David M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983.
Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd Ed., 1994, exercise 7.44 (pp. 378, 571).
Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
Donald E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, 1973, Section 5.3.1, Problem 3.
M. Muresan, Generalized Fubini numbers, Stud. Cerc. Mat., Vol. 37, No. 1 (1985), pp. 70-76.
Paul Peart, Hankel determinants via Stieltjes matrices. Proceedings of the Thirty-first Southeastern International Conference on Combinatorics, Graph Theory and Computing (Boca Raton, FL, 2000). Congr. Numer. 144 (2000), 153-159.
S. Ramanujan, Notebooks, Tata Institute of Fundamental Research, Bombay 1957 Vol. 1, see page 19.
Ulrike Sattler, Decidable classes of formal power series with nice closure properties, Diplomarbeit im Fach Informatik, Univ. Erlangen - Nuernberg, Jul 27 1994.
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).
Richard P. Stanley, Enumerative Combinatorics, Wadsworth, Vol. 1, 1986; see Example 3.15.10, p. 146.
Jack van der Elsen, Black and White Transformations, Shaker Publishing, Maastricht, 2005, p. 18.
|
|
LINKS
|
Jean-Christophe Aval, Adrien Boussicault, and Philippe Nadeau, Tree-like Tableaux, Electronic Journal of Combinatorics, Vol. 20, No. 4 (2013), #P34.
François Bergeron, Philippe Flajolet, and Bruno Salvy, Varieties of increasing trees, in J. C. Raoult (ed.), CAAP '92, Colloquium on Trees in Algebra and Programming, CAAP 1992, Lecture Notes in Computer Science, Vol. 581, Springer, Berlin, Heidelberg, 1992, pp. 24-48; alternative link.
Nantel Bergeron, Laura Colmenarejo, Shu Xiao Li, John Machacek, Robin Sulzgruber, Mike Zabrocki, Adriano Garsia, Marino Romero, Don Qui, and Nolan Wallach, Super Harmonics and a representation theoretic model for the Delta conjecture, A summary of the open problem sessions of Jan 24, 2019, Representation Theory Connections to (q,t)-Combinatorics (19w5131), Banff, BC, Canada.
Olivier Bodini, Antoine Genitrini, and Mehdi Naima, Ranked Schröder Trees, arXiv:1808.08376 [cs.DS], 2018.
Anders Claesson and T. Kyle Petersen, Conway's napkin problem, Amer. Math. Monthly, Vol. 114, No. 3 (2007), pp. 217-231.
Elliott Mendelson, Races with Ties, Math. Mag., Vol. 55, No. 3 (1982), pp. 170-175.
Moshe Mor and Aviezri S. Fraenkel, Cayley permutations, Discrete Math., Vol. 48, No. 1 (1984), pp. 101-112.
Roger B. Nelsen and Harvey Schmidt, Jr., Chains in power sets, Math. Mag., Vol. 64, No. 1 (1991), pp. 23-31.
Vincent Pilaud and Viviane Pons, Permutrees, arXiv preprint arXiv:1606.09643 [math.CO], 2016-2017.
Helmut Prodinger, Ordered Fibonacci partitions, Canad. Math. Bull. 26 (1983), no. 3, 312--316. MR0703402 (84m:05012). [See F_n on page 312.]
|
|
FORMULA
|
a(n) = Sum_{k=0..n} k! * StirlingS2(n,k) (whereas the Bell numbers A000110(n) = Sum_{k=0..n} StirlingS2(n,k)).
E.g.f.: 1/(2-exp(x)).
a(n) = Sum_{k=1..n} binomial(n, k)*a(n-k), a(0) = 1.
The e.g.f. y(x) satisfies y' = 2*y^2 - y.
a(n) is asymptotic to (1/2)*n!*log_2(e)^(n+1), where log_2(e) = 1.442695... [Barthelemy80, Wilf90].
For n >= 1, a(n) = (n!/2) * Sum_{k=-infinity..infinity} of (log(2) + 2 Pi i k)^(-n-1). - Dean Hickerson
a(n) = ((x*d/dx)^n)(1/(2-x)) evaluated at x=1. - Karol A. Penson, Sep 24 2001
a(n) = Sum_{k=0..n} (-1)^k*k!*Stirling2(n+1, k+1)*(1+(-1)^k)/2. - Paul Barry, Apr 20 2005
a(n) = Sum_{k=0..n} k!*( Stirling2(n+2, k+2) - Stirling2(n+1, k+2) ). - Micha Hofri (hofri(AT)wpi.edu), Jul 01 2006
Recurrence: 2*a(n) = (a+1)^n where superscripts are converted to subscripts after binomial expansion - reminiscent of Bernoulli numbers' B_n = (B+1)^n. - Martin Kochanski (mjk(AT)cardbox.com), May 10 2007
a(n) = (-1)^n * n! * Laguerre(n,P((.),2)), umbrally, where P(j,t) are the polynomials in A131758. - Tom Copeland, Sep 27 2007
Formula in terms of the hypergeometric function, in Maple notation: a(n) = hypergeom([2,2...2],[1,1...1],1/2)/4, n=1,2..., where in the hypergeometric function there are n upper parameters all equal to 2 and n-1 lower parameters all equal to 1 and the argument is equal to 1/2. Example: a(4) = evalf(hypergeom([2,2,2,2],[1,1,1],1/2)/4) = 75. - Karol A. Penson, Oct 04 2007
Analogy with the Bernoulli numbers.
We enlarge upon the above comment of M. Kochanski.
The Bernoulli polynomials B_n(x), n = 0,1,..., are given by the formula
(1)... B_n(x) := Sum_{k=0..n} binomial(n,k)*B(k)*x^(n-k),
where B(n) denotes the sequence of Bernoulli numbers B(0) = 1,
B(1) = -1/2, B(2) = 1/6, B(3) = 0, ....
By analogy, we associate with the present sequence an Appell sequence of polynomials {P_n(x)} n >= 0 defined by
(2)... P_n(x) := Sum_{k=0..n} binomial(n,k)*a(k)*x^(n-k).
These polynomials have similar properties to the Bernoulli polynomials.
The first few values are P_0(x) = 1, P_1(x) = x + 1,
P_2(x) = x^2 + 2*x + 3, P_3(x) = x^3 + 3*x^2 + 9*x + 13 and
P_4(x) = x^4 + 4*x^3 + 18*x^2 + 52*x + 75. See A154921 for the triangle of coefficients of these polynomials.
The e.g.f. for this polynomial sequence is
(3)... exp(x*t)/(2 - exp(t)) = 1 + (x + 1)*t + (x^2 + 2*x + 3)*t^2/2! + ....
The polynomials satisfy the difference equation
(4)... 2*P_n(x - 1) - P_n(x) = (x - 1)^n,
and so may be used to evaluate the weighted sums of powers of integers
(1/2)*1^m + (1/2)^2*2^m + (1/2)^3*3^m + ... + (1/2)^(n-1)*(n-1)^m
via the formula
(5)... Sum_{k=1..n-1} (1/2)^k*k^m = 2*P_m(0) - (1/2)^(n-1)*P_m(n),
analogous to the evaluation of the sums 1^m + 2^m + ... + (n-1)^m in terms of Bernoulli polynomials.
This last result can be generalized to
(6)... Sum_{k=1..n-1} (1/2)^k*(k+x)^m = 2*P_m(x)-(1/2)^(n-1)*P_m(x+n).
For more properties of the polynomials P_n(x), refer to A154921.
For further information on weighted sums of powers of integers and the associated polynomial sequences, see A162312.
The present sequence also occurs in the evaluation of another sum of powers of integers. Define
(7)... S_m(n) := Sum_{k=1..n-1} (1/2)^k*((n-k)*k)^m, m = 1,2,....
Then
(8)... S_m(n) = (-1)^m *[2*Q_m(-n) - (1/2)^(n-1)*Q_m(n)],
where Q_m(x) are polynomials in x given by
(9)... Q_m(x) = Sum_{k=0..m} a(m+k)*binomial(m,k)*x^(m-k).
The first few values are Q_1(x) = x + 3, Q_2(x) = 3*x^2 + 26*x + 75
and Q_3(x) = 13*x^3 + 225*x^2 + 1623*x + 4683.
For example, m = 2 gives
(10)... S_2(n) := Sum_{k=1..n-1} (1/2)^k*((n-k)*k)^2
= 2*(3*n^2 - 26*n + 75) - (1/2)^(n-1)*(3*n^2 + 26*n + 75).
(End)
G.f.: 1/(1-x/(1-2*x/(1-2*x/(1-4*x/(1-3*x/(1-6*x/(1-4*x/(1-8*x/(1-5*x/(1-10*x/(1-6*x/(1-... (continued fraction); coefficients of continued fraction are given by floor((n+2)/2)*(3-(-1)^n)/2 (A029578(n+2)). - Paul Barry, Mar 30 2010
G.f.: 1/(1-x-2*x^2/(1-4*x-8*x^2/(1-7*x-18*x^2/(1-10*x-32*x^2/(1../(1-(3*n+1)*x-2*(n+1)^2*x^2/(1-... (continued fraction). - Paul Barry, Jun 17 2010
G.f.: A(x) = Sum_{n>=0} n!*x^n / Product_{k=1..n} (1-k*x). - Paul D. Hanna, Jul 20 2011
The adjusted e.g.f. A(x) := 1/(2-exp(x))-1, has inverse function A(x)^-1 = Integral_{t=0..x} 1/((1+t)*(1+2*t)). Applying [Dominici, Theorem 4.1] to invert the integral yields a formula for a(n): Let f(x) = (1+x)*(1+2*x). Let D be the operator f(x)*d/dx. Then a(n) = D^(n-1)(f(x)) evaluated at x = 0. Compare with A050351. - Peter Bala, Aug 31 2011
a(n) = D^n*(1/(1-x)) evaluated at x = 0, where D is the operator (1+x)*d/dx. Cf. A052801. - Peter Bala, Nov 25 2011
Continued fractions:
G.f.: 1+x/(1-x+2*x*(x-1)/(1+3*x*(2*x-1)/(1+4*x*(3*x-1)/(1+5*x*(4*x-1)/(1+... or 1+x/(U(0)-x), U(k) = 1+(k+2)*(k*x+x-1)/U(k+1).
E.g.f.: 1 + x/(G(0)-2*x) where G(k) = x + k + 1 - x*(k+1)/G(k+1).
E.g.f. (2 - 2*x)*(1 - 2*x^3/(8*x^2 - 4*x + (x^2 - 4*x + 2)*G(0)))/(x^2 - 4*x + 2) where G(k) = k^2 + k*(x+4) + 2*x + 3 - x*(k+1)*(k+3)^2 /G(k+1).
G.f.: 1 + x/G(0) where G(k) = 1 - 3*x*(k+1) - 2*x^2*(k+1)*(k+2)/G(k+1).
G.f.: 1/G(0) where G(k) = 1 - x*(k+1)/( 1 - 2*x*(k+1)/G(k+1) ).
G.f.: 1 + x/Q(0), where Q(k) = 1 - 3*x*(2*k+1) - 2*x^2*(2*k+1)*(2*k+2)/( 1 - 3*x*(2*k+2) - 2*x^2*(2*k+2)*(2*k+3)/Q(k+1) ).
G.f.: T(0)/(1-x), where T(k) = 1 - 2*x^2*(k+1)^2/( 2*x^2*(k+1)^2 - (1-x-3*x*k)*(1-4*x-3*x*k)/T(k+1) ). (End)
a(n) is always odd. For odd prime p and n >= 1, a((p-1)*n) = 0 (mod p). - Peter Bala, Sep 18 2013
a(n) = log(2)* Integral_{x>=0} floor(x)^n * 2^(-x) dx. - Peter Bala, Feb 06 2015
For n > 0, a(n) = Re(polygamma(n, i*log(2)/(2*Pi))/(2*Pi*i)^(n+1)) - n!/(2*log(2)^(n+1)). - Vladimir Reshetnikov, Oct 15 2015
a(n) = Sum_{k=1..n} (k*b2(k-1)*(k)!*Stirling2(n, k)), n>0, a(0)=1, where b2(n) is the n-th Bernoulli number of the second kind. - Vladimir Kruchinin, Nov 21 2016
Conjecture: a(n) = Sum_{k=0..2^(n-1)-1} A284005(k) for n > 0 with a(0) = 1. - Mikhail Kurkov, Jul 08 2018
For n > 0, a(n) = -(-1)^n / 2 * PHI(2, -n, 0), where PHI(z, s, a) is the Lerch zeta function. - Federico Provvedi, Sep 05 2020
a(n) = Sum_{s in S_n} Product_{i=1..n} binomial(i,s(i)-1), where s ranges over the set S_n of permutations of [n]. - Jose A. Rodriguez, Feb 02 2021
Sum_{n>=0} 1/a(n) = 2.425674839121428857970063350500499393706641093287018840857857170864211946122664... - Vaclav Kotesovec, Jun 17 2021
The following identities hold for sums over Stirling numbers of the second kind with even or odd second argument:
a(n) = 2 * Sum_{k=0..floor(n/2)} ((2k)! * Stirling2(n,2*k) ) - (-1)^n = 2*A052841-(-1)^n
a(n) = 2 * Sum_{k=0..floor(n/2)} ((2k+1)!* Stirling2(n,2*k+1))+ (-1)^n = 2*A089677+(-1)^n
a(n) = Sum_{k=1..floor((n+1)/2)} ((2k-1)!* Stirling2(n+1,2*k))
a(n) = Sum_{k=0..floor((n+1)/2)} ((2k)! * Stirling2(n+1,2*k+1)). (End)
|
|
EXAMPLE
|
Let the points be labeled 1,2,3,...
a(2) = 3: 1<2, 2<1, 1=2.
a(3) = 13 from the 13 arrangements: 1<2<3, 1<3<2, 2<1<3, 2<3<1, 3<1<2, 3<2<1, 1=2<3 1=3<2, 2=3<1, 1<2=3, 2<1=3, 3<1=2, 1=2=3.
Three competitors can finish in 13 ways: 1,2,3; 1,3,2; 2,1,3; 2,3,1; 3,1,2; 3,2,1; 1,1,3; 2,2,1; 1,3,1; 2,1,2; 3,1,1; 1,2,2; 1,1,1.
a(3) = 13. The 13 plane increasing 0-1-2 trees on 3 vertices, where vertices of outdegree 1 come in 3 colors and vertices of outdegree 2 come in 2 colors, are:
........................................................
........1 (x3 colors).....1(x2 colors)....1(x2 colors)..
........|................/.\............./.\............
........2 (x3 colors)...2...3...........3...2...........
........|...............................................
........3...............................................
......====..............====............====............
.Totals 9......+..........2....+..........2....=..13....
........................................................
a(4) = 75. The 75 non-plane increasing 0-1-2 trees on 4 vertices, where vertices of outdegree 1 come in 3 colors and vertices of outdegree 2 come in 4 colors, are:
...............................................................
.....1 (x3).....1(x4).......1(x4).....1(x4)........1(x3).......
.....|........./.\........./.\......./.\...........|...........
.....2 (x3)...2...3.(x3)..3...2(x3).4...2(x3)......2(x4).......
.....|.............\...........\.........\......../.\..........
.....3.(x3).........4...........4.........3......3...4.........
.....|.........................................................
.....4.........................................................
....====......=====........====......====.........====.........
Tots 27....+....12......+...12....+...12.......+...12...=...75.
The a(3) = 13 strings on the alphabet {1,2,3} containing all letters up to the maximal value appearing and the corresponding ordered set partitions are:
01: [ 1 1 1 ] { 1, 2, 3 }
02: [ 1 1 2 ] { 1, 2 } < { 3 }
03: [ 1 2 1 ] { 1, 3 } < { 2 }
04: [ 2 1 1 ] { 2, 3 } < { 1 }
05: [ 1 2 2 ] { 1 } < { 2, 3 }
06: [ 2 1 2 ] { 2 } < { 1, 3 }
07: [ 2 2 1 ] { 3 } < { 1, 2 }
08: [ 1 2 3 ] { 1 } < { 2 } < { 3 }
09: [ 1 3 2 ] { 1 } < { 3 } < { 2 }
00: [ 2 1 3 ] { 2 } < { 1 } < { 3 }
11: [ 2 3 1 ] { 3 } < { 1 } < { 2 }
12: [ 3 1 2 ] { 2 } < { 3 } < { 1 }
13: [ 3 2 1 ] { 3 } < { 2 } < { 1 }
(End)
|
|
MAPLE
|
A000670 := proc(n) option remember; local k; if n <=1 then 1 else add(binomial(n, k)*A000670(n-k), k=1..n); fi; end;
with(combstruct); SeqSetL := [S, {S=Sequence(U), U=Set(Z, card >= 1)}, labeled]; seq(count(SeqSetL, size=j), j=1..12);
with(combinat): a:=n->add(add((-1)^(k-i)*binomial(k, i)*i^n, i=0..n), k=0..n): seq(a(n), n=0..18); # Zerinvary Lajos, Jun 03 2007
a := n -> add(combinat:-eulerian1(n, k)*2^k, k=0..n): # Peter Luschny, Jan 02 2015
a := n -> (polylog(-n, 1/2)+`if`(n=0, 1, 0))/2: seq(round(evalf(a(n), 32)), n=0..20); # Peter Luschny, Nov 03 2015
# next Maple program:
b:= proc(n, k) option remember;
`if`(n=0, k!, k*b(n-1, k)+b(n-1, k+1))
end:
a:= n-> b(n, 0):
|
|
MATHEMATICA
|
Table[(PolyLog[-z, 1/2] + KroneckerDelta[z])/2, {z, 0, 20}] (* Wouter Meeussen *)
t = 30; Range[0, t]! CoefficientList[Series[1/(2 - Exp[x]), {x, 0, t}], x] (* Vincenzo Librandi, Mar 16 2014 *)
a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 / (2 - Exp@x), {x, 0, n}]]; (* Michael Somos, Jun 19 2015 *)
Table[Sum[k^n/2^(k+1), {k, 0, Infinity}], {n, 0, 20}] (* Vaclav Kotesovec, Jun 26 2015 *)
Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)*((i+r)^(n-r)/(i!*(k-i-r)!)), {i, 0, k-r}], {k, r, n}]; Fubini[0, 1] = 1; Table[Fubini[n, 1], {n, 0, 20}] (* Jean-François Alcover, Mar 31 2016 *)
Eulerian1[0, 0] = 1; Eulerian1[n_, k_] := Sum[(-1)^j (k-j+1)^n Binomial[n+1, j], {j, 0, k+1}]; Table[Sum[Eulerian1[n, k] 2^k, {k, 0, n}], {n, 0, 20}] (* Jean-François Alcover, Jul 13 2019, after Peter Luschny *)
Prepend[Table[-(-1)^k HurwitzLerchPhi[2, -k, 0]/2, {k, 1, 50}], 1] (* Federico Provvedi, Sep 05 2020 *)
Table[Sum[k!*StirlingS2[n, k], {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Nov 22 2020 *)
|
|
PROG
|
(PARI) {a(n) = if( n<0, 0, n! * polcoeff( subst( 1 / (1 - y), y, exp(x + x*O(x^n)) - 1), n))}; /* Michael Somos, Mar 04 2004 */
(PARI) Vec(serlaplace(1/(2-exp('x+O('x^66))))) /* Joerg Arndt, Jul 10 2011 */
(PARI) {a(n)=polcoeff(sum(m=0, n, m!*x^m/prod(k=1, m, 1-k*x+x*O(x^n))), n)} /* Paul D. Hanna, Jul 20 2011 */
(PARI) {a(n) = if( n<1, n==0, sum(k=1, n, binomial(n, k) * a(n-k)))}; /* Michael Somos, Jul 16 2017 */
(Maxima) makelist(sum(stirling2(n, k)*k!, k, 0, n), n, 0, 12); /* Emanuele Munarini, Jul 07 2011 */
(Maxima) a[0]:1$ a[n]:=sum(binomial(n, k)*a[n-k], k, 1, n)$ A000670(n):=a[n]$ makelist(A000670(n), n, 0, 30); /* Martin Ettl, Nov 05 2012 */
(Sage)
@CachedFunction
def A000670(n) : return 1 if n == 0 else add(A000670(k)*binomial(n, k) for k in range(n))
(Haskell)
a000670 n = a000670_list !! n
a000670_list = 1 : f [1] (map tail $ tail a007318_tabl) where
f xs (bs:bss) = y : f (y : xs) bss where y = sum $ zipWith (*) xs bs
(Python)
from math import factorial
from sympy.functions.combinatorial.numbers import stirling
def A000670(n): return sum(factorial(k)*stirling(n, k) for k in range(n+1)) # Chai Wah Wu, Nov 08 2022
(Magma)
R<x>:=PowerSeriesRing(Rationals(), 40);
Coefficients(R!(Laplace( 1/(2-Exp(x)) ))); // G. C. Greubel, Jun 11 2024
|
|
CROSSREFS
|
See A240763 for a list of the actual preferential arrangements themselves.
Cf. A002144, A002869, A004121, A004122, A007047, A007318, A048144, A053525, A080253, A080254, A011782, A154921, A162312, A163204, A242280, A261959, A290376, A074206.
|
|
KEYWORD
|
nonn,core,nice,easy,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A002145
|
|
Primes of the form 4*k + 3.
(Formerly M2624 N1039)
|
|
+10
339
|
|
|
3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 79, 83, 103, 107, 127, 131, 139, 151, 163, 167, 179, 191, 199, 211, 223, 227, 239, 251, 263, 271, 283, 307, 311, 331, 347, 359, 367, 379, 383, 419, 431, 439, 443, 463, 467, 479, 487, 491, 499, 503, 523, 547, 563, 571
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Or, odd primes p such that -1 is not a square mod p, i.e., the Legendre symbol (-1/p) = -1. [LeVeque I, p. 66]. - N. J. A. Sloane, Jun 28 2008
Natural primes which are also Gaussian primes. (It is a common error to refer to this sequence as "the Gaussian primes".)
Inert rational primes in the field Q(sqrt(-1)). - N. J. A. Sloane, Dec 25 2017
Numbers n such that the product of coefficients of (2n)-th cyclotomic polynomial equals -1. - Benoit Cloitre, Oct 22 2002
For p and q both belonging to the sequence, exactly one of the congruences x^2 = p (mod q), x^2 = q (mod p) is solvable, according to Gauss reciprocity law. - Lekraj Beedassy, Jul 17 2003
Also odd primes p that divide ((p-1)!! + 1) or ((p-2)!! + 1). - Alexander Adamchuk, Nov 30 2006
Also odd primes p that divide ((p-1)!! - 1) or ((p-2)!! - 1). - Alexander Adamchuk, Apr 18 2007
This sequence is a proper subset of the set of the absolute values of negative fundamental discriminants (A003657). - Paul Muljadi, Mar 29 2008
Bernard Frénicle de Bessy discovered that such primes cannot be the hypotenuse of a Pythagorean triangle in opposition to primes of the form 4*n+1 (see A002144). - after Paul Curtz, Sep 10 2008
Primes p such that p XOR 2 = p - 2. Brad Clardy, Oct 25 2011 (Misleading in the sense that this is a formula for the super-sequence A004767. - R. J. Mathar, Jul 28 2014)
It appears that each term of A004767 is the mean of two terms of this subsequence of primes therein; cf. A245203. - M. F. Hasler, Jul 13 2014
Numbers n > 2 such that ((n-2)!!)^2 == 1 (mod n). - Thomas Ordowski, Jul 24 2016
Odd numbers n > 1 such that ((n-1)!!)^2 == 1 (mod n). - Thomas Ordowski, Jul 25 2016
Primes p such that (p-2)!! == (p-3)!! (mod p). - Thomas Ordowski, Jul 28 2016
See Granville and Martin for a discussion of the relative numbers of primes of the form 4k+1 and 4k+3. - Editors, May 01 2017
Conjecture: a(n) for n > 4 can be written as a sum of 3 primes of the form 4k+1, which would imply that primes of the form 4k+3 >= 23 can be decomposed into a sum of 6 nonzero squares. - Thomas Scheuerle, Feb 09 2023
|
|
REFERENCES
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 219, th. 252.
W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 66.
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).
|
|
LINKS
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
|
|
FORMULA
|
Product_{k>=1} (1 - 1/a(k)^2) = A243379.
Product_{k>=1} (1 + 1/a(k)^2) = A243381.
Product_{k>=1} (1 - 1/a(k)^3) = A334427.
Product_{k>=1} (1 + 1/a(k)^3) = A334426.
Product_{k>=1} (1 - 1/a(k)^4) = A334448.
Product_{k>=1} (1 + 1/a(k)^4) = A334447.
Product_{k>=1} (1 - 1/a(k)^5) = A334452.
Product_{k>=1} (1 + 1/a(k)^5) = A334451. (End)
Product_{k>=1} (1 + 1/a(k)) / (1 + 1/A002144(k)) = Pi/(4*A064533^2) = 1.3447728438248695625516649942427635670667319092323632111110962...
Product_{k>=1} (1 - 1/a(k)) / (1 - 1/A002144(k)) = Pi/(8*A064533^2) = 0.6723864219124347812758324971213817835333659546161816055555481... (End)
Sum_{k >= 1} 1/a(k)^s = (1/2) * Sum_{n >= 1 odd numbers} moebius(n) * log(2 * (2^(n*s) - 1) * (n*s - 1)! * zeta(n*s) / (Pi^(n*s) * abs(EulerE(n*s - 1))))/n, s >= 3 odd number. - Dimitris Valianatos, May 20 2020
|
|
MAPLE
|
option remember;
if n = 1 then
3;
else
a := nextprime(procname(n-1)) ;
while a mod 4 <> 3 do
a := nextprime(a) ;
end do;
return a;
end if;
end proc:
|
|
MATHEMATICA
|
Select[ Prime@ Range[2, 110], Length@ PowersRepresentations[#^2, 2, 2] == 1 &] (* or *)
Select[ Prime@ Range[2, 110], JacobiSymbol[-1, #] == -1 &] (* Robert G. Wilson v, May 11 2014 *)
|
|
PROG
|
(Haskell)
a002145 n = a002145_list !! (n-1)
a002145_list = filter ((== 1) . a010051) [3, 7 ..]
(Sage)
def A002145_list(n): return [p for p in prime_range(1, n + 1) if p % 4 == 3] # Peter Luschny, Jul 29 2014
|
|
CROSSREFS
|
Apart from initial term, same as A045326.
Cf. A004614 (multiplicative closure).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Rayes et al. prove that the a(n)-th Chebyshev-T polynomial, divided by x, is irreducible over the integers.
Odd primes can be written as a sum of no more than two consecutive positive integers. Powers of 2 do not have a representation as a sum of k consecutive positive integers (other than the trivial n=n, for k=1). See A111774. - Jaap Spies, Jan 04 2007
The arithmetic mean of divisors of p^3, (1+p)(1+p^2)/4, for odd primes p is an integer. - Ctibor O. Zizka, Oct 20 2009
Triads of the form <2*a(n+1), a(n+1), 3*a(n+1)> like <6,3,9>, <10,5,15>, <14,7,21> appear in the EKG sequence A064413, see Theorem (3) there. - Paul Curtz, Feb 13 2011.
Numbers with two odd divisors. - Omar E. Pol, Mar 24 2012
Odd prime p divides some (2^k + 1) or (2^k - 1), (k>0, minimal, cf. A003558) depending on the parity of A179480((p+1)/2) = r. This is a consequence of the Quasi-order theorem and corollaries, [Hilton and Pederson, pp. 260-264]: 2^k == (-1)^r mod b, b odd; and b divides 2^k - (-1)^r, where p is a subset of b. - Gary W. Adamson, Aug 26 2012
Odd primes p satisfy the identity: p = (product(2*cos((2*k+1)*Pi/(2*p)), k=0..(p-3)/2))^2. This follows from C(2*p, 0) = (-1)^((p-1)/2)*p, n>=2, with the minimal polynomial C(k,x) of rho(k) := 2*cos(Pi/k). See A187360 for C and the W. Lang link on the field Q(rho(n)), eqs. (20) and (37). - Wolfdieter Lang, Oct 23 2013
Numbers m > 1 such that m^2 divides (2m-1)!! + m. - Thomas Ordowski, Nov 28 2014
Numbers m such that (2m-3)!! == m (mod m^2). - Thomas Ordowski, Jul 24 2016
Odd numbers m such that ((m-3)!!)^2 == +-1 (mod m). - Thomas Ordowski, Jul 27 2016
Conjecture: a(n) is the smallest odd number m > prime(n) such that Sum_{k=1..prime(n)-1} k^(m-1) == prime(n)-1 (mod m). This is an extension of the Agoh-Giuga conjecture. - Thomas Ordowski, Aug 01 2018
Numbers k > 1 such that either Phi(k,x) == 1 (mod k) or Phi(k,x) == k (mod k^2) holds, where Phi(k,x) is the k-th cyclotomic polynomial. - Jianing Song, Aug 02 2018
|
|
REFERENCES
|
Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
A065091 := proc(n) RETURN(ithprime(n+1)) end:
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a065091 n = a065091_list !! (n-1)
(Sage)
def A065091_list(limit): # after Minác's formula
f = 3; P = [f]
for n in range(3, limit, 2):
if (f+1)>n*(f//n)+1: P.append(n)
f = f*n
return P
(PARI) forprime(p=3, 200, print1(p, ", ")) \\ Felix Fröhlich, Jun 30 2014
(Python)
from sympy import prime
|
|
CROSSREFS
|
Cf. A230953 (boustrophedon transform).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Francisco Salinas (franciscodesalinas(AT)hotmail.com), Jan 05 2002
|
|
STATUS
|
approved
|
|
|
|
|
A001844
|
|
Centered square numbers: a(n) = 2*n*(n+1)+1. Sums of two consecutive squares. Also, consider all Pythagorean triples (X, Y, Z=Y+1) ordered by increasing Z; then sequence gives Z values.
(Formerly M3826 N1567)
|
|
+10
324
|
|
|
1, 5, 13, 25, 41, 61, 85, 113, 145, 181, 221, 265, 313, 365, 421, 481, 545, 613, 685, 761, 841, 925, 1013, 1105, 1201, 1301, 1405, 1513, 1625, 1741, 1861, 1985, 2113, 2245, 2381, 2521, 2665, 2813, 2965, 3121, 3281, 3445, 3613, 3785, 3961, 4141, 4325, 4513
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
These are Hogben's central polygonal numbers denoted by
...2...
....P..
...4.n.
a(n) = 1 + 3 + 5 + ... + 2*n-1 + 2*n+1 + 2*n-1 + ... + 3 + 1. - Amarnath Murthy, May 28 2001
Numbers of the form (k^2+1)/2 for k odd.
(y(2x+1))^2 + (y(2x^2+2x))^2 = (y(2x^2+2x+1))^2. E.g., let y = 2, x = 1; (2(2+1))^2 + (2(2+2))^2 = (2(2+2+1))^2, (2(3))^2 + (2(4))^2 = (2(5))^2, 6^2 + 8^2 = 10^2, 36 + 64 = 100. - Glenn B. Cox (igloos_r_us(AT)canada.com), Apr 08 2002
a(n) is also the number of 3 X 3 magic squares with sum 3(n+1). - Sharon Sela (sharonsela(AT)hotmail.com), May 11 2002
For n > 0, a(n) is the smallest k such that zeta(2) - Sum_{i=1..k} 1/i^2 <= zeta(3) - Sum_{i=1..n} 1/i^3. - Benoit Cloitre, May 17 2002
Number of convex polyominoes with a 2 X (n+1) minimal bounding rectangle.
First difference of a(n) is 4n = A008586(n). Any entry k of the sequence is followed by k + 2*(1 + sqrt(2k - 1)). - Lekraj Beedassy, Jun 04 2006
Integers of the form 1 + x + x^2/2 (generating polynomial is Schur's polynomial as in A127876). - Artur Jasinski, Feb 04 2007
If X is an n-set and Y and Z disjoint 2-subsets of X then a(n-4) is equal to the number of 4-subsets of X intersecting both Y and Z. - Milan Janjic, Aug 26 2007
Binomial transform of [1, 4, 4, 0, 0, 0, ...]; = inverse binomial transform of A001788: (1, 6, 24, 80, 240, ...). - Gary W. Adamson, Sep 02 2007
n such that the Diophantine equation x^3 - y^3 = x*y + n has a solution with y = x-1. If that solution is (x,y) = (m+1,m) then m^2 + (m+1)^2 = n. Note that this Diophantine equation is an elliptic curve and (m+1,m) is an integer point on it. - James R. Buddenhagen, Aug 12 2008
Numbers n such that (n, n, 2*n-2) are the sides of an isosceles triangle with integer area. Also, n such that 2*n-1 is a square. - James R. Buddenhagen, Oct 17 2008
a(n) is also the least weight of self-conjugate partitions having n+1 different odd parts. - Augustine O. Munagi, Dec 18 2008
Prefaced with a "1": (1, 1, 5, 13, 25, 41, ...) = A153869 * (1, 2, 3, ...). - Gary W. Adamson, Jan 03 2009
Prefaced with a "1": (1, 1, 5, 13, 25, 41, ...) where a(n) = 2n*(n-1)+1, all tuples of square numbers (X-Y, X, X+Y) are produced by ((m*(a(n)-2n))^2, (m*a(n))^2, (m*(a(n)+2n-2))^2) where m is a whole number. - Doug Bell, Feb 27 2009
Equals (1, 2, 3, ...) convolved with (1, 3, 4, 4, 4, ...). a(3) = 25 = (1, 2, 3, 4) dot (4, 4, 3, 1) = (4 + 8 + 9 + 4). - Gary W. Adamson, May 01 2009
The running sum of squares taken two at a time. - Al Hakanson (hawkuu(AT)gmail.com), May 18 2009
Equals the odd integers convolved with (1, 2, 2, 2, ...). - Gary W. Adamson, May 25 2009
When the positive integers are written in a square array by diagonals as in A038722, a(n) gives the numbers appearing on the main diagonal. - Joshua Zucker, Jul 07 2009
The finite continued fraction [n,1,1,n] = (2n+1)/(2n^2 + 2n + 1) = (2n+1)/a(n); and the squares of the first two denominators of the convergents = a(n). E.g., the convergents and value of [4,1,1,4] = 1/4, 1/5, 2/9, 9/41 where 4^2 + 5^2 = 41. - Gary W. Adamson, Jul 15 2010
Square open pyramidal number; that is, the number of elements in a square pyramid of height (n) with only surface and no bottom nodes. (End)
For k>0, x^4 + x^2 + k factors over the integers iff sqrt(k) is in this sequence. - James R. Buddenhagen, Aug 15 2010
Create the simple continued fraction from Pythagorean triples to get [2n + 1; 2n^2 + 2n,2n^2 + 2n + 1]; its value equals the rational number 2n +1 + a(n) / (4*n^4 + 8*n^3 + 6*n^2 + 2*n + 1). - J. M. Bergot, Sep 30 2011
a(n), n >= 1, has in its prime number factorization only primes of the form 4*k+1, i.e., congruent 1 (mod 4) (see A002144). This follows from the fact that a(n) is a primitive sum of two squares and odd. See Theorem 3.20, p. 164, in the given Niven-Zuckerman-Montgomery reference. E.g., a(3) = 25 = 5^2, a(6) = 85 = 5*17. - Wolfdieter Lang, Mar 08 2012
a(n) is congruent to 1 (mod 4) for all n.
The digital roots of the a(n) form a purely periodic palindromic 9-cycle 1, 5, 4, 7, 5, 7, 4, 5, 1.
The units' digits of the a(n) form a purely periodic palindromic 5-cycle 1, 5, 3, 5, 1.
(End)
Number of integer solutions (x,y) of |x| + |y| <= n. Geometrically: number of lattice points inside a square with vertex (n,0), (0,-n), (-n,0), (0,n). - César Eliud Lozada, Sep 18 2012
(a(n)-1)/a(n) = 2*x / (1+x^2) where x = (n-1)/n. Note that in this form, this is the velocity-addition formula according to the special theory of relativity (two objects traveling at 1/n slower than c relative to each other appear to travel at 1/a(n) less than c to a stationary observer). - Christian N. K. Anderson, May 20 2013
A geometric curiosity: the envelope of the circles x^2 + (y-a(n)/2)^2 = ((2n+1)/2)^2 is the parabola y = x^2, the n=0 circle being the osculating circle at the parabola vertex. - Jean-François Alcover, Dec 02 2013
Draw n ellipses in the plane (n>0), any 2 meeting in 4 points; sequence gives number of internal regions into which the plane is divided (cf. A051890, A046092); a(n-1) = A051890(n) - 1 = A046092(n-1) - 2. - Jaroslav Krizek, Dec 27 2013
a(n) is also, of course, the scalar product of the 2-vector (n, n+1) (or (n+1, n)) with itself. The unique inverse of (n, n+1) as vector in the Clifford algebra over the Euclidean 2-space is (1/a(n))(0, n, n+1, 0) (similarly for the other vector). In general the unique inverse of such a nonzero vector v (odd element in Cl_2) is v^(-1) = (1/|v|^2) v. Note that the inverse with respect to the scalar product is not unique for any nonzero vector. See the P. Lounesto reference, sects. 1.7 - 1.12, pp. 7-14. See also the Oct 15 2014 comment in A147973. - Wolfdieter Lang, Nov 06 2014
The number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 574", based on the 5-celled von Neumann neighborhood. - Robert Price, May 13 2016
a(n) is the first integer in a sum of (2*n + 1)^2 consecutive integers that equals (2*n + 1)^4. - Patrick J. McNab, Dec 24 2016
Central elements of odd-length rows of the triangular array of positive integers. a(n) is the mean of the numbers in the (2*n + 1)-th row of this triangle. - David James Sycamore, Aug 01 2018
An off-diagonal of the array of Delannoy numbers, A008288, (or a row/column when the array is shown as a square). As such, this is one of the crystal ball sequences. - Jack W Grahl, Feb 15 2021 and Shel Kaphan, Jan 18 2023
a(n) appears as a solution to a "Riddler Express" puzzle on the FiveThirtyEight website. The Jan 21 2022 issue (problem) and the Jan 28 2022 issue (solution) present the following puzzle and include a proof. - Fold a square piece of paper in half, obtaining a rectangle. Fold again to obtain a square with 1/4 the size of the original square. Then make n cuts through the folded paper. a(n) is the greatest number of pieces of the unfolded paper after the cutting. - Manfred Boergens, Feb 22 2022
a(n) is (1/6) times the number of 2 X 2 triangles in the n-th order hexagram with 12*n^2 cells. - Donghwi Park, Feb 06 2024
|
|
REFERENCES
|
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 3.
A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, p. 125, 1964.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 81.
Pertti Lounesto, Clifford Algebras and Spinors, second edition, Cambridge University Press, 2001.
S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 483.
Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991.
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).
Travers et al., The Mysterious Lost Proof, Using Advanced Algebra, (1976), pp. 27.
|
|
LINKS
|
D. C. Haws, Matroids [Broken link, Oct 30 2017]
D. C. Haws, Matroids [Copy on website of Matthias Koeppe]
D. C. Haws, Matroids [Cached copy, pdf file only]
G. Kreweras, Sur les hiérarchies de segments, Cahiers du Bureau Universitaire de Recherche Opérationnelle, Institut de Statistique, Université de Paris, #20 (1973). (Annotated scanned copy)
|
|
FORMULA
|
a(n) = 2*n^2 + 2*n + 1 = n^2 + (n+1)^2.
a(n) = 1/real(z(n+1)) where z(1)=i, (i^2=-1), z(k+1) = 1/(z(k)+2i). - Benoit Cloitre, Aug 06 2002
G.f.: (1+x)^2/(1-x)^3.
E.g.f.: exp(x)*(1+4x+2x^2).
a(n) = a(n-1) + 4n.
a(-n) = a(n-1).
a(n) = A064094(n+3, n) (fourth diagonal).
a(n) = 1 + Sum_{j=0..n} 4*j. - Xavier Acloque, Oct 08 2003
a(n) = Sum_{k=0..n+1} (-1)^k*binomial(n, k)*Sum_{j=0..n-k+1} binomial(n-k+1, j)*j^2. - Paul Barry, Dec 22 2004
a(n) = ceiling((2n+1)^2/2). - Paul Barry, Jul 16 2006
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), a(0)=1, a(1)=5, a(2)=13. - Jaume Oliver Lafont, Dec 02 2008
Prefaced with a "1" (1, 1, 5, 13, 25, 41, ...): a(n) = 2*n*(n-1)+1. - Doug Bell, Feb 27 2009
a(n) = 2*a(n-1) - a(n-2) + 4. - Ant King, Jun 12 2012
Sum_{n>=0} 1/a(n) = Pi/2*tanh(Pi/2) = 1.4406595199775... = A228048. - Ant King, Jun 15 2012
Sum_{n>=0} (-1)^(n+1)*a(n)/n! = exp(-1) = A068985. (End)
a(n) = Integral_{x=0..2n+2} |1-x| dx. - Pedro Caceres, Dec 29 2020
Product_{n>=0} (1 + 1/a(n)) = cosh(sqrt(3)*Pi/2)*sech(Pi/2).
Product_{n>=1} (1 - 1/a(n)) = Pi*csch(Pi)*sinh(Pi/2). (End)
|
|
EXAMPLE
|
G.f. = 1 + 5*x + 13*x^2 + 25*x^3 + 41*x^4 + 61*x^5 + 85*x^6 + 113*x^7 + 145*x^8 + ...
The first few triples are (1,0,1), (3,4,5), (5,12,13), (7,24,25), ...
The first four such partitions, corresponding to a(n) = 0,1,2,3, are 1, 3+1+1, 5+3+3+1+1, 7+5+5+3+3+1+1. - Augustine O. Munagi, Dec 18 2008
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[2n(n + 1) + 1, {n, 0, 50}]
maxn := 47; Flatten[Table[SeriesCoefficient[Series[(n + (n - 1)*x)/(1 - x)^2, {x, 0, maxn}], k], {n, maxn}, {k, n - 1, n - 1}]] (* L. Edson Jeffery, Aug 24 2014 *)
CoefficientList[ Series[-(x^2 + 2x + 1)/(x - 1)^3, {x, 0, 48}], x] (* or *)
Total/@Partition[Range[0, 50]^2, 2, 1] (* Harvey P. Dale, Dec 05 2020 *)
Table[ j! Coefficient[Series[Exp[x]*(1 + 4*x + 2*x^2), {x, 0, 20}], x,
|
|
PROG
|
(PARI) {a(n) = 2*n*(n+1) + 1};
(PARI) x='x+O('x^200); Vec((1+x)^2/(1-x)^3) \\ Altug Alkan, Mar 23 2016
(Sage) [i**2 + (i + 1)**2 for i in range(46)] # Zerinvary Lajos, Jun 27 2008
(Haskell)
a001844 n = 2 * n * (n + 1) + 1
a001844_list = zipWith (+) a000290_list $ tail a000290_list
|
|
CROSSREFS
|
Cf. A000217, A000290, A001263, A001788, A002061, A004431 (numbers that are the sum of 2 distinct nonzero squares), A005448, A005891, A008844 (terms which are perfect squares), A048395, A051890, A056106, A127876, A128064, A132778, A147973, A153869, A240876, A251599 A000982, A080827, A008288.
Row n=2 (or column k=2) of A008288.
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A002313
|
|
Primes congruent to 1 or 2 modulo 4; or, primes of form x^2 + y^2; or, -1 is a square mod p.
(Formerly M1430 N0564)
|
|
+10
127
|
|
|
2, 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Or, primes p such that x^2 - p*y^2 represents -1.
Primes which are not Gaussian primes (meaning not congruent to 3 mod 4).
Every Fibonacci prime (with the exception of F(4) = 3) is in the sequence. If p = 2n+1 is the prime index of the Fibonacci prime, then F(2n+1) = F(n)^2 + F(n+1)^2 is the unique representation of the prime as sum of two squares. - Sven Simon, Nov 30 2003
Except for 2, primes of the form x^2 + 4y^2. See A140633. - T. D. Noe, May 19 2008
Primes p such that for all p > 2, p XOR 2 = p + 2. - Brad Clardy, Oct 25 2011
Greatest prime divisor of r^2 + 1 for some r. - Michel Lagneau, Sep 30 2012
Empirical result: a(n), as a set, compose the prime factors of the family of sequences produced by A005408(j)^2 + A005408(j+k)^2 = (2j+1)^2 + (2j+2k+1)^2, for j >= 0, and a given k >= 1 for each sequence, with the addition of the prime factors of k if not already in a(n). - Richard R. Forberg, Feb 09 2015
Primes such that when r is a primitive root then p-r is also a primitive root. - Emmanuel Vantieghem, Aug 13 2015
Primes of the form (x^2 + y^2)/2. Note that (x^2 + y^2)/2 = ((x+y)/2)^2 + ((x-y)/2)^2 = a^2 + b^2 with x = a + b and y = a - b. More generally, primes of the form (x^2 + y^2) / A001481(n) for every fixed n > 1. - Thomas Ordowski, Jul 03 2016
Numbers n such that ((n-2)!!)^2 == -1 (mod n). - Thomas Ordowski, Jul 25 2016
Primes p such that (p-1)!! == (p-2)!! (mod p). - Thomas Ordowski, Jul 28 2016
The product of 2 different terms (x^2 + y^2)(z^2 + v^2) = (xz + yv)^2 + (xv - yz)^2 is sum of 2 squares (A000404) because (xv - yz)^2 > 0. If x were equal to yz/v then (x^2 + y^2)/(z^2 + v^2) would be equal to ((yz/v)^2 + y^2)/(z^2 + v^2) = y^2/v^2 which is not possible because (x^2 + y^2) and (z^2 + v^2) are prime numbers. For example, (2^2 + 5^2)(4^2 + 9^2) = (2*4 + 5*9)^2 + (2*9 - 5*4)^2. - Jerzy R Borysowicz, Mar 21 2017
|
|
REFERENCES
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 872.
David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 219, th. 251, 252.
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).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
13 is in the sequence since it is prime and 13 = 4*3 + 1. Also 13 = 2^2 + 3^2. And -1 is a square (mod 13): -1 + 2*13 = 25 = 5^2. Of course, only the first term is congruent to 2 (mod 4). - Michael B. Porter, Jul 04 2016
|
|
MAPLE
|
with(numtheory): for n from 1 to 300 do if ithprime(n) mod 4 = 1 or ithprime(n) mod 4 = 2 then printf(`%d, `, ithprime(n)) fi; od:
# alternative
option remember ;
local a;
if n = 1 then
2;
elif n = 2 then
5;
else
for a from procname(n-1)+4 by 4 do
if isprime(a) then
return a ;
end if;
end do:
end if;
end proc:
|
|
MATHEMATICA
|
fQ[n_] := Solve[x^2 + 1 == n*y^2, {x, y}, Integers] == {}; Select[ Prime@ Range@ 115, fQ] (* Robert G. Wilson v, Dec 19 2013 *)
|
|
PROG
|
(Haskell)
a002313 n = a002313_list !! (n-1)
a002313_list = filter ((`elem` [1, 2]) . (`mod` 4)) a000040_list
(Magma) [p: p in PrimesUpTo(700) | p mod 4 in {1, 2}]; // Vincenzo Librandi, Feb 18 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A007528
|
|
Primes of the form 6k-1.
(Formerly M3809)
|
|
+10
127
|
|
|
5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, 101, 107, 113, 131, 137, 149, 167, 173, 179, 191, 197, 227, 233, 239, 251, 257, 263, 269, 281, 293, 311, 317, 347, 353, 359, 383, 389, 401, 419, 431, 443, 449, 461, 467, 479, 491, 503, 509, 521, 557, 563, 569, 587
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Also primes p such that p^q - 2 is not prime where q is an odd prime. These numbers cannot be prime because the binomial p^q = (6k-1)^q expands to 6h-1 some h. Then p^q-2 = 6h-1-2 is divisible by 3 thus not prime. - Cino Hilliard, Nov 12 2008
There exists a polygonal number P_s(3) = 3s - 3 = a(n) + 1. These are the only primes p with P_s(k) = p + 1, s >= 3, k >= 3, since P_s(k) - 1 is composite for k > 3. - Ralf Steiner, May 17 2018
A theorem due to Andrzej Mąkowski: every integer greater than 161 is the sum of distinct primes of the form 6k-1. Examples: 162 = 5 + 11 + 17 + 23 + 47 + 59; 163 = 17 + 23 + 29 + 41 + 53. (See Sierpiński and David Wells.)
Except for 2 and 3, all Sophie Germain primes are of the form 6k-1.
Except for 3, all the lesser of twin primes are also of the form 6k-1.
Dirichlet's theorem on arithmetic progressions states that this sequence is infinite. (End)
For all elements of this sequence p=6*k-1, there are no (x,y) positive integers such that k=6*x*y-x+y. - Pedro Caceres, Apr 06 2019
|
|
REFERENCES
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
A. Mąkowski, Partitions into unequal primes, Bull. Acad. Polon. Sci. Sér. Sci. Math. Astr. Phys. 8 (1960), 125-126.
Wacław Sierpiński, Elementary Theory of Numbers, p. 144, Warsaw, 1964.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, Revised edition, 1997, p. 127.
|
|
LINKS
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
|
|
FORMULA
|
Product_{k>=1} (1 - 1/a(k)^2) = 9*A175646/Pi^2 = 1/1.060548293.... =4/(3*A333240).
Product_{k>=1} (1 + 1/a(k)^2) = A334482.
Product_{k>=1} (1 - 1/a(k)^3) = A334480.
Product_{k>=1} (1 + 1/a(k)^3) = A334479. (End)
Legendre symbol (-3, a(n)) = -1 and (-3, A002476(n)) = +1, for n >= 1. For prime 3 one sets (-3, 3) = 0. - Wolfdieter Lang, Mar 03 2021
|
|
MAPLE
|
select(isprime, [seq(6*n-1, n=1..100)]); # Muniru A Asiru, May 19 2018
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a007528 n = a007528_list !! (n-1)
a007528_list = [x | k <- [0..], let x = 6 * k + 5, a010051' x == 1]
(GAP) Filtered(List([1..100], n->6*n-1), IsPrime); # Muniru A Asiru, May 19 2018
|
|
CROSSREFS
|
Prime sequences A# (k,r) of the form k*n+r with 0 <= r <= k-1 (i.e., primes == r (mod k), or primes p with p mod k = r) and gcd(r,k)=1: A000040 (1,0), A065091 (2,1), A002476 (3,1), A003627 (3,2), A002144 (4,1), A002145 (4,3), A030430 (5,1), A045380 (5,2), A030431 (5,3), A030433 (5,4), A002476 (6,1), this sequence (6,5), A140444 (7,1), A045392 (7,2), A045437 (7,3), A045471 (7,4), A045458 (7,5), A045473 (7,6), A007519 (8,1), A007520 (8,3), A007521 (8,5), A007522 (8,7), A061237 (9,1), A061238 (9,2), A061239 (9,4), A061240 (9,5), A061241 (9,7), A061242 (9,8), A030430 (10,1), A030431 (10,3), A030432 (10,7), A030433 (10,9), A141849 (11,1), A090187 (11,2), A141850 (11,3), A141851 (11,4), A141852 (11,5), A141853 (11,6), A141854 (11,7), A141855 (11,8), A141856 (11,9), A141857 (11,10), A068228 (12,1), A040117 (12,5), A068229 (12,7), A068231 (12,11).
Cf. A034694 (smallest prime == 1 (mod n)).
Cf. A038700 (smallest prime == n-1 (mod n)).
Cf. A038026 (largest possible value of smallest prime == r (mod n)).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A007519
|
|
Primes of form 8n+1, that is, primes congruent to 1 mod 8.
(Formerly M5037)
|
|
+10
99
|
|
|
17, 41, 73, 89, 97, 113, 137, 193, 233, 241, 257, 281, 313, 337, 353, 401, 409, 433, 449, 457, 521, 569, 577, 593, 601, 617, 641, 673, 761, 769, 809, 857, 881, 929, 937, 953, 977, 1009, 1033, 1049, 1097, 1129, 1153, 1193, 1201, 1217, 1249, 1289, 1297, 1321, 1361
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Discriminant is 32, class is 2. Binary quadratic forms ax^2 + bxy + cy^2 have discriminant d = b^2 - 4ac and gcd(a, b, c) = 1.
Integers n (n > 9) of form 4k + 1 such that binomial(n-1, (n-1)/4) == 1 (mod n) - Benoit Cloitre, Feb 07 2004
Primes of the form x^2 + 8y^2. - T. D. Noe, May 07 2005
Is this the same sequence as A141174?
Being a subset of A001132 and also a subset of A038873, this is also a subset of the primes of the form u^2 - 2v^2. - Tito Piezas III, Dec 28 2008
These primes p are only which possess the property: for every integer m from interval [0, p) with the Hamming distance D(m, p) = 2, there exists an integer h from (m, p) with D(m, h) = 2. - Vladimir Shevelev, Apr 18 2012
Primes p such that p XOR 6 = p + 6. - Brad Clardy, Jul 22 2012
Odd primes p such that -1 is a 4th power mod p. - Eric M. Schmidt, Mar 27 2014
There are infinitely many primes of this form. See Brubaker link. - Alonso del Arte, Jan 12 2017
These primes split in Z[sqrt(2)]. For example, 17 = (-1)(1 - 3*sqrt(2))(1 + 3*sqrt(2)). This is also true of primes of the form 8n - 1. - Alonso del Arte, Jan 26 2017
|
|
REFERENCES
|
Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
Z. I. Borevich and I. R. Shafarevich, Number Theory.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
|
|
EXAMPLE
|
a(1) = 17 = 2 * 8 + 1 = (10001)_2. All numbers m from [0, 17) with the Hamming distance D(m, 17) = 2 are 0, 3, 5, 9. For m = 0, we can take h = 3, since 3 is drawn from (0, 17) and D(0, 3) = 2; for m = 3, we can take h = 5, since 5 from (3, 17) and D(3, 5) = 2; for m = 5, we can take h = 6, since 6 from (5, 17) and D(5, 6) = 2; for m = 9, we can take h = 10, since 10 is drawn from (9, 17) and D(9, 10) = 2. - Vladimir Shevelev, Apr 18 2012
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a007519 n = a007519_list !! (n-1)
a007519_list = filter ((== 1) . a010051) [1, 9..]
(Magma) [p: p in PrimesUpTo(2000) | p mod 8 eq 1 ]; // Vincenzo Librandi, Aug 21 2012
(PARI) lista(nn)= my(vpr = []); for (x = 0, nn, y = 0; while ((v = x^2+6*x*y+y^2) < nn, if (isprime(v), if (! vecsearch(vpr, v), vpr = concat(vpr, v); vpr = vecsort(vpr); ); ); y++; ); ); vpr; \\ Michel Marcus, Feb 01 2014
(SageMath) # uses[binaryQF]
# The function binaryQF is defined in the link 'Binary Quadratic Forms'.
Q = binaryQF([1, 4, -4])
print(Q.represented_positives(1361, 'prime')) # Peter Luschny, Jan 26 2017
|
|
CROSSREFS
|
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.215 seconds
|