cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 29 results. Next

A002522 a(n) = n^2 + 1.

Original entry on oeis.org

1, 2, 5, 10, 17, 26, 37, 50, 65, 82, 101, 122, 145, 170, 197, 226, 257, 290, 325, 362, 401, 442, 485, 530, 577, 626, 677, 730, 785, 842, 901, 962, 1025, 1090, 1157, 1226, 1297, 1370, 1445, 1522, 1601, 1682, 1765, 1850, 1937, 2026, 2117, 2210, 2305, 2402, 2501
Offset: 0

Views

Author

Keywords

Comments

An n X n nonnegative matrix A is primitive (see A070322) iff every element of A^k is > 0 for some power k. If A is primitive then the power which should have all positive entries is <= n^2 - 2n + 2 (Wielandt).
a(n) = Phi_4(n), where Phi_k is the k-th cyclotomic polynomial.
As the positive solution to x=2n+1/x is x=n+sqrt(a(n)), the continued fraction expansion of sqrt(a(n)) is {n; 2n, 2n, 2n, 2n, ...}. - Benoit Cloitre, Dec 07 2001
a(n) is one less than the arithmetic mean of its neighbors: a(n) = (a(n-1) + a(n+1))/2 - 1. E.g., 2 = (1+5)/2 - 1, 5 = (2+10)/2 - 1. - Amarnath Murthy, Jul 29 2003
Equivalently, the continued fraction expansion of sqrt(a(n)) is (n;2n,2n,2n,...). - Franz Vrabec, Jan 23 2006
Number of {12,1*2*,21}-avoiding signed permutations in the hyperoctahedral group.
The number of squares of side 1 which can be drawn without lifting the pencil, starting at one corner of an n X n grid and never visiting an edge twice is n^2-2n+2. - Sébastien Dumortier, Jun 16 2005
Also, numbers m such that m^3 - m^2 is a square, (n*(1 + n^2))^2. - Zak Seidov
1 + 2/2 + 2/5 + 2/10 + ... = Pi*coth Pi [Jolley], see A113319. - Gary W. Adamson, Dec 21 2006
For n >= 1, a(n-1) is the minimal number of choices from an n-set such that at least one particular element has been chosen at least n times or each of the n elements has been chosen at least once. Some games define "matches" this way; e.g., in the classic Parker Brothers, now Hasbro, board game Risk, a(2)=5 is the number of cards of three available types (suits) required to guarantee at least one match of three different types or of three of the same type (ignoring any jokers or wildcards). - Rick L. Shepherd, Nov 18 2007
Positive X values of solutions to the equation X^3 + (X - 1)^2 + X - 2 = Y^2. To prove that X = n^2 + 1: Y^2 = X^3 + (X - 1)^2 + X - 2 = X^3 + X^2 - X - 1 = (X - 1)(X^2 + 2X + 1) = (X - 1)*(X + 1)^2 it means: (X - 1) must be a perfect square, so X = n^2 + 1 and Y = n(n^2 + 2). - Mohamed Bouhamida, Nov 29 2007
{a(k): 0 <= k < 4} = divisors of 10. - Reinhard Zumkeller, Jun 17 2009
Appears in A054413 and A086902 in relation to sequences related to the numerators and denominators of continued fractions convergents to sqrt((2*n)^2/4 + 1), n=1, 2, 3, ... . - Johannes W. Meijer, Jun 12 2010
For n > 0, continued fraction [n,n] = n/a(n); e.g., [5,5] = 5/26. - Gary W. Adamson, Jul 15 2010
The only real solution of the form f(x) = A*x^p with negative p which satisfies f^(m)(x) = f^[-1](x), x >= 0, m >= 1, with f^(m) the m-th derivative and f^[-1] the compositional inverse of f, is obtained for m=2*n, p=p(n)= -(sqrt(a(n))-n) and A=A(n)=(fallfac(p(n),2*n))^(-p(n)/(p(n)+1)), with fallfac(x,k):=Product_{j=0..k-1} (x-j) (falling factorials). See the T. Koshy reference, pp. 263-4 (there are also two solutions for positive p, see the corresponding comment in A087475). - Wolfdieter Lang, Oct 21 2010
n + sqrt(a(n)) = [2*n;2*n,2*n,...] with the regular continued fraction with period 1. This is the even case. For the general case see A087475 with the Schroeder reference and comments. For the odd case see A078370.
a(n-1) counts configurations of non-attacking bishops on a 2 X n strip [Chaiken et al., Ann. Combin. 14 (2010) 419]. - R. J. Mathar, Jun 16 2011
Also numbers k such that 4*k-4 is a square. Hence this sequence is the union of A053755 and A069894. - Arkadiusz Wesolowski, Aug 02 2011
a(n) is also the Moore lower bound on the order, A191595(n), of an (n,5)-cage. - Jason Kimberley, Oct 17 2011
Left edge of the triangle in A195437: a(n+1) = A195437(n,0). - Reinhard Zumkeller, Nov 23 2011
If h (5,17,37,65,101,...) is prime is relatively prime to 6, then h^2-1 is divisible by 24. - Vincenzo Librandi, Apr 14 2014
The identity (4*n^2+2)^2 - (n^2+1)*(4*n)^2 = 4 can be written as A005899(n)^2 - a(n)*A008586(n)^2 = 4. - Vincenzo Librandi, Jun 15 2014
a(n) is also the number of permutations simultaneously avoiding 213 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl, Aug 07 2014
a(n-1) is the maximum number of stages in the Gale-Shapley algorithm for finding a stable matching between two sets of n elements given an ordering of preferences for each element (see Gura et al.). - Melvin Peralta, Feb 07 2016
Because of Fermat's little theorem, a(n) is never divisible by 3. - Altug Alkan, Apr 08 2016
For n > 0, if a(n) points are placed inside an n X n square, it will always be the case that at least two of the points will be a distance of sqrt(2) units apart or less. - Melvin Peralta, Jan 21 2017
Also the limit as q->1^- of the unimodal polynomial (1-q^(n*k+1))/(1-q) after making the simplification k=n. The unimodal polynomial is from O'Hara's proof of unimodality of q-binomials after making the restriction to partitions of size <= 1. See G_1(n,k) from arXiv:1711.11252. As the size restriction s increases, G_s->G_infinity=G: the q-binomials. Then substituting k=n and q=1 yields the central binomial coefficients: A000984. - Bryan T. Ek, Apr 11 2018
a(n) is the smallest number congruent to both 1 (mod n) and 2 (mod n+1). - David James Sycamore, Apr 04 2019
a(n) is the number of permutations of 1,2,...,n+1 with exactly one reduced decomposition. - Richard Stanley, Dec 22 2022
From Klaus Purath, Apr 03 2025: (Start)
The odd prime factors of these terms are always of the form 4*k + 1.
All a(n) = D satisfy the Pell equation (k*x)^2 - D*y^2 = -1. The values for k and the solutions x, y can be calculated using the following algorithm: k = n, x(0) = 1, x(1) = 4*D - 1, y(0) = 1, y(1) = 4*D - 3. The two recurrences are of the form (4*D - 2, -1). The solutions x, y of the Pell equations for n = {1 ... 14} are in OEIS.
It follows from the above that this sequence is a subsequence of A031396. (End)

Examples

			G.f. = 1 + 2*x + 5*x^2 + 10*x^3 + 17*x^4 + 26*x^5 + 37*x^6 + 50*x^7 + 65*x^8 + ...
		

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see p. 120).
  • E. Gura and M. Maschler, Insights into Game Theory: An Alternative Mathematical Experience, Cambridge, 2008; p. 26.
  • Thomas Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley and Sons, New York, 2001.

Crossrefs

