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 35 results. Next

A000290 The squares: a(n) = n^2.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500
Offset: 0

Views

Author

Keywords

Comments

To test if a number is a square, see Cohen, p. 40. - N. J. A. Sloane, Jun 19 2011
Zero followed by partial sums of A005408 (odd numbers). - Jeremy Gardiner, Aug 13 2002
Begin with n, add the next number, subtract the previous number and so on ending with subtracting a 1: a(n) = n + (n+1) - (n-1) + (n+2) - (n-2) + (n+3) - (n-3) + ... + (2n-1) - 1 = n^2. - Amarnath Murthy, Mar 24 2004
Sum of two consecutive triangular numbers A000217. - Lekraj Beedassy, May 14 2004
Numbers with an odd number of divisors: {d(n^2) = A048691(n); for the first occurrence of 2n + 1 divisors, see A071571(n)}. - Lekraj Beedassy, Jun 30 2004
See also A000037.
First sequence ever computed by electronic computer, on EDSAC, May 06 1949 (see Renwick link). - Russ Cox, Apr 20 2006
Numbers k such that the imaginary quadratic field Q(sqrt(-k)) has four units. - Marc LeBrun, Apr 12 2006
For n > 0: number of divisors of (n-1)th power of any squarefree semiprime: a(n) = A000005(A006881(k)^(n-1)); a(n) = A000005(A000400(n-1)) = A000005(A011557(n-1)) = A000005(A001023(n-1)) = A000005(A001024(n-1)). - Reinhard Zumkeller, Mar 04 2007
If a 2-set Y and an (n-2)-set Z are disjoint subsets of an n-set X then a(n-2) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 19 2007
Numbers a such that a^1/2 + b^1/2 = c^1/2 and a^2 + b = c. - Cino Hilliard, Feb 07 2008 (this comment needs clarification, Joerg Arndt, Sep 12 2013)
Numbers k such that the geometric mean of the divisors of k is an integer. - Ctibor O. Zizka, Jun 26 2008
Equals row sums of triangle A143470. Example: 36 = sum of row 6 terms: (23 + 7 + 3 + 1 + 1 + 1). - Gary W. Adamson, Aug 17 2008
Equals row sums of triangles A143595 and A056944. - Gary W. Adamson, Aug 26 2008
Number of divisors of 6^(n-1) for n > 0. - J. Lowell, Aug 30 2008
Denominators of Lyman spectrum of hydrogen atom. Numerators are A005563. A000290-A005563 = A000012. - Paul Curtz, Nov 06 2008
a(n) is the number of all partitions of the sum 2^2 + 2^2 + ... + 2^2, (n-1) times, into powers of 2. - Valentin Bakoev, Mar 03 2009
a(n) is the maximal number of squares that can be 'on' in an n X n board so that all the squares turn 'off' after applying the operation: in any 2 X 2 sub-board, a square turns from 'on' to 'off' if the other three are off. - Srikanth K S, Jun 25 2009
Zero together with the numbers k such that 2 is the number of perfect partitions of k. - Juri-Stepan Gerasimov, Sep 26 2009
Totally multiplicative sequence with a(p) = p^2 for prime p. - Jaroslav Krizek, Nov 01 2009
Satisfies A(x)/A(x^2), A(x) = A173277: (1, 4, 13, 32, 74, ...). - Gary W. Adamson, Feb 14 2010
Positive members are the integers with an odd number of odd divisors and an even number of even divisors. See also A120349, A120359, A181792, A181793, A181795. - Matthew Vandermast, Nov 14 2010
Besides the first term, this sequence is the denominator of Pi^2/6 = 1 + 1/4 + 1/9 + 1/16 + 1/25 + 1/36 + ... . - Mohammad K. Azarian, Nov 01 2011
Partial sums give A000330. - Omar E. Pol, Jan 12 2013
Drmota, Mauduit, and Rivat proved that the Thue-Morse sequence along the squares is normal; see A228039. - Jonathan Sondow, Sep 03 2013
a(n) can be decomposed into the sum of the four numbers [binomial(n, 1) + binomial(n, 2) + binomial(n-1, 1) + binomial(n-1, 2)] which form a "square" in Pascal's Triangle A007318, or the sum of the two numbers [binomial(n, 2) + binomial(n+1, 2)], or the difference of the two numbers [binomial(n+2, 3) - binomial(n, 3)]. - John Molokach, Sep 26 2013
In terms of triangular tiling, the number of equilateral triangles with side length 1 inside an equilateral triangle with side length n. - K. G. Stier, Oct 30 2013
Number of positive roots in the root systems of type B_n and C_n (when n > 1). - Tom Edgar, Nov 05 2013
Squares of squares (fourth powers) are also called biquadratic numbers: A000583. - M. F. Hasler, Dec 29 2013
For n > 0, a(n) is the largest integer k such that k^2 + n is a multiple of k + n. More generally, for m > 0 and n > 0, the largest integer k such that k^(2*m) + n is a multiple of k + n is given by k = n^(2*m). - Derek Orr, Sep 03 2014
For n > 0, a(n) is the number of compositions of n + 5 into n parts avoiding the part 2. - Milan Janjic, Jan 07 2016
a(n), for n >= 3, is also the number of all connected subtrees of a cycle graph, having n vertices. - Viktar Karatchenia, Mar 02 2016
On every sequence of natural continuous numbers with an even number of elements, the summatory of the second half of the sequence minus the summatory of the first half of the sequence is always a square. Example: Sequence from 61 to 70 has an even number of elements (10). Then 61 + 62 + 63 + 64 + 65 = 315; 66 + 67 + 68 + 69 + 70 = 340; 340 - 315 = 25. (n/2)^2 for n = number of elements. - César Aguilera, Jun 20 2016
On every sequence of natural continuous numbers from n^2 to (n+1)^2, the sum of the differences of pairs of elements of the two halves in every combination possible is always (n+1)^2. - César Aguilera, Jun 24 2016
Suppose two circles with radius 1 are tangent to each other as well as to a line not passing through the point of tangency. Create a third circle tangent to both circles as well as the line. If this process is continued, a(n) for n > 0 is the reciprocals of the radii of the circles, beginning with the largest circle. - Melvin Peralta, Aug 18 2016
Does not satisfy Benford's law [Ross, 2012]. - N. J. A. Sloane, Feb 08 2017
Numerators of the solution to the generalization of the Feynman triangle problem, with an offset of 2. If each vertex of a triangle is joined to the point (1/p) along the opposite side (measured say clockwise), then the area of the inner triangle formed by these lines is equal to (p - 2)^2/(p^2 - p + 1) times the area of the original triangle, p > 2. For example, when p = 3, the ratio of the areas is 1/7. The denominators of the ratio of the areas is given by A002061. [Cook & Wood, 2004] - Joe Marasco, Feb 20 2017
Equals row sums of triangle A004737, n >= 1. - Martin Michael Musatov, Nov 07 2017
Right-hand side of the binomial coefficient identity Sum_{k = 0..n} (-1)^(n+k+1)*binomial(n,k)*binomial(n + k,k)*(n - k) = n^2. - Peter Bala, Jan 12 2022
Conjecture: For n>0, min{k such that there exist subsets A,B of {0,1,2,...,a(n)-1} such that |A|=|B|=k and A+B contains {0,1,2,...,a(n)-1}} = n. - Michael Chu, Mar 09 2022
Number of 3-permutations of n elements avoiding the patterns 132, 213, 321. See Bonichon and Sun. - Michel Marcus, Aug 20 2022
Number of intercalates in cyclic Latin squares of order 2n (cyclic Latin squares of odd order do not have intercalates). - Eduard I. Vatutin, Feb 15 2024
a(n) is the number of ternary strings of length n with at most one 0, exactly one 1, and no restriction on the number of 2's. For example, a(3)=9, consisting of the 6 permutations of the string 102 and the 3 permutations of the string 122. - Enrique Navarrete, Mar 12 2025

