A000290 - OEIS
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
COMMENTS
To test if a number is a square, see Cohen, p. 40. - N. J. A. Sloane, Jun 19 2011
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
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
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
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
Number of divisors of 6^(n-1) for n > 0. - J. Lowell, Aug 30 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
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
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
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
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.
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.
LINKS
R. J. Cook and G. V. Wood, Feynman's Triangle, Mathematical Gazette, 88:299-302 (2004).
Clark Kimberling, Complementary Equations, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4.
Ed Pegg, Jr., Sequence Pictures, Math Games column, Dec 08 2003 [Cached copy, with permission (pdf only)].
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992; arXiv:0911.4975 [math.NT], 2009.
Eric Weisstein's World of Mathematics, Square Number.
Eric Weisstein's World of Mathematics, Unit.
Eric Weisstein's World of Mathematics, Wiener Index.
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
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)
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
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
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.
a(A000217(n)) = Sum_{i = 1..n} Sum_{j = 1..n} i*j, for n > 0. - Ivan N. Ianakiev, Apr 20 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
Product_{n >= 1} (1 + 1/a(n)) = sinh(Pi)/Pi = A156648.
Sum_{n >= 0} 1/a(n!) = BesselI(0, 2) = A070910. (End)
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
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)
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
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
EXAMPLE
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
MAPLE
A000290 := -(1+z)/(z-1)^3; # Simon Plouffe, in his 1992 dissertation, for sequence starting at a(1)
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {0, 1, 4}, 60] (* Vincenzo Librandi, Jul 24 2015 *)
CoefficientList[Series[-(x^2 + x)/(x - 1)^3, {x, 0, 50}], x] (* Robert G. Wilson v, Jul 23 2018 *)
PROG
(Magma) [ n^2 : n in [0..1000]];
(PARI) {a(n) = n^2};
(PARI) b000290(maxn)=for(n=0, maxn, print(n, " ", n^2); ) \\ Anatoly E. Voevudko, Nov 11 2015
(Haskell)
a000290 = (^ 2)
(Scala) (0 to 59).map(n => n * n) // Alonso del Arte, Oct 07 2019
(Python) # See Hobson link
(Python)
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).
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
KEYWORD
nonn,core,easy,nice,mult,changed
EXTENSIONS
Incorrect comment and example removed by Joerg Arndt, Mar 11 2010