Left edge of A055096.
Cf. A059100, A117950, A087475, A117951, A114949, A117619 (sequences of form n^2 + K).
a(n+1) = A101220(n, n+1, 3).
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), this sequence (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A002496 (primes).
Cf. A254858.
Subsequence of A031396.

Programs

Formula

O.g.f.: (1-x+2*x^2)/((1-x)^3). - Eric Werley, Jun 27 2011
Sequences of the form a(n) = n^2 + K with offset 0 have o.g.f. (K - 2*K*x + K*x^2 + x + x^2)/(1-x)^3 and recurrence a(n) = 3*a(n-1) - 3*a(n-2) + a*(n-3). - R. J. Mathar, Apr 28 2008
For n > 0: a(n-1) = A143053(A000290(n)) - 1. - Reinhard Zumkeller, Jul 20 2008
A143053(a(n)) = A000290(n+1). - Reinhard Zumkeller, Jul 20 2008
a(n)*a(n-2) = (n-1)^4 + 4. - Reinhard Zumkeller, Feb 12 2009
a(n) = A156798(n)/A087475(n). - Reinhard Zumkeller, Feb 16 2009
From Reinhard Zumkeller, Mar 08 2010: (Start)
a(n) = A170949(A002061(n+1));
A170949(a(n)) = A132411(n+1);
A170950(a(n)) = A002061(n+1). (End)
For n > 1, a(n)^2 + (a(n) + 1)^2 + ... + (a(n) + n - 2)^2 + (a(n) + n - 1 + a(n) + n)^2 = (n+1) *(6*n^4 + 18*n^3 + 26*n^2 + 19*n + 6) / 6 = (a(n) + n)^2 + ... + (a(n) + 2*n)^2. - Charlie Marion, Jan 10 2011
From Eric Werley, Jun 27 2011: (Start)
a(n) = 2*a(n-1) - a(n-2) + 2.
a(n) = a(n-1) + 2*n - 1. (End)
a(n) = (n-1)^2 + 2(n-1) + 2 = 122 read in base n-1 (for n > 3). - Jason Kimberley, Oct 20 2011
a(n)*a(n+1) = a(n*(n+1) + 1) so a(1)*a(2) = a(3). More generally, a(n)*a(n+k) = a(n*(n+k) + 1) + k^2 - 1. - Jon Perry, Aug 01 2012
a(n) = (n!)^2* [x^n] BesselI(0, 2*sqrt(x))*(1+x). - Peter Luschny, Aug 25 2012
a(n) = A070216(n,1) for n > 0. - Reinhard Zumkeller, Nov 11 2012
E.g.f.: exp(x)*(1 + x + x^2). - Geoffrey Critzer, Aug 30 2013
a(n) = A254858(n-2,3) for n > 2. - Reinhard Zumkeller, Feb 09 2015
Sum_{n>=0} (-1)^n / a(n) = (1+Pi/sinh(Pi))/2 = 0.636014527491... = A367976 . - Vaclav Kotesovec, Feb 14 2015
Sum_{n>=0} 1/a(n) = (1 + Pi*coth(Pi))/2 = 2.076674... = A113319. - Vaclav Kotesovec, Apr 10 2016
4*a(n) = A001105(n-1) + A001105(n+1). - Bruno Berselli, Jul 03 2017
From Amiram Eldar, Jan 20 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = sqrt(2)*csch(Pi)*sinh(sqrt(2)*Pi).
Product_{n>=1} (1 - 1/a(n)) = Pi*csch(Pi). (End)
Sum_{n>=0} a(n)/n! = 3*e. - Davide Rotondo, Feb 16 2025

Extensions

Partially edited by Joerg Arndt, Mar 11 2010

A000124 Central polygonal numbers (the Lazy Caterer's sequence): n(n+1)/2 + 1; or, maximal number of pieces formed when slicing a pancake with n cuts.

Original entry on oeis.org

1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 137, 154, 172, 191, 211, 232, 254, 277, 301, 326, 352, 379, 407, 436, 466, 497, 529, 562, 596, 631, 667, 704, 742, 781, 821, 862, 904, 947, 991, 1036, 1082, 1129, 1177, 1226, 1276, 1327, 1379
Offset: 0

Views

Author

Keywords

Comments

These are Hogben's central polygonal numbers with the (two-dimensional) symbol
2
.P
1 n
The first line cuts the pancake into 2 pieces. For n > 1, the n-th line crosses every earlier line (avoids parallelism) and also avoids every previous line intersection, thus increasing the number of pieces by n. For 16 lines, for example, the number of pieces is 2 + 2 + 3 + 4 + 5 + ... + 16 = 137. These are the triangular numbers plus 1 (cf. A000217).
m = (n-1)(n-2)/2 + 1 is also the smallest number of edges such that all graphs with n nodes and m edges are connected. - Keith Briggs, May 14 2004
Also maximal number of grandchildren of a binary vector of length n+2. E.g., a binary vector of length 6 can produce at most 11 different vectors when 2 bits are deleted.
This is also the order dimension of the (strong) Bruhat order on the finite Coxeter group B_{n+1}. - Nathan Reading (reading(AT)math.umn.edu), Mar 07 2002
Number of 132- and 321-avoiding permutations of {1,2,...,n+1}. - Emeric Deutsch, Mar 14 2002
For n >= 1 a(n) is the number of terms in the expansion of (x+y)*(x^2+y^2)*(x^3+y^3)*...*(x^n+y^n). - Yuval Dekel (dekelyuval(AT)hotmail.com), Jul 28 2003
Also the number of terms in (1)(x+1)(x^2+x+1)...(x^n+...+x+1); see A000140.
Narayana transform (analog of the binomial transform) of vector [1, 1, 0, 0, 0, ...] = A000124; using the infinite lower Narayana triangle of A001263 (as a matrix), N; then N * [1, 1, 0, 0, 0, ...] = A000124. - Gary W. Adamson, Apr 28 2005
Number of interval subsets of {1, 2, 3, ..., n} (cf. A002662). - Jose Luis Arregui (arregui(AT)unizar.es), Jun 27 2006
Define a number of straight lines in the plane to be in general arrangement when (1) no two lines are parallel, (2) there is no point common to three lines. Then these are the maximal numbers of regions defined by n straight lines in general arrangement in the plane. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
Note that a(n) = a(n-1) + A000027(n-1). This has the following geometrical interpretation: Suppose there are already n-1 lines in general arrangement, thus defining the maximal number of regions in the plane obtainable by n-1 lines and now one more line is added in general arrangement. Then it will cut each of the n-1 lines and acquire intersection points which are in general arrangement. (See the comments on A000027 for general arrangement with points.) These points on the new line define the maximal number of regions in 1-space definable by n-1 points, hence this is A000027(n-1), where for A000027 an offset of 0 is assumed, that is, A000027(n-1) = (n+1)-1 = n. Each of these regions acts as a dividing wall, thereby creating as many new regions in addition to the a(n-1) regions already there, hence a(n) = a(n-1) + A000027(n-1). Cf. the comments on A000125 for an analogous interpretation. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
When constructing a zonohedron, one zone at a time, out of (up to) 3-d non-intersecting parallelepipeds, the n-th element of this sequence is the number of edges in the n-th zone added with the n-th "layer" of parallelepipeds. (Verified up to 10-zone zonohedron, the enneacontahedron.) E.g., adding the 10th zone to the enneacontahedron requires 46 parallel edges (edges in the 10th zone) by looking directly at a 5-valence vertex and counting visible vertices. - Shel Kaphan, Feb 16 2006
Binomial transform of (1, 1, 1, 0, 0, 0, ...) and inverse binomial transform of A072863: (1, 3, 9, 26, 72, 192, ...). - Gary W. Adamson, Oct 15 2007
If Y is a 2-subset of an n-set X then, for n >= 3, a(n-3) is the number of (n-2)-subsets of X which do not have exactly one element in common with Y. - Milan Janjic, Dec 28 2007
Equals row sums of triangle A144328. - Gary W. Adamson, Sep 18 2008
It appears that a(n) is the number of distinct values among the fractions F(i+1)/F(j+1) as j ranges from 1 to n and, for each fixed j, i ranges from 1 to j, where F(i) denotes the i-th Fibonacci number. - John W. Layman, Dec 02 2008
a(n) is the number of subsets of {1,2,...,n} that contain at most two elements. - Geoffrey Critzer, Mar 10 2009
For n >= 2, a(n) gives the number of sets of subsets A_1, A_2, ..., A_n of n = {1, 2, ..., n} such that Meet_{i = 1..n} A_i is empty and Sum_{j in [n]} (|Meet{i = 1..n, i != j} A_i|) is a maximum. - Srikanth K S, Oct 22 2009
The numbers along the left edge of Floyd's triangle. - Paul Muljadi, Jan 25 2010
Let A be the Hessenberg matrix of order n, defined by: A[1,j] = A[i,i]:=1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n-1) = (-1)^(n-1)*coeff(charpoly(A,x),x). - Milan Janjic, Jan 24 2010
Also the number of deck entries of Euler's ship. See the Meijer-Nepveu link. - Johannes W. Meijer, Jun 21 2010
(1 + x^2 + x^3 + x^4 + x^5 + ...)*(1 + 2x + 3x^2 + 4x^3 + 5x^4 + ...) = (1 + 2x + 4x^2 + 7x^3 + 11x^4 + ...). - Gary W. Adamson, Jul 27 2010
The number of length n binary words that have no 0-digits between any pair of consecutive 1-digits. - Jeffrey Liese, Dec 23 2010
Let b(0) = b(1) = 1; b(n) = max(b(n-1)+n-1, b(n-2)+n-2) then a(n) = b(n+1). - Yalcin Aktar, Jul 28 2011
Also number of triangular numbers so far, for n > 0: a(n) = a(n-1) + Sum(A010054(a(k)): 0 <= k < n), see also A097602, A131073. - Reinhard Zumkeller, Nov 15 2012
Also number of distinct sums of 1 through n where each of those can be + or -. E.g., {1+2,1-2,-1+2,-1-2} = {3,-1,1,-3} and a(2) = 4. - Toby Gottfried, Nov 17 2011
This sequence is complete because the sum of the first n terms is always greater than or equal to a(n+1)-1. Consequently, any nonnegative number can be written as a sum of distinct terms of this sequence. See A204009, A072638. - Frank M Jackson, Jan 09 2012
The sequence is the number of distinct sums of subsets of the nonnegative integers, and its first differences are the positive integers. See A208531 for similar results for the squares. - John W. Layman, Feb 28 2012
Apparently the number of Dyck paths of semilength n+1 in which the sum of the first and second ascents add to n+1. - David Scambler, Apr 22 2013
Without 1 and 2, a(n) equals the terminus of the n-th partial sum of sequence 1, 1, 2. Explanation: 1st partial sums of 1, 1, 2 are 1, 2, 4; 2nd partial sums are 1, 3, 7; 3rd partial sums are 1, 4, 11; 4th partial sums are 1, 5, 16, etc. - Bob Selcoe, Jul 04 2013
Equivalently, numbers of the form 2*m^2+m+1, where m = 0, -1, 1, -2, 2, -3, 3, ... . - Bruno Berselli, Apr 08 2014
For n >= 2: quasi-triangular numbers; the almost-triangular numbers being A000096(n), n >= 2. Note that 2 is simultaneously almost-triangular and quasi-triangular. - Daniel Forgues, Apr 21 2015
n points in general position determine "n choose 2" lines, so A055503(n) <= a(n(n-1)/2). If n > 3, the lines are not in general position and so A055503(n) < a(n(n-1)/2). - Jonathan Sondow, Dec 01 2015
The digital root is period 9 (1, 2, 4, 7, 2, 7, 4, 2, 1), also the digital roots of centered 10-gonal numbers (A062786), for n > 0, A133292. - Peter M. Chema, Sep 15 2016
Partial sums of A028310. - J. Conrad, Oct 31 2016
For n >= 0, a(n) is the number of weakly unimodal sequences of length n over the alphabet {1, 2}. - Armend Shabani, Mar 10 2017
From Eric M. Schmidt, Jul 17 2017: (Start)
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) != e(k). [Martinez and Savage, 2.4]
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) and e(i) < e(k). [Martinez and Savage, 2.4]
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) != e(k). [Martinez and Savage, 2.4]
(End)
Numbers m such that 8m - 7 is a square. - Bruce J. Nicholson, Jul 24 2017
From Klaus Purath, Jan 29 2020: (Start)
The odd prime factors != 7 occur in an interval of p successive terms either never or exactly twice, while 7 always occurs only once. If a prime factor p appears in a(n) and a(m) within such an interval, then n + m == -1 (mod p). When 7 divides a(n), then 2*n == -1 (mod 7). a(n) is never divisible by the prime numbers given in A003625.
While all prime factors p != 7 can occur to any power, a(n) is never divisible by 7^2. The prime factors are given in A045373. The prime terms of this sequence are given in A055469.
(End)
From Roger Ford, May 10 2021: (Start)
a(n-1) is the greatest sum of arch lengths for the top arches of a semi-meander with n arches. An arch length is the number of arches covered + 1.
/\ The top arch has a length of 3. /\ The top arch has a length of 3.
/ \ Both bottom arches have a //\\ The middle arch has a length of 2.
//\/\\ length of 1. ///\\\ The bottom arch has a length of 1.
Example: for n = 4, a(4-1) = a(3) = 7 /\
//\\
/\ ///\\\ 1 + 3 + 2 + 1 = 7. (End)
a(n+1) is the a(n)-th smallest positive integer that has not yet appeared in the sequence. - Matthew Malone, Aug 26 2021
For n> 0, let the n-dimensional cube {0,1}^n be, provided with the Hamming distance, d. Given an element x in {0,1}^n, a(n) is the number of elements y in {0,1}^n such that d(x, y) <= 2. Example: n = 4. (0,0,0,0), (1,0,0,0), (0,1,0,0), (0,0,1,0), (0,0,0,1), (0,0,1,1), (0,1,0,1), (0,1,1,0), (1,0,0,1), (1,0,1,0), (1,1,0,0) are at distance <= 2 from (0,0,0,0), so a(4) = 11. - Yosu Yurramendi, Dec 10 2021
a(n) is the sum of the first three entries of row n of Pascal's triangle. - Daniel T. Martin, Apr 13 2022
a(n-1) is the number of Grassmannian permutations that avoid a pattern, sigma, where sigma is a pattern of size 3 with exactly one descent. For example, sigma is one of the patterns, {132, 213, 231, 312}. - Jessica A. Tomasko, Sep 14 2022
a(n+4) is the number of ways to tile an equilateral triangle of side length 2*n with smaller equilateral triangles of side length n and side length 1. For example, with n=2, there are 22 ways to tile an equilateral triangle of side length 4 with smaller ones of sides 2 and 1, including the one tiling with sixteen triangles of sides 1 and the one tiling with four triangles of sides 2. - Ahmed ElKhatib and Greg Dresden, Aug 19 2024
Define a "hatpin" to be the planar graph consisting of a distinguished point (called the "head") and a semi-infinite line from that point. The maximum number of regions than can be formed by drawing n hatpins is a(n-1). See link for the case n = 4. - N. J. A. Sloane, Jun 25 2025