Examples

			For n = 8, a(8) = 8 * 15 - (1 + 3 + 5 + 7 + 9 + 11 + 13) - 7 = 8 * 15 - 49 - 7 = 64. - _Bruno Berselli_, May 04 2010
G.f. = x + 4*x^2 + 9*x^3 + 16*x^4 + 25*x^5 + 36*x^6 + 49*x^7 + 64*x^8 + 81*x^9 + ...
a(4) = 16. For n = 4 vertices, the cycle graph C4 is A-B-C-D-A. The subtrees are: 4 singles: A, B, C, D; 4 pairs: A-B, BC, C-D, A-D; 4 triples: A-B-C, B-C-D, C-D-A, D-A-B; 4 quads: A-B-C-D, B-C-D-A, C-D-A-B, D-A-B-C; 4 + 4 + 4 + 4 = 16. - _Viktar Karatchenia_, Mar 02 2016
		

References

  • G. L. Alexanderson et al., The William Lowell Putnam Mathematical Competition, Problems and Solutions: 1965-1984, "December 1967 Problem B4(a)", pp. 8(157) MAA Washington DC 1985.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Chapter XV, pp. 135-167.
  • R. P. Burn & A. Chetwynd, A Cascade Of Numbers, "The prison door problem" Problem 4 pp. 5-7; 79-80 Arnold London 1996.
  • H. Cohen, A Course in Computational Algebraic Number Theory, Springer, 1996, p. 40.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 31, 36, 38, 63.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), p. 6.
  • M. Gardner, Time Travel and Other Mathematical Bewilderments, Chapter 6 pp. 71-2, W. H. Freeman NY 1988.
  • Granino A. Korn and Theresa M. Korn, Mathematical Handbook for Scientists and Engineers, McGraw-Hill Book Company, New York (1968), p. 982.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.1 Terminology and §8.6 Figurate Numbers, pp. 264, 290-291.
  • Alfred S. Posamentier, The Art of Problem Solving, Section 2.4 "The Long Cell Block" pp. 10-1; 12; 156-7 Corwin Press Thousand Oaks CA 1996.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 35, 52-53, 129-132, 244.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • 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).
  • J. K. Strayer, Elementary Number Theory, Exercise Set 3.3 Problems 32, 33, p. 88, PWS Publishing Co. Boston MA 1996.
  • C. W. Trigg, Mathematical Quickies, "The Lucky Prisoners" Problem 141 pp. 40, 141, Dover NY 1985.
  • R. Vakil, A Mathematical Mosaic, "The Painted Lockers" pp. 127;134 Brendan Kelly Burlington Ontario 1996.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 123.

Crossrefs

Cf. A092205, A128200, A005408, A128201, A002522, A005563, A008865, A059100, A143051, A143470, A143595, A056944, A001157 (inverse Möbius transform), A001788 (binomial transform), A228039, A001105, A004159, A159918, A173277, A095794, A162395, A186646 (Pisano periods), A028338 (2nd diagonal).
A row or column of A132191.
This sequence is related to partitions of 2^n into powers of 2, as it is shown in A002577. So A002577 connects the squares and A000447. - Valentin Bakoev, Mar 03 2009
Boustrophedon transforms: A000697, A000745.
Cf. A342819.
Cf. A013661.

Programs

Formula

