A000290 The squares: a(n) = n^2.
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
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.
Links
- Franklin T. Adams-Watters, The first 10000 squares: Table of n, n^2 for n = 0..10000
- Valentin P. Bakoev, Algorithmic approach to counting of certain types m-ary partitions, Discrete Mathematics, 275 (2004) pp. 17-41.
- Stefano Barbero, Umberto Cerruti, and Nadir Murru, Transforming Recurrent Sequences by Using the Binomial and Invert Operators, J. Int. Seq. 13 (2010) # 10.7.7, section 4.4.
- Anicius Manlius Severinus Boethius, De institutione arithmetica libri duo, Book 2, sections 10-12.
- Nicolas Bonichon and Pierre-Jean Morel, Baxter d-permutations and other pattern avoiding classes, arXiv:2202.12677 [math.CO], 2022.
- Henry Bottomley, Some Smarandache-type multiplicative sequences.
- R. J. Cook and G. V. Wood, Feynman's Triangle, Mathematical Gazette, 88:299-302 (2004).
- John Derbyshire, Monkeys and Doors.
- Michael Drmota, Christian Mauduit, and Joël Rivat, The Thue-Morse Sequence Along The Squares is Normal, Abstract, ÖMG-DMV Congress, 2013.
- Ralph Greenberg, Math for Poets.
- Guo-Niu Han, Enumeration of Standard Puzzles.
- Guo-Niu Han, Enumeration of Standard Puzzles. [Cached copy]
- Vi Hart, Doodling in Math Class: Connecting Dots (2012) [Video].
- Nick Hobson, Python program to determine whether an integer is in sequence A000290.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 338.
- Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets.
- Milan Janjic, Two Enumerative Functions.
- Milan Janjić, On Restricted Ternary Words and Insets, arXiv:1905.04465 [math.CO], 2019.
- L. B. W. Jolley, Summation of Series, Dover, 1961.
- Sameen Ahmed Khan, Sums of the powers of reciprocals of polygonal numbers, Int'l J. of Appl. Math. (2020) Vol. 33, No. 2, 265-282.
- Clark Kimberling, Complementary Equations, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4.
- Hyun Kwang Kim, On Regular Polytope Numbers, Proc. Amer. Math. Soc., 131 (2002), 65-75.
- J. H. McKay, The William Lowell Putnam Mathematical Competition, Problem B4(a), The American Mathematical Monthly, vol. 75, no. 7, 1968, pp. 732-739.
- Matthew Parker, The first million squares (7-Zip compressed file).
- Ed Pegg, Jr., Sequence Pictures, Math Games column, Dec 08 2003.
- Ed Pegg, Jr., Sequence Pictures, Math Games column, Dec 08 2003 [Cached copy, with permission (pdf only)].
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Omar E. Pol, Illustration of initial terms of A000217, A000290, A000326, A000384, A000566, A000567.
- Yash Puri and Thomas Ward, Arithmetic and growth of periodic orbits, J. Integer Seqs., Vol. 4 (2001), #01.2.1.
- Franck Ramaharo, A generating polynomial for the pretzel knot, arXiv:1805.10680 [math.CO], 2018.
- William S. Renwick, The start of the EDSAC log.
- Luis Manuel Rivera, Integer sequences and k-commuting permutations, arXiv preprint arXiv:1406.3081 [math.CO], 2014.
- Kenneth A. Ross, First Digits of Squares and Cubes, Math. Mag. 85 (2012) 36-42.
- John Scholes, 28th Putnam 1967 Prob.B4(a).
- James A. Sellers, Partitions Excluding Specific Polygonal Numbers As Parts, Journal of Integer Sequences, Vol. 7 (2004), Article 04.2.4.
- N. J. A. Sloane, Illustration of initial terms of A000217, A000290, A000326.
- Michael Somos, Rational Function Multiplicative Coefficients.
- Nathan Sun, On d-permutations and Pattern Avoidance Classes, arXiv:2208.08506 [math.CO], 2022.
- Dinoj Surendran, Chimbumu and Chickwama get out of jail.
- Eric Weisstein's World of Mathematics, Square Number.
- Eric Weisstein's World of Mathematics, Unit.
- Eric Weisstein's World of Mathematics, Wiener Index.
- Index entries for "core" sequences.
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
- Index entries for two-way infinite sequences.
- Index to sequences related to polygonal numbers.
- Index entries for sequences related to Benford's law.
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
Cf. A342819.
Cf. A013661.
Programs
-
Haskell
a000290 = (^ 2) a000290_list = scanl (+) 0 [1,3..] -- Reinhard Zumkeller, Apr 06 2012
-
Magma
[ n^2 : n in [0..1000]];
-
Maple
A000290 := n->n^2; seq(A000290(n), n=0..50); A000290 := -(1+z)/(z-1)^3; # Simon Plouffe, in his 1992 dissertation, for sequence starting at a(1)
-
Mathematica
Array[#^2 &, 51, 0] (* Robert G. Wilson v, Aug 01 2014 *) 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 *) Range[0, 99]^2 (* Alonso del Arte, Nov 21 2019 *) Join[{0},Accumulate[Range[1,101,2]]] (* Harvey P. Dale, May 11 2025 *)
-
Maxima
A000290(n):=n^2$ makelist(A000290(n),n,0,30); /* Martin Ettl, Oct 25 2012 */
-
PARI
{a(n) = n^2};
-
PARI
b000290(maxn)=for(n=0,maxn,print(n," ",n^2);) \\ Anatoly E. Voevudko, Nov 11 2015
-
Python
# See Hobson link
-
Python
def A000290(n): return n**2 # Chai Wah Wu, Nov 13 2022
-
Scala
(0 to 59).map(n => n * n) // Alonso del Arte, Oct 07 2019
-
Scheme
(define (A000290 n) (* n n)) ;; Antti Karttunen, Oct 06 2017
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)
a(n) = Sum_{k = 1..n} A002024(n, k). - Reinhard Zumkeller, Jun 24 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
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
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(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
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)
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
Comments