Examples

			a(3) = 7 because the 132- and 321-avoiding permutations of {1, 2, 3, 4} are 1234, 2134, 3124, 2314, 4123, 3412, 2341.
G.f. = 1 + 2*x + 4*x^2 + 7*x^3 + 11*x^4 + 16*x^5 + 22*x^6 + 29*x^7 + ...
		

References

  • Robert B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 24.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 80.
  • Henry Ernest Dudeney, Amusements in Mathematics, Nelson, London, 1917, page 177.
  • Derrick Niederman, Number Freak, From 1 to 200 The Hidden Language of Numbers Revealed, A Perigee Book, NY, 2009, p. 83.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • Alain M. Robert, A Course in p-adic Analysis, Springer-Verlag, 2000; p. 213.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane, On single-deletion-correcting codes, in Codes and Designs (Columbus, OH, 2000), 273-291, Ohio State Univ. Math. Res. Inst. Publ., 10, de Gruyter, Berlin, 2002.
  • 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, NY, 1986, Revised edition 1987. See p. 98.
  • William Allen Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 30.
  • Akiva M. Yaglom and Isaak M. Yaglom, Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #44 (First published: San Francisco: Holden-Day, Inc., 1964).

Crossrefs

Cf. A000096 (Maximal number of pieces that can be obtained by cutting an annulus with n cuts, for n >= 1).
Slicing a cake: A000125, a bagel: A003600.
Partial sums =(A033547)/2, (A014206)/2.
The first 20 terms are also found in A025732 and A025739.
Cf. also A055469 Quasi-triangular primes, A002620, A000217.
A row of the array in A386478.