G.f.: x*(1 + x) / (1 - x)^3.
E.g.f.: exp(x)*(x + x^2).
Dirichlet g.f.: zeta(s-2).
a(n) = a(-n).
Multiplicative with a(p^e) = p^(2*e). - David W. Wilson, Aug 01 2001
Sum of all matrix elements M(i, j) = 2*i/(i+j) (i, j = 1..n). a(n) = Sum_{i = 1..n} Sum_{j = 1..n} 2*i/(i + j). - Alexander Adamchuk, Oct 24 2004
a(0) = 0, a(1) = 1, a(n) = 2*a(n-1) - a(n-2) + 2. - Miklos Kristof, Mar 09 2005
From Pierre CAMI, Oct 22 2006: (Start)
a(n) is the sum of the odd numbers from 1 to 2*n - 1.
a(0) = 0, a(1) = 1, then a(n) = a(n-1) + 2*n - 1. (End)
For n > 0: a(n) = A130064(n)*A130065(n). - Reinhard Zumkeller, May 05 2007
a(n) = Sum_{k = 1..n} A002024(n, k). - Reinhard Zumkeller, Jun 24 2007
Left edge of the triangle in A132111: a(n) = A132111(n, 0). - Reinhard Zumkeller, Aug 10 2007
Binomial transform of [1, 3, 2, 0, 0, 0, ...]. - Gary W. Adamson, Nov 21 2007
a(n) = binomial(n+1, 2) + binomial(n, 2).
This sequence could be derived from the following general formula (cf. A001286, A000330): n*(n+1)*...*(n+k)*(n + (n+1) + ... + (n+k))/((k+2)!*(k+1)/2) at k = 0. Indeed, using the formula for the sum of the arithmetic progression (n + (n+1) + ... + (n+k)) = (2*n + k)*(k + 1)/2 the general formula could be rewritten as: n*(n+1)*...*(n+k)*(2*n+k)/(k+2)! so for k = 0 above general formula degenerates to n*(2*n + 0)/(0 + 2) = n^2. - Alexander R. Povolotsky, May 18 2008
From a(4) recurrence formula a(n+3) = 3*a(n+2) - 3*a(n+1) + a(n) and a(1) = 1, a(2) = 4, a(3) = 9. - Artur Jasinski, Oct 21 2008
The recurrence a(n+3) = 3*a(n+2) - 3*a(n+1) + a(n) is satisfied by all k-gonal sequences from a(3), with a(0) = 0, a(1) = 1, a(2) = k. - Jaume Oliver Lafont, Nov 18 2008
a(n) = floor(n*(n+1)*(Sum_{i = 1..n} 1/(n*(n+1)))). - Ctibor O. Zizka, Mar 07 2009
Product_{i >= 2} 1 - 2/a(i) = -sin(A063448)/A063448. - R. J. Mathar, Mar 12 2009
a(n) = A002378(n-1) + n. - Jaroslav Krizek, Jun 14 2009
a(n) = n*A005408(n-1) - (Sum_{i = 1..n-2} A005408(i)) - (n-1) = n*A005408(n-1) - a(n-1) - (n-1). - Bruno Berselli, May 04 2010
a(n) == 1 (mod n+1). - Bruno Berselli, Jun 03 2010
a(n) = a(n-1) + a(n-2) - a(n-3) + 4, n > 2. - Gary Detlefs, Sep 07 2010
a(n+1) = Integral_{x >= 0} exp(-x)/( (Pn(x)*exp(-x)*Ei(x) - Qn(x))^2 +(Pi*exp(-x)*Pn(x))^2 ), with Pn the Laguerre polynomial of order n and Qn the secondary Laguerre polynomial defined by Qn(x) = Integral_{t >= 0} (Pn(x) - Pn(t))*exp(-t)/(x-t). - Groux Roland, Dec 08 2010
Euler transform of length-2 sequence [4, -1]. - Michael Somos, Feb 12 2011
A162395(n) = -(-1)^n * a(n). - Michael Somos, Mar 19 2011
a(n) = A004201(A000217(n)); A007606(a(n)) = A000384(n); A007607(a(n)) = A001105(n). - Reinhard Zumkeller, Feb 12 2011
Sum_{n >= 1} 1/a(n)^k = (2*Pi)^k*B_k/(2*k!) = zeta(2*k) with Bernoulli numbers B_k = -1, 1/6, 1/30, 1/42, ... for k >= 0. See A019673, A195055/10 etc. [Jolley eq 319].
Sum_{n>=1} (-1)^(n+1)/a(n)^k = 2^(k-1)*Pi^k*(1-1/2^(k-1))*B_k/k! [Jolley eq 320] with B_k as above.
A007968(a(n)) = 0. - Reinhard Zumkeller, Jun 18 2011
A071974(a(n)) = n; A071975(a(n)) = 1. - Reinhard Zumkeller, Jul 10 2011
a(n) = A199332(2*n - 1, n). - Reinhard Zumkeller, Nov 23 2011
For n >= 1, a(n) = Sum_{d|n} phi(d)*psi(d), where phi is A000010 and psi is A001615. - Enrique Pérez Herrero, Feb 29 2012
a(n) = A000217(n^2) - A000217(n^2 - 1), for n > 0. - Ivan N. Ianakiev, May 30 2012
a(n) = (A000217(n) + A000326(n))/2. - Omar E. Pol, Jan 11 2013
a(n) = A162610(n, n) = A209297(n, n) for n > 0. - Reinhard Zumkeller, Jan 19 2013
a(A000217(n)) = Sum_{i = 1..n} Sum_{j = 1..n} i*j, for n > 0. - Ivan N. Ianakiev, Apr 20 2013
a(n) = A133280(A000217(n)). - Ivan N. Ianakiev, Aug 13 2013
a(2*a(n)+2*n+1) = a(2*a(n)+2*n) + a(2*n+1). - Vladimir Shevelev, Jan 24 2014
a(n+1) = Sum_{t1+2*t2+...+n*tn = n} (-1)^(n+t1+t2+...+tn)*multinomial(t1+t2 +...+tn,t1,t2,...,tn)*4^(t1)*7^(t2)*8^(t3+...+tn). - Mircea Merca, Feb 27 2014
a(n) = floor(1/(1-cos(1/n)))/2 = floor(1/(1-n*sin(1/n)))/6, n > 0. - Clark Kimberling, Oct 08 2014
a(n) = ceiling(Sum_{k >= 1} log(k)/k^(1+1/n)) = -Zeta'[1+1/n]. Thus any exponent greater than 1 applied to k yields convergence. The fractional portion declines from A073002 = 0.93754... at n = 1 and converges slowly to 0.9271841545163232... for large n. - Richard R. Forberg, Dec 24 2014
a(n) = Sum_{j = 1..n} Sum_{i = 1..n} ceiling((i + j - n + 1)/3). - Wesley Ivan Hurt, Mar 12 2015
a(n) = Product_{j = 1..n-1} 2 - 2*cos(2*j*Pi/n). - Michel Marcus, Jul 24 2015
From Ilya Gutkovskiy, Jun 21 2016: (Start)
Product_{n >= 1} (1 + 1/a(n)) = sinh(Pi)/Pi = A156648.
Sum_{n >= 0} 1/a(n!) = BesselI(0, 2) = A070910. (End)
a(n) = A028338(n, n-1), n >= 1 (second diagonal). - Wolfdieter Lang, Jul 21 2017
For n >= 1, a(n) = Sum_{d|n} sigma_2(d)*mu(n/d) = Sum_{d|n} A001157(d)*A008683(n/d). - Ridouane Oudra, Apr 15 2021
a(n) = Sum_{i = 1..2*n-1} ceiling(n - i/2). - Stefano Spezia, Apr 16 2021
From Richard L. Ollerton, May 09 2021: (Start) For n >= 1,
a(n) = Sum_{k=1..n} psi(n/gcd(n,k)).
a(n) = Sum_{k=1..n} psi(gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)).
a(n) = Sum_{k=1..n} sigma_2(n/gcd(n,k))*mu(gcd(n,k))/phi(n/gcd(n,k)).
a(n) = Sum_{k=1..n} sigma_2(gcd(n,k))*mu(n/gcd(n,k))/phi(n/gcd(n,k)). (End)
a(n) = (A005449(n) + A000326(n))/3. - Klaus Purath, May 13 2021
Let T(n) = A000217(n), then a(T(n)) + a(T(n+1)) = T(a(n+1)). - Charlie Marion, Jun 27 2022
a(n) = Sum_{k=1..n} sigma_1(k) + Sum_{i=1..n} (n mod i). - Vadim Kataev, Dec 07 2022
a(n^2) + a(n^2+1) + ... + a(n^2+n) + 4*A000537(n) = a(n^2+n+1) + ... + a(n^2+2n). In general, if P(k,n) = the n-th k-gonal number, then P(2k,n^2) + P(2k,n^2+1) + ... + P(2k,n^2+n) + 4*(k-1)*A000537(n) = P(2k,n^2+n+1) + ... + P(2k,n^2+2n). - Charlie Marion, Apr 26 2024
Sum_{n>=1} 1/a(n) = A013661. - Alois P. Heinz, Oct 19 2024
a(n) = 1 + 3^3*((n-1)/(n+1))^2 + 5^3*((n-1)*(n-2)/((n+1)*(n+2)))^2 + 7^3*((n-1)*(n-2)*(n-3)/((n+1)*(n+2)*(n+3)))^2 + ... for n >= 1. - Peter Bala, Dec 09 2024

Extensions

Incorrect comment and example removed by Joerg Arndt, Mar 11 2010

A010790 a(n) = n!*(n+1)!.

Original entry on oeis.org

1, 2, 12, 144, 2880, 86400, 3628800, 203212800, 14631321600, 1316818944000, 144850083840000, 19120211066880000, 2982752926433280000, 542861032610856960000, 114000816848279961600000, 27360196043587190784000000, 7441973323855715893248000000
Offset: 0

Views

Author

Keywords

Comments