Programs

Formula

G.f.: (1 - x + x^2)/(1 - x)^3. - Simon Plouffe in his 1992 dissertation
a(n) = A108561(n+3, 2). - Reinhard Zumkeller, Jun 10 2005
G.f.: (1 - x^6)/((1 - x)^2*(1 - x^2)*(1 - x^3)). a(n) = a(-1 - n) for all n in Z. - Michael Somos, Sep 04 2006
Euler transform of length 6 sequence [ 2, 1, 1, 0, 0, -1]. - Michael Somos, Sep 04 2006
a(n+3) = 3*a(n+2) - 3*a(n+1) + a(n) and a(1) = 1, a(2) = 2, a(3) = 4. - Artur Jasinski, Oct 21 2008
a(n) = A000217(n) + 1.
a(n) = a(n-1) + n. E.g.f.:(1 + x + x^2/2)*exp(x). - Geoffrey Critzer, Mar 10 2009
a(n) = Sum_{k = 0..n + 1} binomial(n+1, 2(k - n)). - Paul Barry, Aug 29 2004
a(n) = binomial(n+2, 1) - 2*binomial(n+1, 1) + binomial(n+2, 2). - Zerinvary Lajos, May 12 2006
From Thomas Wieder, Feb 25 2009: (Start)
a(n) = Sum_{l_1 = 0..n + 1} Sum_{l_2 = 0..n}...Sum_{l_i = 0..n - i}...Sum_{l_n = 0..1} delta(l_1, l_2, ..., l_i, ..., l_n) where delta(l_1, l_2, ..., l_i, ..., l_n) = 0 if any l_i != l_(i+1) and l_(i+1) != 0 and delta(l_1, l_2, ..., l_i, ..., l_n) = 1 otherwise. (End)
a(n) = A034856(n+1) - A005843(n) = A000217(n) + A005408(n) - A005843(n). - Jaroslav Krizek, Sep 05 2009
a(n) = 2*a(n-1) - a(n-2) + 1. - Eric Werley, Jun 27 2011
E.g.f.: exp(x)*(1+x+(x^2)/2) = Q(0); Q(k) = 1+x/(1-x/(2+x-4/(2+x*(k+1)/Q(k+1)))); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
a(n) = A014132(n, 1) for n > 0. - Reinhard Zumkeller, Dec 12 2012
a(n) = 1 + floor(n/2) + ceiling(n^2/2) = 1 + A004526(n) + A000982(n). - Wesley Ivan Hurt, Jun 14 2013
a(n) = A228074(n+1, n). - Reinhard Zumkeller, Aug 15 2013
For n > 0: A228446(a(n)) = 3. - Reinhard Zumkeller, Mar 12 2014
a(n) >= A263883(n) and a(n(n-1)/2) >= A055503(n). - Jonathan Sondow, Dec 01 2015
From Ilya Gutkovskiy, Jun 29 2016: (Start)
Dirichlet g.f.: (zeta(s-2) + zeta(s-1) + 2*zeta(s))/2.
Sum_{n >= 0} 1/a(n) = 2*Pi*tanh(sqrt(7)*Pi/2)/sqrt(7) = A226985. (End)
a(n) = (n+1)^2 - A000096(n). - Anton Zakharov, Jun 29 2016
a(n) = A101321(1, n). - R. J. Mathar, Jul 28 2016
a(n) = 2*a(n-1) - binomial(n-1, 2) and a(0) = 1. - Armend Shabani, Mar 10 2017
a(n) = A002620(n+2) + A002620(n-1). - Anton Zakharov, May 11 2017
From Klaus Purath, Jan 29 2020: (Start)
a(n) = (Sum_{i=n-2..n+2} A000217(i))/5.
a(n) = (Sum_{i=n-2..n+2} A002378(i))/10.
a(n) = (Sum_{i=n..n+2} A002061(i)+1)/6.
a(n) = (Sum_{i=n-1..n+2} A000290(i)+2)/8.
a(n) = A060533(n-1) + 10, n > 5.
a(n) = (A002378(n) + 2)/2.
a(n) = A152948(n+2) - 1.
a(n) = A152950(n+1) - 2.
a(n) = (A002061(n) + A002061(n+2))/4.
(End)
Sum_{n>=0} (-1)^n/a(n) = A228918. - Amiram Eldar, Nov 20 2020
From Amiram Eldar, Feb 17 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = cosh(sqrt(15)*Pi/2)*sech(sqrt(7)*Pi/2).
Product_{n>=1} (1 - 1/a(n)) = 2*Pi*sech(sqrt(7)*Pi/2). (End)
a((n^2-3n+6)/2) + a((n^2-n+4)/2) = a(n^2-2n+6)/2. - Charlie Marion, Feb 14 2023

A058331 a(n) = 2*n^2 + 1.

Original entry on oeis.org

1, 3, 9, 19, 33, 51, 73, 99, 129, 163, 201, 243, 289, 339, 393, 451, 513, 579, 649, 723, 801, 883, 969, 1059, 1153, 1251, 1353, 1459, 1569, 1683, 1801, 1923, 2049, 2179, 2313, 2451, 2593, 2739, 2889, 3043, 3201, 3363, 3529, 3699, 3873, 4051
Offset: 0

Views

Author

Erich Friedman, Dec 12 2000

Keywords

Comments

Maximal number of regions in the plane that can be formed with n hyperbolas.
Also the number of different 2 X 2 determinants with integer entries from 0 to n.
Number of lattice points in an n-dimensional ball of radius sqrt(2). - David W. Wilson, May 03 2001
Equals A112295(unsigned) * [1, 2, 3, ...]. - Gary W. Adamson, Oct 07 2007
Binomial transform of A166926. - Gary W. Adamson, May 03 2008
a(n) = longest side a of all integer-sided triangles with sides a <= b <= c and inradius n >= 1. Triangle has sides (2n^2 + 1, 2n^2 + 2, 4n^2 + 1).
{a(k): 0 <= k < 3} = divisors of 9. - Reinhard Zumkeller, Jun 17 2009
Number of ways to partition a 3*n X 2 grid into 3 connected equal-area regions. - R. H. Hardin, Oct 31 2009
Let A be the Hessenberg matrix of order n defined by: A[1, j] = 1, A[i, i] := 2, (i > 1), A[i, i - 1] = -1, and A[i, j] = 0 otherwise. Then, for n >= 3, a(n - 1) = coeff(charpoly(A, x), x^(n - 2)). - Milan Janjic, Jan 26 2010
Except for the first term of [A002522] and [A058331] if X = [A058331], Y = [A087113], A = [A002522], we have, for all other terms, Pell's equation: [A058331]^2 - [A002522]*[A087113]^2 = 1; (X^2 - A*Y^2 = 1); e.g., 3^2 -2*2^2 = 1; 9^2 - 5*4^2 = 1; 129^2 - 65*16^2 = 1, and so on. - Vincenzo Librandi, Aug 07 2010
Niven (1961) gives this formula as an example of a formula that does not contain all odd integers, in contrast to 2n + 1 and 2n - 1. - Alonso del Arte, Dec 05 2012
Numbers m such that 2*m-2 is a square. - Vincenzo Librandi, Apr 10 2015
Number of n-tuples from the set {1,0,-1} where at most two elements are nonzero. - Michael Somos, Oct 19 2022
a(n) gives the x-value of the integral solution (x,y) of the Pellian equation x^2 - (n^2 + 1)*y^2 = 1. The y-value is given by 2*n (see Tattersall). - Stefano Spezia, Jul 23 2025

Examples

			a(1) = 3 since (0 0 / 0 0), (1 0 / 0 1) and (0 1 / 1 0) have different determinants.
G.f. = 1 + 3*x + 9*x^2 + 19*x^3 + 33*x^4 + 51*x^5 + 73*x^6 + ... - _Michael Somos_, Oct 19 2022
		

References

  • Ivan Niven, Numbers: Rational and Irrational, New York: Random House for Yale University (1961): 17.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 256.

Crossrefs

Cf. A000124.
Second row of array A099597.
See A120062 for sequences related to integer-sided triangles with integer inradius n.
Cf. A112295.
Column 2 of array A188645.
Cf. A001105 and A247375. - Bruno Berselli, Sep 16 2014

Programs

  • Haskell
    a058331 = (+ 1) . a001105  -- Reinhard Zumkeller, Dec 13 2014
    
  • Magma
    [2*n^2 + 1 : n in [0..100]]; // Wesley Ivan Hurt, Feb 02 2017
  • Mathematica
    b[g_] := Length[Union[Map[Det, Flatten[ Table[{{i, j}, {k, l}}, {i, 0, g}, {j, 0, g}, {k, 0, g}, {l, 0, g}], 3]]]] Table[b[g], {g, 0, 20}]
    2*Range[0, 49]^2 + 1 (* Alonso del Arte, Dec 05 2012 *)
  • PARI
    a(n)=2*n^2+1 \\ Charles R Greathouse IV, Jun 16 2011
    

Formula

G.f.: (1 + 3x^2)/(1 - x)^3. - Paul Barry, Apr 06 2003
a(n) = M^n * [1 1 1], leftmost term, where M = the 3 X 3 matrix [1 1 1 / 0 1 4 / 0 0 1]. a(0) = 1, a(1) = 3; a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). E.g., a(4) = 33 since M^4 *[1 1 1] = [33 17 1]. - Gary W. Adamson, Nov 11 2004
a(n) = cosh(2*arccosh(n)). - Artur Jasinski, Feb 10 2010
a(n) = 4*n + a(n-1) - 2 for n > 0, a(0) = 1. - Vincenzo Librandi, Aug 07 2010
a(n) = (((n-1)^2 + n^2))/2 + (n^2 + (n+1)^2)/2. - J. M. Bergot, May 31 2012
a(n) = A251599(3*n) for n > 0. - Reinhard Zumkeller, Dec 13 2014
a(n) = sqrt(8*(A000217(n-1)^2 + A000217(n)^2) + 1). - J. M. Bergot, Sep 03 2015
E.g.f.: (2*x^2 + 2*x + 1)*exp(x). - G. C. Greubel, Jul 14 2017
a(n) = A002378(n) + A002061(n). - Bruce J. Nicholson, Aug 06 2017
From Amiram Eldar, Jul 15 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + (Pi/sqrt(2))*coth(Pi/sqrt(2)))/2.
Sum_{n>=0} (-1)^n/a(n) = (1 + (Pi/sqrt(2))*csch(Pi/sqrt(2)))/2. (End)
From Amiram Eldar, Feb 05 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = sqrt(2)*csch(Pi/sqrt(2))*sinh(Pi).
Product_{n>=1} (1 - 1/a(n)) = (Pi/sqrt(2))*csch(Pi/sqrt(2)). (End)
From Leo Tavares, May 23 2022: (Start)
a(n) = A000384(n+1) - 3*n.
a(n) = 3*A000217(n) + A000217(n-2). (End)
a(n) = a(-n) for all n in Z and A037235(n) = Sum_{k=0..n-1} a(k). - Michael Somos, Oct 19 2022

Extensions

Revised description from Noam Katz (noamkj(AT)hotmail.com), Jan 28 2001

A000125 Cake numbers: maximal number of pieces resulting from n planar cuts through a cube (or cake): C(n+1,3) + n + 1.

Original entry on oeis.org

1, 2, 4, 8, 15, 26, 42, 64, 93, 130, 176, 232, 299, 378, 470, 576, 697, 834, 988, 1160, 1351, 1562, 1794, 2048, 2325, 2626, 2952, 3304, 3683, 4090, 4526, 4992, 5489, 6018, 6580, 7176, 7807, 8474, 9178, 9920, 10701, 11522, 12384, 13288, 14235, 15226
Offset: 0

Views

Author

Keywords

Comments