Let M_n be the symmetrical n X n matrix M_n(i,j)=1/min(i,j); then for n>=0 det(M_n)=(-1)^(n-1)/a(n-1). - Benoit Cloitre, Apr 27 2002
If n women and n men are to be seated around a circular table, with no two of the same sex seated next to each other, the number of possible arrangements is a(n-1). - Ross La Haye, Jan 06 2009
a(n-1) is also the number of (directed) Hamiltonian cycles in the complete bipartite graph K_{n,n}. - Eric W. Weisstein, Jul 15 2011
a(n) is also number of ways to place k nonattacking semi-bishops on an n X n board, sum over all k>=0 (for definition see A187235). - Vaclav Kotesovec, Dec 06 2011
a(n) is number of permutations of {1,2,3,...,2n} such that no odd numbers are adjacent. - Ran Pan, May 23 2015
a(n) is number of permutations of {1,2,3,...,2n+1} such that no odd numbers are adjacent. - Ran Pan, May 23 2015
a(n-1) is the number of elements of the wreath product of S_n and S_2 with cycle partition equal to (2n), where S_n is the symmetric group of order n. - Josaphat Baolahy, Mar 12 2024

Examples

			G.f. = 1 + 2*x + 12*x^2 + 144*x^3 + 2880*x^4 + 86400*x^5 + ...
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, pp. 63-65.
  • Kenneth H. Rosen, Editor-in-Chief, Handbook of Discrete and Combinatorial Mathematics, CRC Press, 2000, page 91. [Ross La Haye, Jan 06 2009]

Crossrefs

Second column of triangle A129065.

Programs

  • Magma
    [Factorial(n)*Factorial(n+1): n in [0..20]]; // Vincenzo Librandi, Aug 08 2014
    
  • Maple
    f:= n-> n!*(n+1)!: seq(f(n), n=0..30);
  • Mathematica
    s=1;lst={s};Do[s+=(s*=n)*n;AppendTo[lst, s], {n, 1, 4!, 1}];lst (* Vladimir Joseph Stephan Orlovsky, Nov 15 2008 *)
    Times@@@Partition[Range[0,25]!,2,1] (* Harvey P. Dale, Jun 17 2011 *)
  • PARI
    a(n)= n!^2*(n+1) \\ Charles R Greathouse IV, Jul 31 2011
    
  • Python
    from math import factorial
    def A010790(n): return factorial(n)**2*(n+1) # Chai Wah Wu, Apr 22 2024
  • Sage
    [stirling_number1(n,1)*factorial (n-2) for n in range(2, 17)] # Zerinvary Lajos, Jul 07 2009
    

Formula

From Karol A. Penson, Oct 23 2001: (Start)
Integral representation as n-th moment of a positive function f on the positive half axis, where f(x) = 2*sqrt(x)*BesselK(1, 2*sqrt(x)). Then:
a(n) = Integral_{x>=0} x^n * f(x) dx.
G.f.: a(0) = 1 and a(n) = subs(x=0, n!*diff(1/((x-1)^2), x$n)) for n >= 1. (End)
Sum_{i >=0} 1/a(i) = A096789. - Gerald McGarvey, Jun 10 2004
With b(n)=A002378(n) for n>0 and b(0)=1, a(n) = b(n)*b(n-1)...*b(0). - Tom Copeland, Sep 21 2011
a(n) = det(PS(i+1,j), 1 <= i,j <= n), where PS(n,k) are Legendre-Stirling numbers of the second kind. - Mircea Merca, Apr 04 2013
a(n) = (2*n)! / A000108(n) which implies that the e.g.f. of A126120 is Sum_{k>=0} x^(2*k) / a(k). - Michael Somos, Nov 15 2014
0 = a(n)*(+18*a(n+2) - 15*a(n+3) + a(n+4)) + a(n+1)*(-9*a(n+2) - 4*a(n+3)) + a(n+2)*(+3*a(n+2)) for all n>=0. - Michael Somos, Nov 15 2014
From Ilya Gutkovskiy, Jan 20 2017: (Start)
a(n) ~ 2*Pi*n^(2*n+2)/exp(2*n).
Sum_{n>=0} (-1)^n/a(n) = BesselJ(1,2) = 0.576724807756873387202448... = A348607 (End)
D-finite with recurrence: a(n) -n*(n+1)*a(n-1)=0. - R. J. Mathar, Jan 27 2020
a(n) = 1/([x^n] hypergeom([], [2], x)). - Peter Luschny, Sep 13 2024

A027052 Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0, T(n,1)=0 for n >= 1, T(n,2)=1 for n >= 2 and for n >= 3, T(n,k) = T(n-1,k-3) + T(n-1, k-2) + T(n-1,k-1) for 3 <= k <= 2n-1. T(n,k)=0 for k < 0 or k > 2n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 3, 4, 1, 1, 0, 1, 2, 3, 6, 9, 8, 1, 1, 0, 1, 2, 3, 6, 11, 18, 23, 18, 1, 1, 0, 1, 2, 3, 6, 11, 20, 35, 52, 59, 42, 1, 1, 0, 1, 2, 3, 6, 11, 20, 37, 66, 107, 146, 153, 102, 1, 1, 0, 1, 2, 3, 6, 11, 20, 37, 68, 123, 210, 319, 406, 401, 256, 1
Offset: 0

Views

Author

Keywords

Comments

The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. - Jeremy Gardiner, Mar 16 2003

Examples

			Triangle T(n,k) for 0 <= k <= 2n:
  1;
  1, 0, 1;
  1, 0, 1, 2, 1;
  1, 0, 1, 2, 3, 4, 1;
  1, 0, 1, 2, 3, 6, 9, 8, 1;
		

Crossrefs

Cf. A001590, a tribonacci sequence.
Cf. A160999 (row sums), A005408 (row lengths).
Diagonals T(n, n+c): A027053 (c=2), A027054 (c=3), A027055 (c=4).
Diagonals T(n, 2n-c): A027056 (c=1), A027058 (c=2), A027059 (c=3), A027060 (c=4), A027061(c=5), A027062 (c=6), A027063 (c=7), A027064 (c=8), A027065 (c=9), A027066 (c=10).
Other related sequences: A027057, A027071.
Other arrays of this type: A027023, A027082, A027113.

Programs

  • GAP
    T:= function(n,k)
        if k=0 or k=2 or k=2*n then return 1;
        elif k=1 then return 0;
        else return Sum([1..3], j-> T(n-1, k-j) );
        fi;
      end;
    Flat(List([0..10], n-> List([0..2*n], k-> T(n,k) ))); # G. C. Greubel, Nov 05 2019
  • Maple
    T:= proc(n, k) option remember;
          if k=0 or k=2 or k=2*n then 1
        elif k=1 then 0
        else add(T(n-1, k-j), j=1..3)
          fi
        end:
    seq(seq(T(n, k), k=0..2*n), n=0..10); # G. C. Greubel, Nov 05 2019
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==2 || k==2*n, 1, If[k==1, 0, Sum[T[n-1, k-j], {j, 3}]]]; Table[T[n, k], {n, 0, 12}, {k, 0, 2*n}]//Flatten (* G. C. Greubel, Nov 05 2019 *)
  • PARI
    {T(n, k) = if(k==0 || k==2 || k==2*n, 1, if(k==1, 0, sum(j=1,3, T(n-1, k-j)) ))};
    for(n=0, 10, for(k=0,2*n, print1(T(n,k), ", "))) \\ G. C. Greubel, Nov 05 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0 or k==2 or k==2*n): return 1
        elif (k==1): return 0
        else: return sum(T(n-1, k-j) for j in (1..3))
    [[T(n, k) for k in (0..2*n)] for n in (0..10)] # G. C. Greubel, Nov 05 2019
    