Note that a(n) = a(n-1) + A000124(n-1). This has the following geometrical interpretation: Define a number of planes in space to be in general arrangement when
(1) no two planes are parallel,
(2) there are no two parallel intersection lines,
(3) there is no point common to four or more planes.
Suppose there are already n-1 planes in general arrangement, thus defining the maximal number of regions in space obtainable by n-1 planes and now one more plane is added in general arrangement. Then it will cut each of the n-1 planes and acquire intersection lines which are in general arrangement. (See the comments on A000124 for general arrangement with lines.) These lines on the new plane define the maximal number of regions in 2-space definable by n-1 straight lines, hence this is A000124(n-1). Each of this regions acts as a dividing wall, thereby creating as many new regions in addition to the a(n-1) regions already there, hence a(n) = a(n-1) + A000124(n-1). - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
More generally, we have: A000027(n) = binomial(n,0) + binomial(n,1) (the natural numbers), A000124(n) = binomial(n,0) + binomial(n,1) + binomial(n,2) (the Lazy Caterer's sequence), a(n) = binomial(n,0) + binomial(n,1) + binomial(n,2) + binomial(n,3) (Cake Numbers). - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
If Y is a 2-subset of an n-set X then, for n>=3, a(n-3) is the number of 3-subsets of X which do not have exactly one element in common with Y. - Milan Janjic, Dec 28 2007
a(n) is the number of compositions (ordered partitions) of n+1 into four or fewer parts or equivalently the sum of the first four terms in the n-th row of Pascal's triangle. - Geoffrey Critzer, Jan 23 2009
{a(k): 0 <= k < 4} = divisors of 8. - Reinhard Zumkeller, Jun 17 2009
a(n) is also the maximum number of different values obtained by summing n consecutive positive integers with all possible 2^n sign combinations. This maximum is first reached when summing the interval [n, 2n-1]. - Olivier Gérard, Mar 22 2010
a(n) contains only 5 perfect squares > 1: 4, 64, 576, 67600, and 75203584. The incidences of > 0 are given by A047694. - Frank M Jackson, Mar 15 2013
Given n tiles with two values - an A value and a B value - a player may pick either the A value or the B value. The particular tiles are [n, 0], [n-1, 1], ..., [2, n-2] and [1, n-1]. The sequence is the number of different final A:B counts. For example, with n=4, we can have final total [5, 3] = [4, ] + [, 1] + [, 2] + [1, ] = [, 0] + [3, ] + [2, ] + [, 3], so a(4) = 2^4 - 1 = 15. The largest and smallest final A+B counts are given by A077043 and A002620 respectively. - Jon Perry, Oct 24 2014
For n>=3, a(n) is also the number of maximal cliques in the (n+1)-triangular graph (the 4-triangular graph has a(3)=8 maximal cliques). - Andrew Howroyd, Jul 19 2017
a(n) is the number of binary words of length n matching the regular expression 1*0*1*0*. Coincidentally, A000124 counts binary words of the form 0*1*0*. See Alexandersson and Nabawanda for proof. - Per W. Alexandersson, May 15 2021
For n > 0, let the n-dimensional cube, {0,1}^n be provided with the Hamming distance, d. Given an element x in {0,1}^n, a(n) is the number of elements y in {0,1}^n such that d(x, y) <= 3. Example: n = 4. Let x = (0,0,0,0) be in {0,1}^4.
d(x,y) = 0: y in {(0,0,0,0)}.
d(x,y) = 1: y in {(1,0,0,0), (0,1,0,0), (0,0,1,0), (0,0,0,1)}.
d(x,y) = 2: y in {(1,1,0,0), (1,0,1,0), (1,0,0,1), (0,1,1,0), (0,1,0,1), (0,0,1,1)}.
d(x,y) = 3: y in {(1,1,1,0), (1,1,0,1), (1,0,1,1), (0,1,1,1)}.
All these y are at a distance <= 3 from (0,0,0,0), so a(4) = 15. (See Peter C. Heinig's formula). - Yosu Yurramendi, Dec 14 2021
For n >= 2, a(n) is the number of distinct least squares regression lines fitted to n points (j,y_j), 1 <= j <= n, where each y_j is 0 or 1. The number of distinct lines with exactly k 1's among y_1, ..., y_n is A077028(n,k). The number of distinct slopes is A123596(n). - Pontus von Brömssen, Mar 16 2024
The only powers of 2 in this sequence are a(0) = 1, a(1) = 2, a(2) = 4, a(3) = 8, and a(7) = 64. - Jianing Song, Jan 02 2025

Examples

			a(4)=15 because there are 15 compositions of 5 into four or fewer parts. a(6)=42 because the sum of the first four terms in the 6th row of Pascal's triangle is 1+6+15+20=42. - _Geoffrey Critzer_, Jan 23 2009
For n=5, (1, 3, 5, 7, 9, 11, 13, 17, 19, 21, 23, 25, 35) and their opposite are the 26 different sums obtained by summing 5,6,7,8,9 with any sign combination. - _Olivier Gérard_, Mar 22 2010
G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 15*x^4 + 26*x^5 + 42*x^6 + 64*x^7 + ... - _Michael Somos_, Jul 07 2022
		

References

  • V. I. Arnold (ed.), Arnold's Problems, Springer, 2004, comments on Problem 1990-11 (p. 75), pp. 503-510. Numbers N_3.
  • R. B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 27.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 80.
  • H. E. Dudeney, Amusements in Mathematics, Nelson, London, 1917, page 177.
  • 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).
  • T. H. Stickels, Mindstretching Puzzles. Sterling, NY, 1994 p. 85.
  • W. A. Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 30.
  • A. M. Yaglom and I. M. Yaglom: Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #45 (First published: San Francisco: Holden-Day, Inc., 1964)

Crossrefs

Programs

Formula

a(n) = (n+1)*(n^2-n+6)/6 = (n^3 + 5*n + 6) / 6.
G.f.: (1 - 2*x + 2x^2)/(1-x)^4. - [Simon Plouffe in his 1992 dissertation.]
E.g.f.: (1 + x + x^2/2 + x^3/6)*exp(x).
a(n) = binomial(n,3) + binomial(n,2) + binomial(n,1) + binomial(n,0). - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
Paraphrasing the previous comment: the sequence is the binomial transform of [1,1,1,1,0,0,0,...]. - Gary W. Adamson, Oct 23 2007
From Ilya Gutkovskiy, Jul 18 2016: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = Sum_{k=0..n} A152947(k+1).
Inverse binomial transform of A134396.
Sum_{n>=0} a(n)/n! = 8*exp(1)/3. (End)
a(n) = -A283551(-n). - Michael Somos, Jul 07 2022
a(n) = A046127(n+1)/2 = A033547(n)/2 + 1. - Jianing Song, Jan 02 2025

Extensions

Minor typo in comments corrected by Mauro Fiorentini, Jan 02 2018

A000127 Maximal number of regions obtained by joining n points around a circle by straight lines. Also number of regions in 4-space formed by n-1 hyperplanes.

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 57, 99, 163, 256, 386, 562, 794, 1093, 1471, 1941, 2517, 3214, 4048, 5036, 6196, 7547, 9109, 10903, 12951, 15276, 17902, 20854, 24158, 27841, 31931, 36457, 41449, 46938, 52956, 59536, 66712, 74519, 82993, 92171, 102091, 112792, 124314, 136698
Offset: 1

Views

Author

Keywords

Comments

a(n) is the sum of the first five terms in the n-th row of Pascal's triangle. - Geoffrey Critzer, Jan 18 2009
{a(k): 1 <= k <= 5} = divisors of 16. - Reinhard Zumkeller, Jun 17 2009
Equals binomial transform of [1, 1, 1, 1, 1, 0, 0, 0, ...]. - Gary W. Adamson, Mar 02 2010
From Bernard Schott, Apr 05 2021: (Start)
As a(n) = 2^(n-1) for n = 1..5, it is misleading to believe that a(n) = 2^(n-1) for n > 5 (see Patrick Popescu-Pampu link); other curiosities: a(6) = 2^5 - 1 and a(10) = 2^8.
The sequence of the first differences is A000125, the sequence of the second differences is A000124, the sequence of the third differences is A000027 and the sequence of the fourth differences is the all 1's sequence A000012 (see J. H. Conway and R. K. Guy reference, p. 80). (End)
a(n) is the number of binary words of length n matching the regular expression 0*1*0*1*0*. A000124 and A000125 count binary words of the form 0*1*0* and 1*0*1*0*, respectively. - Manfred Scheucher, Jun 22 2023

Examples

			a(7)=99 because the first five terms in the 7th row of Pascal's triangle are 1 + 7 + 21 + 35 + 35 = 99. - _Geoffrey Critzer_, Jan 18 2009
G.f. = x + 2*x^2 + 4*x^3 + 8*x^4 + 16*x^5 + 31*x^6 + 57*x^7 + 99*x^8 + 163*x^9 + ...
		

References

  • R. B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 28.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, Chap. 3.
  • J. H. Conway and R. K. Guy, Le Livre des Nombres, Eyrolles, 1998, p. 80.
  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique Des Nombres, Problem 33 pp. 18; 128 Ellipses Paris 2004.
  • A. Deledicq and D. Missenard, A La Recherche des Régions Perdues, Math. & Malices, No. 22 Summer 1995 issue pp. 22-3 ACL-Editions Paris.
  • M. Gardner, Mathematical Circus, pp. 177; 180-1 Alfred A. Knopf NY 1979.
  • M. Gardner, The Colossal Book of Mathematics, 2001, p. 561.
  • James Gleick, Faster, Vintage Books, NY, 2000 (see pp. 259-261).
  • M. de Guzman, Aventures Mathématiques, Prob. B pp. 115-120 PPUR Lausanne 1990.
  • Ross Honsberger; Mathematical Gems I, Chap. 9.
  • Ross Honsberger; Mathematical Morsels, Chap. 3.
  • Jeux Mathématiques et Logiques, Vol. 3 pp. 12; 51 Prob. 14 FFJM-SERMAP Paris 1988.
  • J. N. Kapur, Reflections of a Mathematician, Chap.36, pp. 337-343, Arya Book Depot, New Delhi 1996.
  • C. D. Miller, V. E. Heeren, J. Hornsby, M. L. Morrow and J. Van Newenhizen, Mathematical Ideas, Tenth Edition, Pearson, Addison-Wesley, Boston, 2003, Cptr 1, 'The Art of Problem Solving, page 6.
  • I. Niven, Mathematics of Choice, pp. 158; 195 Prob. 40 NML 15 MAA 1965.
  • C. S. Ogilvy, Tomorrow's Math, pp. 144-6 OUP 1972.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 252-255.
  • Alfred S. Posamentier & Ingmar Lehmann, The (Fabulous) Fibonacci Numbers, Prometheus Books, NY, 2007, page 81-87.
  • A. M. Robert, A Course in p-adic Analysis, Springer-Verlag, 2000; p. 213.
  • 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).

Crossrefs

Programs

  • Haskell
    a000127 = sum . take 5 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(n^4-6*n^3+23*n^2-18*n+24)/24: n in [1..50]]; // Vincenzo Librandi, Feb 16 2015
    
  • Maple
    A000127 := n->(n^4 - 6*n^3 + 23*n^2 - 18*n + 24)/24;
    with (combstruct):ZL:=[S, {S=Sequence(U, card=1)}, unlabeled]: seq(count(subs(r=6, ZL), size=m), m=0..41); # Zerinvary Lajos, Mar 08 2008
  • Mathematica
    f[n_] := Sum[Binomial[n, i], {i, 0, 4}]; Table[f@n, {n, 0, 40}] (* Robert G. Wilson v, Jun 29 2007 *)
    Total/@Table[Binomial[n-1,k],{n,50},{k,0,4}] (* or *) LinearRecurrence[ {5,-10,10,-5,1},{1,2,4,8,16},50] (* Harvey P. Dale, Aug 24 2011 *)
    Table[(n^4 - 6 n^3 + 23 n^2 - 18 n + 24) / 24, {n, 100}] (* Vincenzo Librandi, Feb 16 2015 *)
    a[ n_] := Binomial[n, 4] + Binomial[n, 2] + 1; (* Michael Somos, Dec 23 2017 *)
  • PARI
    a(n)=(n^4-6*n^3+23*n^2-18*n+24)/24 \\ Charles R Greathouse IV, Mar 22 2016
    
  • PARI
    {a(n) = binomial(n, 4) + binomial(n, 2) + 1}; /* Michael Somos, Dec 23 2017 */
    
  • Python
    def A000127(n): return n*(n*(n*(n - 6) + 23) - 18)//24 + 1 # Chai Wah Wu, Sep 18 2021

Formula

a(n) = C(n-1, 4) + C(n-1, 3) + ... + C(n-1, 0) = A055795(n) + 1 = C(n, 4) + C(n-1, 2) + n.
a(n) = Sum_{k=0..2} C(n, 2k). - Joel Sanderi (sanderi(AT)itstud.chalmers.se), Sep 08 2004
a(n) = (n^4 - 6*n^3 + 23*n^2 - 18*n + 24)/24.
G.f.: (1 - 3*x + 4*x^2 - 2*x^3 + x^4)/(1-x)^5. (for offset 0) - Simon Plouffe in his 1992 dissertation
E.g.f.: (1 + x + x^2/2 + x^3/6 + x^4/24)*exp(x) (for offset 0). [Typos corrected by Juan M. Marquez, Jan 24 2011]
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n > 4. - Harvey P. Dale, Aug 24 2011
a(n) = A000124(A000217(n-1)) - n*A000217(n-2) - A034827(n), n > 1. - Melvin Peralta, Feb 15 2016
a(n) = A223718(-n). - Michael Somos, Dec 23 2017
For n > 2, a(n) = n + 1 + sum_{i=2..(n-2)}sum_{j=1..(n-i)}(1+(i-1)(j-1)). - Alec Jones, Nov 17 2019

Extensions

Formula corrected and additional references from torsten.sillke(AT)lhsystems.com
Additional correction from Jonas Paulson (jonasso(AT)sdf.lonestar.org), Oct 30 2003