Formula

A001590(k+1) = T(n,k) if 0 <= k <= n. - Michael Somos, Jun 01 2014

Extensions

Offset and keyword:tabl corrected by R. J. Mathar, Jun 01 2009

A008967 Coefficients of Gaussian polynomials q_binomial(n-2, 2). Also triangle of distribution of rank sums: Wilcoxon's statistic. Irregular triangle read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 3, 2, 2, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 2, 1, 1, 1, 1, 2, 2, 3, 3, 4, 3, 3, 2, 2, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1
Offset: 4

Views

Author

Keywords

Comments

Rows are numbers of dominoes with k spots where each half-domino has zero to n spots (in standard domino set: n=6, there are 28 dominoes and row is 1,1,2,2,3,3,4,3,3,2,2,1,1). - Henry Bottomley, Aug 23 2000
These numbers appear in the solution of Cayley's counting problem on covariants as N(p,2,w) = [x^p,q^w] Phi(q,x) with the o.g.f. Phi(q,x) = 1/((1-x)(1-qx)(1-q^2x)) given by Peter Bala in the formula section. See the Hawkins reference, p. 264, were also references are given. - Wolfdieter Lang, Nov 30 2012
The entry a(p,w), p >= 0, w = 0,1,...,2*p, of this irregular triangle is the number of nonnegative solutions of m_0 + m_1 + m_2 = p and 1*m_1 + 2*m_2 = w. See the Hawkins reference p. 264, (4.8). N(p,2,w) there is a(p,w). See also the Cayley reference p. 110, 35. with m = 2, Theta = p and q = w. - Wolfdieter Lang, Dec 01 2012
From Gus Wiseman, Sep 20 2023: (Start)
Also the number of unordered pairs of distinct positive integers up to n with sum k. For example, row n = 9 counts the following pairs:
12 13 14 15 16 17 18 19 29 39 49 59 69 79 89
23 24 25 26 27 28 38 48 58 68 78
34 35 36 37 47 57 67
45 46 56
Allowing repeated parts (x,x) gives A004737.
For strict partitions instead of just pairs we have A053632.
(End)

Examples

			1;
1,1,1;
1,1,2,1,1;
1,1,2,2,2,1,1;
1,1,2,2,3,2,2,1,1;
1,1,2,2,3,3,3,2,2,1,1;
...
Partitions: row p=2 and column w=2 has entry 2 because the 2 solutions of the two equations mentioned in a comment above are: m_0 = 0, m_1 = 2, m_2 = 0 and m_0 = 1, m_1 = 0, m_2 = 1. - _Wolfdieter Lang_, Dec 01 2012
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976, p. 242.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 236.
  • T. Hawkins, Emergence of the Theory of Lie Groups, Springer 2000, ch. 7.4, p. 260-5.

Crossrefs

A version with zeros is A219238.
This is the case of A365541 counting only length-2 subsets.