A006261 a(n) = Sum_{k=0..5} binomial(n,k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 63, 120, 219, 382, 638, 1024, 1586, 2380, 3473, 4944, 6885, 9402, 12616, 16664, 21700, 27896, 35443, 44552, 55455, 68406, 83682, 101584, 122438, 146596, 174437, 206368, 242825, 284274, 331212, 384168, 443704, 510416, 584935, 667928, 760099, 862190
Offset: 0

Views

Author

N. J. A. Sloane, based on a suggestion from S. C. Chan, Jun 10 1975

Keywords

Comments

a(n) is the sum of the first six terms of the n-th row in Pascal's triangle. - Geoffrey Critzer, Jan 19 2009
Also the interpolating polynomial for the divisors of 32: {a(k): 0 <= k < 6} = {1,2,4,8,16,32}. - Reinhard Zumkeller, Jun 17 2009
a(n) is the maximal number of regions in 5-space formed by n-1 4-dimensional hypercubes. - Carl Schildkraut, May 26 2015
a(n) is the number of binary words of length n matching the regular expression 1*0*1*0*1*0*. A000124, A000125, A000127 count binary words of the form 0*1*0*, 1*0*1*0*, and 0*1*0*1*0*, respectively. - Manfred Scheucher, Jun 22 2023

Examples

			a(7) = 120 because the first six terms in the 7th row of Pascal's triangle 1 + 7 + 21 + 35 + 35 + 21 = 120. - _Geoffrey Critzer_, Jan 19 2009
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006261 = sum . take 6 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(n^5 - 5*n^4 + 25*n^3 + 5*n^2 + 94*n + 120)/120: n in [0..40]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    A006261:=(z**2-z+1)*(3*z**2-3*z+1)/(z-1)**6; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    CoefficientList[
      Series[(1 + x + x^2/2 + x^3/6 + x^4/24 + x^5/120) Exp[x], {x, 0,
        52}], x]*Table[n!, {n, 0, 52}]
  • PARI
    a(n)=sum(k=0,5,binomial(n,k)) \\ Charles R Greathouse IV, Apr 08 2016
  • Python
    A006261_list, m = [], [1, -3, 4, -2, 1, 1]
    for _ in range(10**2):
        A006261_list.append(m[-1])
        for i in range(5):
            m[i+1] += m[i] # Chai Wah Wu, Jan 24 2016
    
  • Sage
    [binomial(n,1)+binomial(n,3)+binomial(n,5) for n in range(1, 38)] # Zerinvary Lajos, May 17 2009
    

Formula

a(n) = A057703(n) + 1.
a(n) = binomial(n+1, 5) + binomial(n+1, 3) + binomial(n+1, 1). - Len Smiley, Oct 20 2001
G.f.: (1 - 4*x + 7*x^2 - 6*x^3 + 3*x^4)/(1-x)^6. - Geoffrey Critzer, Jan 19 2009
E.g.f.: (1 + x + x^2/2 + x^3/6 + x^4/24 + x^5/120)*exp(x).
a(n) = (n^5 - 5*n^4 + 25*n^3 + 5*n^2 + 94*n + 120)/120. - Reinhard Zumkeller, Jun 17 2009
a(n) = a(n-1) + A000127(n-1). - Christian Schroeder, Jan 04 2016

A161700 a(n) is the sum of the elements on the antidiagonal of the difference table of the divisors of n.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 13, 15, 19, 17, 21, 28, 25, 21, 41, 31, 33, 59, 37, 21, 53, 29, 45, 39, 61, 33, 65, 49, 57, 171, 61, 63, 77, 41, 117, 61, 73, 45, 89, -57, 81, 309, 85, 105, 167, 53, 93, -80, 127, 61, 113, 133, 105, 321, 173, 183, 125, 65, 117, -1039, 121, 69, 155, 127, 201, 333, 133, 189, 149, -69, 141, 117, 145, 81, 317, 217, 269
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 17 2009, Jun 20 2009

Keywords

Comments

a(p^k) = p^(k+1) - (p-1)^(k+1) if p is prime. - Robert Israel, May 18 2016

Examples

			n=12: A000005(12)=6;
EDP(12,x) = (x^5 - 5*x^4 + 5*x^3 + 5*x^2 + 114*x + 120)/120 = A161701(x) is the interpolating polynomial for {(0,1),(1,2),(2,3),(3,4),(4,6),(5,12)},
{EDP(12,x): 0<=x<6} = {1, 2, 3, 4, 6, 12} = divisors of 12,
a(12) = EDP(12,6) = 28.
From _Peter Luschny_, May 18 2016: (Start)
a(40) = -57 because the sum of the elements on the antidiagonal of DTD(40) is -57.
The DTD(40) is:
[   1    2    4   5  8  10  20  40]
[   1    2    1   3  2  10  20   0]
[   1   -1    2  -1  8  10   0   0]
[  -2    3   -3   9  2   0   0   0]
[   5   -6   12  -7  0   0   0   0]
[ -11   18  -19   0  0   0   0   0]
[  29  -37    0   0  0   0   0   0]
[ -66    0    0   0  0   0   0   0]
(End)
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
    local D, nD;
    D:= sort(convert(numtheory:-divisors(n),list));
    nD:= nops(D);
    CurveFitting:-PolynomialInterpolation([$0..nD-1],D, nD)
    end proc:
    map(f, [$1..100]); # Robert Israel, May 18 2016
  • Mathematica
    a[n_] := (d = Divisors[n]; t = Table[Differences[d, k], {k, 0, lg = Length[d]}]; Sum[t[[lg - k + 1, k]], {k, 1, lg}]);
    Array[a, 77] (* Jean-François Alcover, Jan 25 2018 *)
  • Sage
    def A161700(n):
        D = divisors(n)
        T = matrix(ZZ, len(D))
        for (m, d) in enumerate(D):
            T[0, m] = d
            for k in range(m-1, -1, -1) :
                T[m-k, k] = T[m-k-1, k+1] - T[m-k-1, k]
        return sum(T[k,len(D)-k-1] for k in range(len(D)))
    print([A161700(n) for n in range(1,78)]) # Peter Luschny, May 18 2016

Formula

a(n) = EDP(n,tau(n)) with tau = A000005 and EDP(n,x) = interpolating polynomial for the divisors of n.
EDP(n,A000005(n) - 1) = n;
EDP(n,1) = A020639(n);
EDP(n,0) = 1;
EDP(n,k) = A027750(A006218(n-1)+k+1), 0<=k < A000005(n).

Extensions

New name from Peter Luschny, May 18 2016

A086514 Difference between the arithmetic mean of the neighbors of the terms and the term itself follows the pattern 0,1,2,3,4,5,...

Original entry on oeis.org

1, 2, 3, 6, 13, 26, 47, 78, 121, 178, 251, 342, 453, 586, 743, 926, 1137, 1378, 1651, 1958, 2301, 2682, 3103, 3566, 4073, 4626, 5227, 5878, 6581, 7338, 8151, 9022, 9953, 10946, 12003, 13126, 14317, 15578, 16911, 18318, 19801, 21362, 23003, 24726
Offset: 1

Views

Author

Amarnath Murthy, Jul 29 2003

Keywords

Comments

{a(k): 1 <= k <= 4} = divisors of 6. - Reinhard Zumkeller, Jun 17 2009

Examples

			2 = (1+3)/2 -0. 3 = (2+6)/2 - 1, 6 = (3+13)/2 - 2, etc.
		

Crossrefs

Programs

Formula

a(n)+ n-2 = {a(n-1) +a(n+1)}/2
a(n) = (n^3-6*n^2+14*n-6)/3.
Contribution from Bruno Berselli, May 31 2010: (Start)
G.f.: (1-2*x+x^2+2*x^3)/(1-x)^4.
a(n)-4*a(n-1)+6*a(n-2)-4*a(n-3)+a(n-4) = 0 with n>4. For n=9, 121-4*78+6*47-4*26+13 = 0.
a(n) = ( A177342(n)-A000290(n-1)-3*A014106(n-2) )/4 with n>1. For n=11, a(11) = (1671-100-3*189)/4 = 251. (End)

Extensions

More terms from David Wasserman, Mar 10 2005

A161706 a(n) = (-11*n^5 + 145*n^4 - 635*n^3 + 1115*n^2 - 494*n + 120)/120.

Original entry on oeis.org

1, 2, 4, 5, 10, 20, 21, -27, -201, -626, -1486, -3035, -5608, -9632, -15637, -24267, -36291, -52614, -74288, -102523, -138698, -184372, -241295, -311419, -396909, -500154, -623778, -770651, -943900, -1146920, -1383385, -1657259, -1972807
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 17 2009

Keywords

Comments

{a(k): 0 <= k < 6} = divisors of 20:
a(n) = A027750(A006218(19) + k + 1), 0 <= k < A000005(20).

Examples

			Differences of divisors of 20 to compute the coefficients of their interpolating polynomial, see formula:
  1     2     4     5    10    20
     1     2     1     5    10
        1    -1     4     5
          -2     5     1
              7    -4
               -11
		

Crossrefs

Programs

  • Magma
    [(-11*n^5 + 145*n^4 - 635*n^3 + 1115*n^2 - 494*n + 120)/120: n in [0..50]]; // Vincenzo Librandi, Dec 27 2010
    
  • Maple
    A161706:=n->(-11*n^5 + 145*n^4 - 635*n^3 + 1115*n^2 - 494*n + 120)/120: seq(A161706(n), n=0..50); # Wesley Ivan Hurt, Jul 16 2017
  • Mathematica
    CoefficientList[Series[(1 - 4*x + 7*x^2 - 9*x^3 + 15*x^4 - 21*x^5)/(1 - x)^6, {x, 0, 50}], x] (* G. C. Greubel, Jul 16 2017 *)
  • PARI
    a(n)=(-11*n^5+145*n^4-635*n^3+1115*n^2-494*n+120)/120 \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    def A161706(n): return (n*(n*(n*(n*(145 - 11*n) - 635) + 1115) - 494) + 120)//15>>3 # Chai Wah Wu, Oct 23 2023

Formula

a(n) = C(n,0) + C(n,1) + C(n,2) - 2*C(n,3) + 7*C(n,4) - 11*C(n,5).
G.f.: (1-4*x+7*x^2-9*x^3+15*x^4-21*x^5)/(1-x)^6. - Colin Barker, Apr 25 2012

A161710 a(n) = (-6*n^7 + 154*n^6 - 1533*n^5 + 7525*n^4 - 18879*n^3 + 22561*n^2 - 7302*n + 2520)/2520.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 24, 39, -2, -295, -1308, -3980, -9996, -22150, -44808, -84483, -150534, -256001, -418588, -661806, -1016288, -1521288, -2226376, -3193341, -4498314, -6234123, -8512892, -11468896, -15261684, -20079482, -26142888
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 17 2009

Keywords

Comments

{a(k): 0 <= k < 8} = divisors of 24:
a(n) = A027750(A006218(23) + k + 1), 0 <= k < A000005(24).

Examples

			Differences of divisors of 24 to compute the coefficients of their interpolating polynomial, see formula:
1 ... 2 ... 3 ... 4 ... 6 ... 8 .. 12 .. 24
.. 1 ... 1 ... 1 ... 2 ... 2 ... 4 .. 12
..... 0 ... 0 ... 1 ... 0 ... 2 ... 8
........ 0 ... 1 .. -1 ... 2 ... 6
........... 1 .. -2 ... 3 ... 4
............. -3 ... 5 ... 1
................. 8 .. -4
.................. -12.
		

Crossrefs

Programs

  • Magma
    [(-6*n^7 + 154*n^6 - 1533*n^5 + 7525*n^4 - 18879*n^ 3 + 22561*n^2 - 7302*n + 2520)/2520: n in [0..40]]; // Vincenzo Librandi, Jul 17 2011
    
  • Mathematica
    Table[(-6n^7+154n^6-1533n^5+7525n^4-18879n^3+22561n^2-7302n+2520)/2520,{n,0,40}] (* or *) LinearRecurrence[{8,-28,56,-70,56,-28,8,-1},{1,2,3,4,6,8,12,24},40] (* Harvey P. Dale, Jul 15 2012 *)
  • PARI
    a(n)=(-6*n^7+154*n^6-1533*n^5+7525*n^4-18879*n^3+22561*n^2-7302*n+2520)/2520 \\ Charles R Greathouse IV, Sep 24 2015
  • Python
    A161710_list, m = [1], [-12, 80, -223, 333, -281, 127, -23, 1]
    for _ in range(1,10**2):
        for i in range(7):
            m[i+1]+= m[i]
        A161710_list.append(m[-1]) # Chai Wah Wu, Nov 09 2014
    

Formula

a(n) = C(n,0) + C(n,1) + C(n,4) - 3*C(n,5) + 8*C(n,6) - 12*C(n,7).
G.f.: (1-6*x+15*x^2-20*x^3+16*x^4-12*x^5+18*x^6-24*x^7)/(1-x)^8. - Bruno Berselli, Jul 17 2011
a(0)=1, a(1)=2, a(2)=3, a(3)=4, a(4)=6, a(5)=8, a(6)=12, a(7)=24, a(n)=8*a(n-1)-28*a(n-2)+56*a(n-3)-70*a(n-4)+56*a(n-5)-28*a(n-6)+ 8*a(n-7)- a(n-8). - Harvey P. Dale, Jul 15 2012
Showing 1-10 of 29 results. Next