Programs

  • Maple
    qBinom := proc(n,m,q)
            mul((1-q^(n-i))/(1-q^(i+1)),i=0..m-1) ;
            factor(%) ;
            expand(%) ;
    end proc:
    A008967 := proc(n,k)
            coeftayl( qBinom(n,2,q),q=0,k ) ;
    end proc:
    seq(seq( A008967(n,k),k=0..2*n-4),n=2..10) ; # assumes offset 2. R. J. Mathar, Oct 13 2011
  • Mathematica
    rmax = 11; f[r_] := Product[(x^i - x^(r+1))/(1-x^i), {i, 1, r-2}]/  x^((r-1)*(r-2)/2); row[r_] := CoefficientList[ Series[ f[r], {x, 0, 2rmax}], x]; Flatten[ Table[ row[r], {r, 2, rmax}]] (* Jean-François Alcover, Oct 13 2011, after given formula *)
    T[n_, k_] := SeriesCoefficient[QBinomial[n - 2, 2, q], {q, 0, k}];
    Table[T[n, k], {n, 4, 13}, {k, 0, 2 n - 8}] // Flatten (* Jean-François Alcover, Aug 20 2019 *)
    Table[Length[Select[Subsets[Range[n],{2}],Total[#]==k&]],{n,2,15},{k,3,2n-1}] (* Gus Wiseman, Sep 20 2023 *)
  • SageMath
    print(flatten([q_binomial(n-2, 2).list() for n in (4..13)])) # Peter Luschny, Oct 23 2019

Formula

Let f(r) = Product( (x^i-x^(r+1))/(1-x^i), i = 1..r-2) / x^((r-1)*(r-2)/2); then expanding f(r) in powers of x and taking coefficients gives the successive rows of this triangle (with a different offset).
Expanding (q^n - 1)(q^(n+1) - 1)/((q - 1)(q^2 - 1)) in powers of q and taking coefficients gives the n-th row of the triangle. Ordinary generating function: 1/((1-x)(1-qx)(1-q^2x)) = 1 + x(1 + q + q^2) + x^2(1 + q + 2q^2 + q^3 + q^4) + .... - Peter Bala, Sep 23 2007
For n >= 2, let a(n,i) denote the i-th entry of the (n-1)-st row of this triangle; for every 0 <= i <= n-2, a(n,i) = a(n,2(n-2)-i) = ceiling((i+1)/2). - Christian Barrientos, Aug 08 2019

Extensions

More terms from Christian Barrientos, Aug 08 2019

A068911 Number of n-step walks (each step +-1 starting from 0) which are never more than 2 or less than -2.

Original entry on oeis.org

1, 2, 4, 6, 12, 18, 36, 54, 108, 162, 324, 486, 972, 1458, 2916, 4374, 8748, 13122, 26244, 39366, 78732, 118098, 236196, 354294, 708588, 1062882, 2125764, 3188646, 6377292, 9565938, 19131876, 28697814, 57395628, 86093442, 172186884, 258280326, 516560652
Offset: 0

Views

Author

Henry Bottomley, Mar 06 2002

Keywords

Comments

From Johannes W. Meijer, May 29 2010: (Start)
a(n) is the number of ways White can force checkmate in exactly (n+1) moves, n >= 0, ignoring the fifty-move and the triple repetition rules, in the following chess position: White Ka1, Ra8, Bc1, Nb8, pawns a6, a7, b2, c6, d2, f6, g5 and h6; Black Ke8, Nh8, pawns b3, c7, d3, f7, g6 and h7. (After Noam D. Elkies, see link; diagram 5).
Counts all paths of length n, n >= 0, starting at the third node on the path graph P_5, see the Maple program. (End)
From Alec Jones, Feb 25 2016: (Start)
The a(n) are the n-th terms in a "Fibonacci snake" drawn on a rectilinear grid. The n-th term is computed as the sum of the previous terms in cells adjacent to the n-th cell (diagonals included). (This sequence excludes the first term of the snake.)
For example:
1 ... 1 1 ... 1 4 1 4 6 ... 1 4 6 1 4 6 ... and so on.
1 ... 1 2 1 2 ... 1 2 1 2 12 ... 1 2 12 18 (End)
From Gus Wiseman, Oct 06 2023: (Start)
Also the number of subsets of {1..n} containing no two distinct elements summing to n. The a(0) = 1 through a(4) = 12 subsets are:
{} {} {} {} {}
{1} {1} {1} {1}
{2} {2} {2}
{1,2} {3} {3}
{1,3} {4}
{2,3} {1,2}
{1,4}
{2,3}
{2,4}
{3,4}
{1,2,4}
{2,3,4}
For n+1 instead of n we have A038754, complement A167762.
Including twins gives A117855, complement A366131.
The complement is counted by A365544.
For all subsets (not just pairs) we have A365377, complement A365376. (End)

Examples

			The a(3) = 6 walks: (0,-1,-2,-1), (0,-1,0,-1), (0,-1,0,1), (0,1,0,-1), (0,1,0,1), (0,1,2,1). - _Gus Wiseman_, Oct 10 2023
		

Crossrefs

Cf. A000007, A016116 (without initial term), A068912, A068913 for similar.
Equals A060647(n-1)+1.
First differences are A117855.

Programs

  • Magma
    [Floor((5-(-1)^n)*3^Floor(n/2)/3): n in [0..40]]; // Bruno Berselli, Feb 26 2016, after Charles R Greathouse IV
    
  • Maple
    with(GraphTheory): G:= PathGraph(5): A:=AdjacencyMatrix(G): nmax:=34; for n from 0 to nmax do B(n):=A^n; a(n):=add(B(n)[3,k], k=1..5) od: seq(a(n), n=0..nmax); # Johannes W. Meijer, May 29 2010
    # second Maple program:
    a:= proc(n) a(n):= `if`(n<2, n+1, (4-irem(n, 2))/2*a(n-1)) end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 03 2019
  • Mathematica
    Join[{1},Transpose[NestList[{Last[#],3First[#]}&,{2,4},40]][[1]]] (* Harvey P. Dale, Oct 24 2011 *)
    Table[Length[Select[Subsets[Range[n]],FreeQ[Total/@Subsets[#,{2}],n]&]],{n,0,15}] (* Gus Wiseman, Oct 06 2023 *)
  • PARI
    a(n)=[4,6][n%2+1]*3^(n\2)\3 \\ Charles R Greathouse IV, Feb 26 2016
    
  • Python
    def A068911(n): return 3**(n>>1)<<1 if n&1 else (3**(n-1>>1)<<2 if n else 1) # Chai Wah Wu, Aug 30 2024

Formula

a(n) = A068913(2, n) = 2*A038754(n-1) = 3*a(n-2) = a(n-1)*a(n-2)/a(n-3) starting with a(0)=1, a(1)=2, a(2)=4 and a(3)=6.
For n>0: a(2n) = 4*3^(n-1) = 2*a(2n-1); a(2n+1) = 2*3^n = 3*a(2n)/2 = 2*a(2n)-A000079(n-2).
From Paul Barry, Feb 17 2004: (Start)
G.f.: (1+x)^2/(1-3x^2).
a(n) = 2*3^((n+1)/2)*((1-(-1)^n)/6 + sqrt(3)*(1+(-1)^n)/9) - (1/3)*0^n.
The sequence 0, 1, 2, 4, ... has a(n) = 2*3^(n/2)*((1+(-1)^n)/6 + sqrt(3)*(1-(-1)^n)/9) - (2/3)*0^n + (1/3)*Sum_{k=0..n} binomial(n, k)*k*(-1)^k. (End)
a(n) = 2^((3 + (-1)^n)/2)*3^((2*n - 3 - (-1)^n)/4) - ((1 - (-1)^(2^n)))/6. - Luce ETIENNE, Aug 30 2014
For n > 2, indexing from 0, a(n) = a(n-1) + a(n-2) if n is odd, a(n-1) + a(n-2) + a(n-3) if n is even. - Alec Jones, Feb 25 2016
a(n) = 2*a(n-1) if n is even, a(n-1) + a(n-2) if n is odd. - Vincenzo Librandi, Feb 26 2016
E.g.f.: (4*cosh(sqrt(3)*x) + 2*sqrt(3)*sinh(sqrt(3)*x) - 1)/3. - Stefano Spezia, Feb 17 2022

A006590 a(n) = Sum_{k=1..n} ceiling(n/k).

Original entry on oeis.org

1, 3, 6, 9, 13, 16, 21, 24, 29, 33, 38, 41, 48, 51, 56, 61, 67, 70, 77, 80, 87, 92, 97, 100, 109, 113, 118, 123, 130, 133, 142, 145, 152, 157, 162, 167, 177, 180, 185, 190, 199, 202, 211, 214, 221, 228, 233, 236, 247, 251, 258, 263, 270, 273, 282, 287, 296, 301
Offset: 1

Views

Author

Keywords

Comments

The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. - Jeremy Gardiner, Mar 16 2003
Given the fact that ceiling(x) <= x+1, we can, using well known results for the harmonic series, easily derive that n*log(n) <= a(n) <= n*(1+log(n)) + n = n(log(n)+2). - Stefan Steinerberger, Apr 08 2006

References

  • Marc LeBrun, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006590 n = sum $ map f [1..n] where
       f x = y + 1 - 0 ^ r where (y, r) = divMod n x
    -- Reinhard Zumkeller, Feb 18 2013
    
  • Magma
    [&+[Ceiling(n/j): j in [1..n]] : n in [1..60]]; // G. C. Greubel, Nov 07 2019
    
  • Maple
    seq(add(ceil(n/j), j = 1..n), n = 1..60); # G. C. Greubel, Nov 07 2019
  • Mathematica
    Table[Sum[Ceiling[n/i], {i, 1, n}], {n, 1, 60}] (* Stefan Steinerberger, Apr 08 2006 *)
    nxt[{n_,a_}]:={n+1,a+DivisorSigma[0,n]+1}; Transpose[NestList[nxt,{1,1},60]][[2]] (* Harvey P. Dale, Aug 23 2013 *)
  • PARI
    first(n)=my(v=vector(n,i,i),s); for(i=1,n-1,v[i+1]+=s+=numdiv(i)); v \\ Charles R Greathouse IV, Feb 07 2017
    
  • PARI
    a(n) = n + sum(k=1, n-1, (n-1)\k); \\ Michel Marcus, Oct 10 2021
    
  • Python
    from math import isqrt
    def A006590(n): return (lambda m: n+2*sum((n-1)//k for k in range(1, m+1))-m*m)(isqrt(n-1)) # Chai Wah Wu, Oct 09 2021
  • Sage
    [sum(ceil(n/j) for j in (1..n)) for n in (1..60)] # G. C. Greubel, Nov 07 2019
    

Formula

a(n) = n+Sum_{k=1..n-1} tau(k). - Vladeta Jovovic, Oct 17 2002
a(n) = 1 + a(n-1) + tau(n-1), a(n) = A006218(n-1) + n. - T. D. Noe, Jan 05 2007
a(n) = a(n-1) + A000005(n) + 1 for n >= 2. a(n) = A161886(n) - A000005(n) + 1 = A161886(n-1) + 2 = A006218(n) + A049820(n) for n >= 1. - Jaroslav Krizek, Nov 14 2009

Extensions

More terms from Stefan Steinerberger, Apr 08 2006

A071797 Restart counting after each new odd integer (a fractal sequence).

Original entry on oeis.org

1, 1, 2, 3, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Offset: 1

Views

Author

Antonio Esposito, Jun 06 2002

Keywords

Comments

The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446.
This is also a triangle read by rows in which row n lists the first 2*n-1 positive integers, n >= 1 (see example). - Omar E. Pol, May 29 2012
a(n) mod 2 = A071028(n). - Boris Putievskiy, Jul 24 2013
The triangle in the example is the triangle used by Kircheri in 1664. See the link "Mundus Subterraneus". - Charles Kusniec, Sep 11 2022

Examples

			a(1)=1; a(9)=5; a(10)=1;
From _Omar E. Pol_, May 29 2012: (Start)
Written as a triangle the sequence begins:
  1;
  1, 2, 3;
  1, 2, 3, 4, 5;
  1, 2, 3, 4, 5, 6, 7;
  1, 2, 3, 4, 5, 6, 7, 8, 9;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15;
Row n has length 2*n - 1 = A005408(n-1). (End)
		

Crossrefs

Cf. A074294.
Row sums give positive terms of A000384.

Programs

  • Haskell
    import Data.List (inits)
    a071797 n = a071797_list !! (n-1)
    a071797_list = f $ tail $ inits [1..] where
       f (xs:_:xss) = xs ++ f xss
    -- Reinhard Zumkeller, Apr 14 2014
  • Maple
    A071797 := proc(n)
        n-A048760(n-1) ;
    end proc: # R. J. Mathar, May 29 2016
  • Mathematica
    Array[Range[2# - 1]&, 10] // Flatten (* Jean-François Alcover, Jan 30 2018 *)
  • PARI
    a(n)=if(n<1,0,n-sqrtint(n-1)^2)
    

Formula

a(n) = 1 + A053186(n-1).
a(n) = n - 1 - ceiling(sqrt(n))*(ceiling(sqrt(n))-2); n > 0.
a(n) = n - floor(sqrt(n-1))^2, distance between n and the next smaller square. - Marc LeBrun, Jan 14 2004

A156040 Number of compositions (ordered partitions) of n into 3 parts (some of which may be zero), where the first is at least as great as each of the others.

Original entry on oeis.org

1, 1, 3, 4, 6, 8, 11, 13, 17, 20, 24, 28, 33, 37, 43, 48, 54, 60, 67, 73, 81, 88, 96, 104, 113, 121, 131, 140, 150, 160, 171, 181, 193, 204, 216, 228, 241, 253, 267, 280, 294, 308, 323, 337, 353, 368, 384, 400, 417, 433, 451, 468, 486, 504, 523, 541, 561, 580, 600
Offset: 0

Views

Author

Jack W Grahl, Feb 02 2009, Feb 11 2009

Keywords

Comments

For n = 1, 2 these are just the triangular numbers. a(n) is always at least 1/3 of the corresponding triangular number, since each partition of this type gives up to three ordered partitions with the same cyclical order.
An alternative definition, which avoids using parts of size 0: a(n) is the third diagonal of A184957. - N. J. A. Sloane, Feb 27 2011
Diagonal sums of the triangle formed by rows T(2, k) k = 0, 1, ..., 2m of ascending m-nomial triangles (see A004737):
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 5 6 5 4 3 2 1
- Bob Selcoe, Feb 07 2014
Arrange A004396 in rows successively shifted to the right two spaces and sum the columns:
1 1 2 3 3 4 5 5 6 ...
1 1 2 3 3 4 5 ...
1 1 2 3 3 ...
1 1 2 ...
1 ...
------------------------------
1 1 3 4 6 8 11 13 17 ... - L. Edson Jeffery, Jul 30 2014
a(n) is the dimension of three-dimensional (2n + 2)-homogeneous polynomial vector fields with full tetrahedral symmetry (for a given orthogonal representation), and which are solenoidal. - Giedrius Alkauskas, Sep 30 2017
Also the number of compositions of n + 3 into three parts, the first at least as great as each of the other two. Also the number of compositions of n + 4 into three parts, the first strictly greater than each of the other two. - Gus Wiseman, Oct 09 2020

Examples

			G.f. = 1 + x + 3*x^2 + 4*x^3 + 6*x^4 + 8*x^5 + 11*x^6 + 13*x^7 + 17*x^8 + 20*x^9 + ...
The a(4) = 6 compositions of 4 are: (4 0 0), (3 1 0), (3 0 1), (2 2 0), (2 1 1), (2 0 2).
From _Gus Wiseman_, Oct 05 2020: (Start)
The a(0) = 1 through a(7) = 13 triples of nonnegative integers summing to n where the first is at least as great as each of the other two are:
  (000)  (100)  (101)  (111)  (202)  (212)  (222)  (313)
                (110)  (201)  (211)  (221)  (303)  (322)
                (200)  (210)  (220)  (302)  (312)  (331)
                       (300)  (301)  (311)  (321)  (403)
                              (310)  (320)  (330)  (412)
                              (400)  (401)  (402)  (421)
                                     (410)  (411)  (430)
                                     (500)  (420)  (502)
                                            (501)  (511)
                                            (510)  (520)
                                            (600)  (601)
                                                   (610)
                                                   (700)
(End)
		

Crossrefs

For compositions into 4 summands see A156039; also see A156041 and A156042.
Cf. A184957, A071619 (bisection).
A001399(n-2)*2 is the strict case.
A001840(n-2) is the version with opposite relations.
A001840(n-1) is the version with strict opposite relations.
A069905 is the case with strict relations.
A014311 ranks 3-part compositions, with strict case A337453.
A014612 ranks 3-part partitions, with strict case A007304.

Programs

  • Maple
    a:= proc(n) local m, r; m := iquo(n, 6, 'r'); (4 +6*m +2*r) *m + [1, 1, 3, 4, 6, 8][r+1] end: seq(a(n), n=0..60); # Alois P. Heinz, Jun 14 2009
  • Mathematica
    nn = 58; CoefficientList[Series[x^3/(1 - x^2)^2/(1 - x^3) + 1/(1 - x^2)^2/(1 - x), {x, 0, nn}], x] (* Geoffrey Critzer, Jul 14 2013 *)
    CoefficientList[Series[(1 + x^2)/((1 + x) * (1 + x + x^2) * (1 - x)^3), {x, 0, 58}], x] (* L. Edson Jeffery, Jul 29 2014 *)
    LinearRecurrence[{1, 1, 0, -1, -1, 1}, {1, 1, 3, 4, 6, 8}, 60] (* Harvey P. Dale, May 28 2015 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n+3,{3}],#[[1]]>=#[[2]]&&#[[1]]>=#[[3]]&]],{n,0,15}] (* Gus Wiseman, Oct 05 2020*)
  • PARI
    {a(n) = n*(n+4)\6 + 1}; /* Michael Somos, Mar 26 2017 */

Formula

G.f.: (x^2+1) / (1-x-x^2+x^4+x^5-x^6). - Alois P. Heinz, Jun 14 2009
Slightly nicer g.f.: (1+x^2)/((1-x)*(1-x^2)*(1-x^3)). - N. J. A. Sloane, Apr 29 2011
a(n) = A007590(n+2) - A000212(n+2). - Richard R. Forberg, Dec 08 2013
a(2*n) = A071619(n+1). - L. Edson Jeffery, Jul 29 2014
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6), with a(0) = 1, a(1) = 1, a(2) = 3, a(3) = 4, a(4) = 6, a(5) = 8. - Harvey P. Dale, May 28 2015
a(n) = (n^2 + 4*n + 3)/6 + IF(MOD(n, 2) = 0, 1/2) + IF(MOD(n, 3) = 1, -1/3). - Heinrich Ludwig, Mar 21 2017
a(n) = 1 + floor((n^2 + 4*n)/6). - Giovanni Resta, Mar 21 2017
Euler transform of length 4 sequence [1, 2, 1, -1]. - Michael Somos, Mar 26 2017
a(n) = a(-4 - n) for all n in Z. - Michael Somos, Mar 26 2017
0 = a(n)*(-1 + a(n) - 2*a(n+1) - 2*a(n+2) + 2*a(n+3)) + a(n+1)*(+1 + a(n+1) + 2*a(n+2) - 2*a(n+3)) + a(n+2)*(+1 + a(n+2) - 2*a(n+3)) + a(n+3)*(-1 + a(n+3)) for all n in Z. - Michael Somos, Mar 26 2017
a(n) = round((n+1)*(n+3)/6). - Bill McEachen, Feb 16 2021
Sum_{n>=0} 1/a(n) = 3/2 + Pi^2/36 + (tan(c1)-1)*c1 + 3*c2*sinh(c2)/(1+2*cosh(c2)), where c1 = Pi/(2*sqrt(3)) and c2 = Pi*sqrt(2)/3. - Amiram Eldar, Dec 10 2022
E.g.f.: ((16 + 15*x + 3*x^2)*cosh(x) + 2*exp(-x/2)*(cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)) + (7 + 15*x + 3*x^2)*sinh(x))/18. - Stefano Spezia, Apr 05 2023

Extensions

More terms from Alois P. Heinz, Jun 14 2009

A078358 Non-oblong numbers: Complement of A002378.

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74
Offset: 1

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

The (primitive) period length k(n)=A077427(n) of the (regular) continued fraction of (sqrt(4*a(n)+1)+1)/2 determines whether or not the Diophantine equation (2*x-y)^2 - (1+4*a(n))*y^2 = +4 or -4 is solvable and the approximants of this continued fraction give all solutions. See A077057.
The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. - Jeremy Gardiner, Mar 16 2003
Infinite series 1/A078358(n) is divergent. Proof: Harmonic series 1/A000027(n) is divergent and can be distributed on two subseries 1/A002378(k+1) and 1/A078358(m). The infinite subseries 1/A002378(k+1) is convergent to 1, so Sum_{n>=1} 1/A078358(n) is divergent. - Artur Jasinski, Sep 28 2008

References

  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).

Crossrefs

a(n)=(A077425(n)-1)/4.
Cf. A049068 (subsequence), A144786.

Programs

  • Haskell
    a078358 n = a078358_list !! (n-1)
    a078358_list = filter ((== 0) . a005369) [0..]
    -- Reinhard Zumkeller, Jul 04 2014, May 08 2012
    
  • Mathematica
    Complement[Range[930], Table[n (n + 1), {n, 0, 30}]] (* and *) Table[Ceiling[Sqrt[n]] + n - 1, {n, 900}] (* Vladimir Joseph Stephan Orlovsky, Jul 20 2011 *)
  • PARI
    a(n)=sqrtint(n-1)+n \\ Charles R Greathouse IV, Jan 17 2013
    
  • Python
    from operator import sub
    from sympy import integer_nthroot
    def A078358(n): return n+sub(*integer_nthroot(n,2)) # Chai Wah Wu, Oct 01 2024

Formula

4*a(n)+1 is not a square number.
a(n) = ceiling(sqrt(n)) + n -1. - Leroy Quet, Jul 06 2007
A005369(a(n)) = 0. - Reinhard Zumkeller, Jul 05 2014

A004738 Concatenation of sequences (1,2,...,n-1,n,n-1,...,2) for n >= 2.

Original entry on oeis.org

1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9
Offset: 1

Views

Author

R. Muller

Keywords

Comments

Also concatenation of sequences n,n-1,...,2,1,2,...,n-1,n.
Table T(n,k) n, k > 0, T(n,k) = n-k+1, if n >= k, T(n,k) = k-n+1, if n < k. Table read by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). General case A209301. Let m be a natural number. The first column of the table T(n,1) is the sequence of the natural numbers A000027. In all columns with number k (k > 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m} shifts the sequence A000027. For m=1 the result is A004739, for m=2 the result is A004738, for m=3 the result is A209301. - Boris Putievskiy, Jan 24 2013

Examples

			From _Boris Putievskiy_, Jan 24 2013: (Start)
The start of the sequence as table:
  1, 2, 3, 4, 5, 6, 7, ...
  2, 1, 2, 3, 4, 5, 6, ...
  3, 2, 1, 2, 3, 4, 5, ...
  4, 3, 2, 1, 2, 3, 4, ...
  5, 4, 3, 2, 1, 2, 3, ...
  6, 5, 4, 3, 2, 1, 2, ...
  7, 6, 5, 4, 3, 2, 1, ...
  ...
The start of the sequence as triangle array read by rows:
  1;
  2, 1, 2;
  3, 2, 1, 2, 3;
  4, 3, 2, 1, 2, 3, 4;
  5, 4, 3, 2, 1, 2, 3, 4, 5;
  6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6;
  7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7;
  ...
Row number r contains 2*r - 1 numbers: r, r-1, ..., 1, 2, ..., r. (End)
		

References

  • F. Smarandache, "Numerical Sequences", University of Craiova, 1975; [ See Arizona State University, Special Collection, Tempe, AZ, USA ].

Crossrefs

Programs

  • Maple
    A004738 := proc(n)
        local tri ;
        tri := floor(sqrt(n)+1/2) ;
        tri+1-abs(n-1-tri^2) ;
    end proc:
    seq(A004738(n),n=1..30) ; #R. J. Mathar, Feb 14 2019
  • Mathematica
    row[n_] := Range[n, 1, -1] ~Join~ Range[2, n];
    Array[row, 10] // Flatten (* Jean-François Alcover, Apr 19 2020 *)
  • PARI
    a(n)= floor(sqrt(n)+1/2)+1-abs(n-1-(floor(sqrt(n)+1/2)-1/2)^2)
    
  • Python
    from math import isqrt
    def A004738(n): return abs((t:=isqrt(n-1))*(t+1)-n+1)+1 # Chai Wah Wu, Mar 01 2025

Formula

a(n) = floor(sqrt(n) + 1/2) + 1 - abs(n - 1 - (floor(sqrt(n) + 1/2))^2). - Benoit Cloitre, Feb 08 2003
From Boris Putievskiy, Jan 24 2013: (Start)
For the general case, a(n) = m*v + (2*v-1)*(t*t-n) + t, where t = floor(sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1.
For m=2, a(n) = 2*v + (2*v-1)*(t*t-n) + t, where t = floor(sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1. (End)

Extensions

More terms from Patrick De Geest, Jun 15 1998
Showing 1-10 of 35 results. Next