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 12 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

A002061 Central polygonal numbers: a(n) = n^2 - n + 1.

Original entry on oeis.org

1, 1, 3, 7, 13, 21, 31, 43, 57, 73, 91, 111, 133, 157, 183, 211, 241, 273, 307, 343, 381, 421, 463, 507, 553, 601, 651, 703, 757, 813, 871, 931, 993, 1057, 1123, 1191, 1261, 1333, 1407, 1483, 1561, 1641, 1723, 1807, 1893, 1981, 2071, 2163, 2257, 2353, 2451, 2551, 2653
Offset: 0

Views

Author

Keywords

Comments

These are Hogben's central polygonal numbers denoted by the symbol
...2....
....P...
...2.n..
(P with three attachments).
Also the maximal number of 1's that an n X n invertible {0,1} matrix can have. (See Halmos for proof.) - Felix Goldberg (felixg(AT)tx.technion.ac.il), Jul 07 2001
Maximal number of interior regions formed by n intersecting circles, for n >= 1. - Amarnath Murthy, Jul 07 2001
The terms are the smallest of n consecutive odd numbers whose sum is n^3: 1, 3 + 5 = 8 = 2^3, 7 + 9 + 11 = 27 = 3^3, etc. - Amarnath Murthy, May 19 2001
(n*a(n+1)+1)/(n^2+1) is the smallest integer of the form (n*k+1)/(n^2+1). - Benoit Cloitre, May 02 2002
For n >= 3, a(n) is also the number of cycles in the wheel graph W(n) of order n. - Sharon Sela (sharonsela(AT)hotmail.com), May 17 2002
Let b(k) be defined as follows: b(1) = 1 and b(k+1) > b(k) is the smallest integer such that Sum_{i=b(k)..b(k+1)} 1/sqrt(i) > 2; then b(n) = a(n) for n > 0. - Benoit Cloitre, Aug 23 2002
Drop the first three terms. Then n*a(n) + 1 = (n+1)^3. E.g., 7*1 + 1 = 8 = 2^3, 13*2 + 1 = 27 = 3^3, 21*3 + 1 = 64 = 4^3, etc. - Amarnath Murthy, Oct 20 2002
Arithmetic mean of next 2n - 1 numbers. - Amarnath Murthy, Feb 16 2004
The n-th term of an arithmetic progression with first term 1 and common difference n: a(1) = 1 -> 1, 2, 3, 4, 5, ...; a(2) = 3 -> 1, 3, ...; a(3) = 7 -> 1, 4, 7, ...; a(4) = 13 -> 1, 5, 9, 13, ... - Amarnath Murthy, Mar 25 2004
Number of walks of length 3 between any two distinct vertices of the complete graph K_{n+1} (n >= 1). Example: a(2) = 3 because in the complete graph ABC we have the following walks of length 3 between A and B: ABAB, ACAB and ABCB. - Emeric Deutsch, Apr 01 2004
Narayana transform of [1, 2, 0, 0, 0, ...] = [1, 3, 7, 13, 21, ...]. Let M = the infinite lower triangular matrix of A001263 and let V = the Vector [1, 2, 0, 0, 0, ...]. Then A002061 starting (1, 3, 7, ...) = M * V. - Gary W. Adamson, Apr 25 2006
The sequence 3, 7, 13, 21, 31, 43, 57, 73, 91, 111, ... is the trajectory of 3 under repeated application of the map n -> n + 2 * square excess of n, cf. A094765.
Also n^3 mod (n^2+1). - Zak Seidov, Aug 31 2006
Also, omitting the first 1, the main diagonal of A081344. - Zak Seidov, Oct 05 2006
Ignoring the first ones, these are rectangular parallelepipeds with integer dimensions that have integer interior diagonals. Using Pythagoras: sqrt(a^2 + b^2 + c^2) = d, an integer; then this sequence: sqrt(n^2 + (n+1)^2 + (n(n+1))^2) = 2T_n + 1 is the first and most simple example. Problem: Are there any integer diagonals which do not satisfy the following general formula? sqrt((k*n)^2 + (k*(n+(2*m+1)))^2 + (k*(n*(n+(2*m+1)) + 4*T_m))^2) = k*d where m >= 0, k >= 1, and T is a triangular number. - Marco Matosic, Nov 10 2006
Numbers n such that a(n) is prime are listed in A055494. Prime a(n) are listed in A002383. All terms are odd. Prime factors of a(n) are listed in A007645. 3 divides a(3*k-1), 7 divides a(7*k-4) and a(7*k-2), 7^2 divides a(7^2*k-18) and a(7^2*k+19), 7^3 divides a(7^3*k-18) and a(7^3*k+19), 7^4 divides a(7^4*k+1048) and a(7^4*k-1047), 7^5 divides a(7^5*k+1354) and a(7^5*k-1353), 13 divides a(13*k-9) and a(13*k-3), 13^2 divides a(13^2*k+23) and a(13^2*k-22), 13^3 divides a(13^3*k+1037) and a(13^3*k-1036). - Alexander Adamchuk, Jan 25 2007
Complement of A135668. - Kieren MacMillan, Dec 16 2007
From William A. Tedeschi, Feb 29 2008: (Start)
Numbers (sorted) on the main diagonal of a 2n X 2n spiral. For example, when n=2:
.
7---8---9--10
| |
6 1---2 11
| | |
5---4---3 12
|
16--15--14--13
.
Cf. A137928. (End)
a(n) = AlexanderPolynomial[n] defined as Det[Transpose[S]-n S] where S is Seifert matrix {{-1, 1}, {0, -1}}. - Artur Jasinski, Mar 31 2008
Starting (1, 3, 7, 13, 21, ...) = binomial transform of [1, 2, 2, 0, 0, 0]; example: a(4) = 13 = (1, 3, 3, 1) dot (1, 2, 2, 0) = (1 + 6 + 6 + 0). - Gary W. Adamson, May 10 2008
Starting (1, 3, 7, 13, ...) = triangle A158821 * [1, 2, 3, ...]. - Gary W. Adamson, Mar 28 2009
Starting with offset 1 = triangle A128229 * [1,2,3,...]. - Gary W. Adamson, Mar 26 2009
a(n) = k such that floor((1/2)*(1 + sqrt(4*k-3))) + k = (n^2+1), that is A000037(a(n)) = A002522(n) = n^2 + 1, for n >= 1. - Jaroslav Krizek, Jun 21 2009
For n > 0: a(n) = A170950(A002522(n-1)), A170950(a(n)) = A174114(n), A170949(a(n)) = A002522(n-1). - Reinhard Zumkeller, Mar 08 2010
From Emeric Deutsch, Sep 23 2010: (Start)
a(n) is also the Wiener index of the fan graph F(n). The fan graph F(n) is defined as the graph obtained by joining each node of an n-node path graph with an additional node. The Wiener index of a connected graph is the sum of the distances between all unordered pairs of vertices in the graph. The Wiener polynomial of the graph F(n) is (1/2)t[(n-1)(n-2)t + 2(2n-1)]. Example: a(2)=3 because the corresponding fan graph is a cycle on 3 nodes (a triangle), having distances 1, 1, and 1.
(End)
For all elements k = n^2 - n + 1 of the sequence, sqrt(4*(k-1)+1) is an integer because 4*(k-1) + 1 = (2*n-1)^2 is a perfect square. Building the intersection of this sequence with A000225, k may in addition be of the form k = 2^x - 1, which happens only for k = 1, 3, 7, 31, and 8191. [Proof: Still 4*(k-1)+1 = 2^(x+2) - 7 must be a perfect square, which has the finite number of solutions provided by A060728: x = 1, 2, 3, 5, or 13.] In other words, the sequence A038198 defines all elements of the form 2^x - 1 in this sequence. For example k = 31 = 6*6 - 6 + 1; sqrt((31-1)*4+1) = sqrt(121) = 11 = A038198(4). - Alzhekeyev Ascar M, Jun 01 2011
a(n) such that A002522(n-1) * A002522(n) = A002522(a(n)) where A002522(n) = n^2 + 1. - Michel Lagneau, Feb 10 2012
Left edge of the triangle in A214661: a(n) = A214661(n, 1), for n > 0. - Reinhard Zumkeller, Jul 25 2012
a(n) = A215630(n, 1), for n > 0; a(n) = A215631(n-1, 1), for n > 1. - Reinhard Zumkeller, Nov 11 2012
Sum_{n > 0} arccot(a(n)) = Pi/2. - Franz Vrabec, Dec 02 2012
If you draw a triangle with one side of unit length and one side of length n, with an angle of Pi/3 radians between them, then the length of the third side of the triangle will be the square root of a(n). - Elliott Line, Jan 24 2013
a(n+1) is the number j such that j^2 = j + m + sqrt(j*m), with corresponding number m given by A100019(n). Also: sqrt(j*m) = A027444(n) = n * a(n+1). - Richard R. Forberg, Sep 03 2013
Let p(x) the interpolating polynomial of degree n-1 passing through the n points (n,n) and (1,1), (2,1), ..., (n-1,1). Then p(n+1) = a(n). - Giovanni Resta, Feb 09 2014
The number of square roots >= sqrt(n) and < n+1 (n >= 0) gives essentially the same sequence, 1, 3, 7, 13, 21, 31, 43, 57, 73, 91, 111, 133, 157, 183, 211, ... . - Michael G. Kaarhus, May 21 2014
For n > 1: a(n) is the maximum total number of queens that can coexist without attacking each other on an [n+1] X [n+1] chessboard. Specifically, this will be a lone queen of one color placed in any position on the perimeter of the board, facing an opponent's "army" of size a(n)-1 == A002378(n-1). - Bob Selcoe, Feb 07 2015
a(n+1) is, for n >= 1, the number of points as well as the number of lines of a finite projective plane of order n (cf. Hughes and Piper, 1973, Theorem 3.5., pp. 79-80). For n = 3, a(4) = 13, see the 'Finite example' in the Wikipedia link, section 2.3, for the point-line matrix. - Wolfdieter Lang, Nov 20 2015
Denominators of the solution to the generalization of the Feynman triangle problem. 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 numerators of the ratio of the areas is given by A000290 with an offset of 2. [Cook & Wood, 2004.] - Joe Marasco, Feb 20 2017
n^2 equal triangular tiles with side lengths 1 X 1 X 1 may be put together to form an n X n X n triangle. For n>=2 a(n-1) is the number of different 2 X 2 X 2 triangles being contained. - Heinrich Ludwig, Mar 13 2017
For n >= 0, the continued fraction [n, n+1, n+2] = (n^3 + 3n^2 + 4n + 2)/(n^2 + 3n + 3) = A034262(n+1)/a(n+2) = n + (n+2)/a(n+2); e.g., [2, 3, 4] = A034262(3)/a(4) = 30/13 = 2 + 4/13. - Rick L. Shepherd, Apr 06 2017
Starting with b(1) = 1 and not allowing the digit 0, let b(n) = smallest nonnegative integer not yet in the sequence such that the last digit of b(n-1) plus the first digit of b(n) is equal to k for k = 1, ..., 9. This defines 9 finite sequences, each of length equal to a(k), k = 1, ..., 9. (See A289283-A289287 for the cases k = 5..9.) For k = 10, the sequence is infinite (A289288). For example, for k = 4, b(n) = 1,3,11,31,32,2,21,33,12,22,23,13,14. These terms can be ordered in the following array of size k*(k-1)+1:
1 2 3
21 22 23
31 32 33
11 12 13 14
.
The sequence ends with the term 1k, which lies outside the rectangular array and gives the term +1 (see link).- Enrique Navarrete, Jul 02 2017
The central polygonal numbers are the delimiters (in parenthesis below) when you write the natural numbers in groups of odd size 2*n+1 starting with the group {2} of size 1: (1) 2 (3) 4,5,6 (7) 8,9,10,11,12 (13) 14,15,16,17,18,19,20 (21) 22,23,24,25,26,27,28,29,30 (31) 32,33,34,35,36,37,38,39,40,41,42 (43) ... - Enrique Navarrete, Jul 11 2017
Also the number of (non-null) connected induced subgraphs in the n-cycle graph. - Eric W. Weisstein, Aug 09 2017
Since (n+1)^2 - (n+1) + 1 = n^2 + n + 1 then from 7 onwards these are also exactly the numbers that are represented as 111 in all number bases: 111(2)=7, 111(3)=13, ... - Ron Knott, Nov 14 2017
Number of binary 2 X (n-1) matrices such that each row and column has at most one 1. - Dmitry Kamenetsky, Jan 20 2018
Observed to be the squares visited by bishop moves on a spirally numbered board and moving to the lowest available unvisited square at each step, beginning at the second term (cf. A316667). It should be noted that the bishop will only travel to squares along the first diagonal of the spiral. - Benjamin Knight, Jan 30 2019
From Ed Pegg Jr, May 16 2019: (Start)
Bound for n-subset coverings. Values in A138077 covered by difference sets.
C(7,3,2), {1,2,4}
C(13,4,2), {0,1,3,9}
C(21,5,2), {3,6,7,12,14}
C(31,6,2), {1,5,11,24,25,27}
C(43,7,2), existence unresolved
C(57,8,2), {0,1,6,15,22,26,45,55}
Next unresolved cases are C(111,11,2) and C(157,13,2). (End)
"In the range we explored carefully, the optimal packings were substantially irregular only for n of the form n = k(k+1)+1, k = 3, 4, 5, 6, 7, i.e., for n = 13, 21, 31, 43, and 57." (cited from Lubachevsky, Graham link, Introduction). - Rainer Rosenthal, May 27 2020
From Bernard Schott, Dec 31 2020: (Start)
For n >= 1, a(n) is the number of solutions x in the interval 1 <= x <= n of the equation x^2 - [x^2] = (x - [x])^2, where [x] = floor(x). For n = 3, the a(3) = 7 solutions in the interval [1, 3] are 1, 3/2, 2, 9/4, 5/2, 11/4 and 3.
This sequence is the answer to the 4th problem proposed during the 20th British Mathematical Olympiad in 1984 (see link B.M.O 1984. and Gardiner reference). (End)
Called "Hogben numbers" after the British zoologist, statistician and writer Lancelot Thomas Hogben (1895-1975). - Amiram Eldar, Jun 24 2021
Minimum Wiener index of 2-degenerate graphs with n+1 vertices (n>0). A maximal 2-degenerate graph can be constructed from a 2-clique by iteratively adding a new 2-leaf (vertex of degree 2) adjacent to two existing vertices. The extremal graphs are maximal 2-degenerate graphs with diameter at most 2. - Allan Bickle, Oct 14 2022
a(n) is the number of parking functions of size n avoiding the patterns 123, 213, and 312. - Lara Pudwell, Apr 10 2023
Repeated iteration of a(k) starting with k=2 produces Sylvester's sequence, i.e., A000058(n) = a^n(2), where a^n is the n-th iterate of a(k). - Curtis Bechtel, Apr 04 2024
a(n) is the maximum number of triangles that can be traversed by starting from a triangle and moving to adjacent triangles via an edge, without revisiting any triangle, in an n X n X n equilateral triangular grid made up of n^2 unit equilateral triangles. - Kiran Ananthpur Bacche, Jan 16 2025

Examples

			G.f. = 1 + x + 3*x^2 + 7*x^3 + 13*x^4 + 21*x^5 + 31*x^6 + 43*x^7 + ...
		

References

  • Archimedeans Problems Drive, Eureka, 22 (1959), 15.
  • Steve Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 1 of the British Mathematical Olympiad 2007, page 160.
  • Anthony Gardiner, The Mathematical Olympiad Handbook: An Introduction to Problem Solving, Oxford University Press, 1997, reprinted 2011, Problem 4 pp. 64 and 173 (1984).
  • Paul R. Halmos, Linear Algebra Problem Book, MAA, 1995, pp. 75-6, 242-4.
  • Ross Honsberger, Ingenuity in Mathematics, Random House, 1970, p. 87.
  • Daniel R. Hughes and Frederick Charles Piper, Projective Planes, Springer, 1973.
  • 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

Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
Cf. A010000 (minimum Weiner index of 3-degenerate graphs).

Programs

  • GAP
    List([0..50], n->n^2-n+1); # Muniru A Asiru, May 27 2018
  • Haskell
    a002061 n = n * (n - 1) + 1  -- Reinhard Zumkeller, Dec 18 2013
    
  • Magma
    [ n^2 - n + 1 : n in [0..50] ]; // Wesley Ivan Hurt, Jun 12 2014
    
  • Maple
    A002061 := proc(n)
        numtheory[cyclotomic](6,n) ;
    end proc:
    seq(A002061(n), n=0..20); # R. J. Mathar, Feb 07 2014
  • Mathematica
    FoldList[#1 + #2 &, 1, 2 Range[0, 50]] (* Robert G. Wilson v, Feb 02 2011 *)
    LinearRecurrence[{3, -3, 1}, {1, 1, 3}, 60] (* Harvey P. Dale, May 25 2011 *)
    Table[n^2 - n + 1, {n, 0, 50}] (* Wesley Ivan Hurt, Jun 12 2014 *)
    CoefficientList[Series[(1 - 2x + 3x^2)/(1 - x)^3, {x, 0, 52}], x] (* Robert G. Wilson v, Feb 18 2018 *)
    Cyclotomic[6, Range[0, 100]] (* Paolo Xausa, Feb 09 2024 *)
  • Maxima
    makelist(n^2 - n + 1,n,0,55); /* Martin Ettl, Oct 16 2012 */
    
  • PARI
    a(n) = n^2 - n + 1
    

Formula

G.f.: (1 - 2*x + 3*x^2)/(1-x)^3. - Simon Plouffe in his 1992 dissertation
a(n) = -(n-5)*a(n-1) + (n-2)*a(n-2).
a(n) = Phi_6(n) = Phi_3(n-1), where Phi_k is the k-th cyclotomic polynomial.
a(1-n) = a(n). - Michael Somos, Sep 04 2006
a(n) = a(n-1) + 2*(n-1) = 2*a(n-1) - a(n-2) + 2 = 1+A002378(n-1) = 2*A000124(n-1) - 1. - Henry Bottomley, Oct 02 2000 [Corrected by N. J. A. Sloane, Jul 18 2010]
a(n) = A000217(n) + A000217(n-2) (sum of two triangular numbers).
From Paul Barry, Mar 13 2003: (Start)
x*(1+x^2)/(1-x)^3 is g.f. for 0, 1, 3, 7, 13, ...
a(n) = 2*C(n, 2) + C(n-1, 0).
E.g.f.: (1+x^2)*exp(x). (End)
a(n) = ceiling((n-1/2)^2). - Benoit Cloitre, Apr 16 2003. [Hence the terms are about midway between successive squares and so (except for 1) are not squares. - N. J. A. Sloane, Nov 01 2005]
a(n) = 1 + Sum_{j=0..n-1} (2*j). - Xavier Acloque, Oct 08 2003
a(n) = floor(t(n^2)/t(n)), where t(n) = A000217(n). - Jon Perry, Feb 14 2004
a(n) = leftmost term in M^(n-1) * [1 1 1], where M = the 3 X 3 matrix [1 1 1 / 0 1 2 / 0 0 1]. E.g., a(6) = 31 since M^5 * [1 1 1] = [31 11 1]. - Gary W. Adamson, Nov 11 2004
a(n+1) = n^2 + n + 1. a(n+1)*a(n) = (n^6-1)/(n^2-1) = n^4 + n^2 + 1 = a(n^2+1) (a product of two consecutive numbers from this sequence belongs to this sequence). (a(n+1) + a(n))/2 = n^2 + 1. (a(n+1) - a(n))/2 = n. a((a(n+1) + a(n))/2) = a(n+1)*a(n). - Alexander Adamchuk, Apr 13 2006
a(n+1) is the numerator of ((n + 1)! + (n - 1)!)/ n!. - Artur Jasinski, Jan 09 2007
a(n) = A132111(n-1, 1), for n > 1. - Reinhard Zumkeller, Aug 10 2007
a(n) = Det[Transpose[{{-1, 1}, {0, -1}}] - n {{-1, 1}, {0, -1}}]. - Artur Jasinski, Mar 31 2008
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), n >= 3. - Jaume Oliver Lafont, Dec 02 2008
a(n) = A176271(n,1) for n > 0. - Reinhard Zumkeller, Apr 13 2010
a(n) == 3 (mod n+1). - Bruno Berselli, Jun 03 2010
a(n) = (n-1)^2 + (n-1) + 1 = 111 read in base n-1 (for n > 2). - Jason Kimberley, Oct 18 2011
a(n) = A228643(n, 1), for n > 0. - Reinhard Zumkeller, Aug 29 2013
a(n) = sqrt(A058031(n)). - Richard R. Forberg, Sep 03 2013
G.f.: 1 / (1 - x / (1 - 2*x / (1 + x / (1 - 2*x / (1 + x))))). - Michael Somos, Apr 03 2014
a(n) = A243201(n - 1) / A003215(n - 1), n > 0. - Mathew Englander, Jun 03 2014
For n >= 2, a(n) = ceiling(4/(Sum_{k = A000217(n-1)..A000217(n) - 1}, 1/k)). - Richard R. Forberg, Aug 17 2014
A256188(a(n)) = 1. - Reinhard Zumkeller, Mar 26 2015
Sum_{n>=0} 1/a(n) = 1 + Pi*tanh(Pi*sqrt(3)/2)/sqrt(3) = 2.79814728056269018... . - Vaclav Kotesovec, Apr 10 2016
a(n) = A101321(2,n-1). - R. J. Mathar, Jul 28 2016
a(n) = A000217(n-1) + A000124(n-1), n > 0. - Torlach Rush, Aug 06 2018
Sum_{n>=1} arctan(1/a(n)) = Pi/2. - Amiram Eldar, Nov 01 2020
Sum_{n=1..M} arctan(1/a(n)) = arctan(M). - Lee A. Newberg, May 08 2024
From Amiram Eldar, Jan 20 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = cosh(sqrt(7)*Pi/2)*sech(sqrt(3)*Pi/2).
Product_{n>=2} (1 - 1/a(n)) = Pi*sech(sqrt(3)*Pi/2). (End)
For n > 1, sqrt(a(n)+sqrt(a(n)-sqrt(a(n)+sqrt(a(n)- ...)))) = n. - Diego Rattaggi, Apr 17 2021
a(n) = (1 + (n-1)^4 + n^4) / (1 + (n-1)^2 + n^2) [see link B.M.O. 2007 and Steve Dinh reference]. - Bernard Schott, Dec 27 2021

Extensions

Partially edited by Joerg Arndt, Mar 11 2010
Partially edited by Bruno Berselli, Dec 19 2013

A003215 Hex (or centered hexagonal) numbers: 3*n*(n+1)+1 (crystal ball sequence for hexagonal lattice).

Original entry on oeis.org

1, 7, 19, 37, 61, 91, 127, 169, 217, 271, 331, 397, 469, 547, 631, 721, 817, 919, 1027, 1141, 1261, 1387, 1519, 1657, 1801, 1951, 2107, 2269, 2437, 2611, 2791, 2977, 3169, 3367, 3571, 3781, 3997, 4219, 4447, 4681, 4921, 5167, 5419, 5677, 5941, 6211, 6487, 6769
Offset: 0

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
Crystal ball sequence for A_2 lattice. - Michael Somos, Jun 03 2012
Sixth spoke of hexagonal spiral (cf. A056105-A056109).
Number of ordered integer triples (a,b,c), -n <= a,b,c <= n, such that a+b+c=0. - Benoit Cloitre, Jun 14 2003
Also the number of partitions of 6n into at most 3 parts, A001399(6n). - R. K. Guy, Oct 20 2003
Also, a(n) is the number of partitions of 6(n+1) into exactly 3 distinct parts. - William J. Keith, Jul 01 2004
Number of dots in a centered hexagonal figure with n+1 dots on each side.
Values of second Bessel polynomial y_2(n) (see A001498).
First differences of cubes (A000578). - Cecilia Rossiter (cecilia(AT)noticingnumbers.net), Dec 15 2004
Final digits of Hex numbers (hex(n) mod 10) are periodic with palindromic period of length 5 {1, 7, 9, 7, 1}. Last two digits of Hex numbers (hex(n) mod 100) are periodic with palindromic period of length 100. - Alexander Adamchuk, Aug 11 2006
All divisors of a(n) are congruent to 1, modulo 6. Proof: If p is an odd prime different from 3 then 3n^2 + 3n + 1 = 0 (mod p) implies 9(2n + 1)^2 = -3 (mod p), whence p = 1 (mod 6). - Nick Hobson, Nov 13 2006
For n>=1, a(n) is the side of Outer Napoleon Triangle whose reference triangle is a right triangle with legs (3a(n))^(1/2) and 3n(a(n))^(1/2). - Tom Schicker (tschicke(AT)email.smith.edu), Apr 25 2007
Number of triples (a,b,c) where 0<=(a,b)<=n and c=n (at least once the term n). E.g., for n = 1: (0,0,1), (0,1,0), (1,0,0), (0,1,1), (1,0,1), (1,1,0), (1,1,1), so a(1)=7. - Philippe Lallouet (philip.lallouet(AT)wanadoo.fr), Aug 20 2007
Equals the triangular numbers convolved with [1, 4, 1, 0, 0, 0, ...]. - Gary W. Adamson and Alexander R. Povolotsky, May 29 2009
From Terry Stickels, Dec 07 2009: (Start)
Also the maximum number of viewable cubes from any one static point while viewing a cube stack of identical cubes of varying magnitude.
For example, viewing a 2 X 2 X 2 stack will yield 7 maximum viewable cubes.
If the stack is 3 X 3 X 3, the maximum number of viewable cubes from any one static position is 19, and so on.
The number of cubes in the stack must always be the same number for width, length, height (at true regular cubic stack) and the maximum number of visible cubes can always be found by taking any cubic number and subtracting the number of the cube that is one less.
Examples: 125 - 64 = 61, 64 - 27 = 37, 27 - 8 = 19. (End)
The sequence of digital roots of the a(n) is period 3: repeat [1,7,1]. - Ant King, Jun 17 2012
The average of the first n (n>0) centered hexagonal numbers is the n-th square. - Philippe Deléham, Feb 04 2013
A002024 is the following array A read along antidiagonals:
1, 2, 3, 4, 5, 6, ...
2, 3, 4, 5, 6, 7, ...
3, 4, 5, 6, 7, 8, ...
4, 5, 6, 7, 8, 9, ...
5, 6, 7, 8, 9, 10, ...
6, 7, 8, 9, 10, 11, ...
and a(n) is the hook sum Sum_{k=0..n} A(n,k) + Sum_{r=0..n-1} A(r,n). - R. J. Mathar, Jun 30 2013
a(n) is the sum of the terms in the n+1 X n+1 matrices minus those in n X n matrices in an array formed by considering A158405 an array (the beginning terms in each row are 1,3,5,7,9,11,...). - J. M. Bergot, Jul 05 2013
The formula also equals the product of the three distinct combinations of two consecutive numbers: n^2, (n+1)^2, and n*(n+1). - J. M. Bergot, Mar 28 2014
The sides of any triangle ABC are divided into 2n + 1 equal segments by 2n points: A_1, A_2, ..., A_2n in side a, and also on the sides b and c cyclically. If A'B'C' is the triangle delimited by AA_n, BB_n and CC_n cevians, we have (ABC)/(A'B'C') = a(n) (see Java applet link). - Ignacio Larrosa Cañestro, Jan 02 2015
a(n) is the maximal number of parts into which (n+1) triangles can intersect one another. - Ivan N. Ianakiev, Feb 18 2015
((2^m-1)n)^t mod a(n) = ((2^m-1)(n+1))^t mod a(n) = ((2^m-1)(2n+1))^t mod a(n), where m any positive integer, and t = 0(mod 6). - Alzhekeyev Ascar M, Oct 07 2016
((2^m-1)n)^t mod a(n) = ((2^m-1)(n+1))^t mod a(n) = a(n) - (((2^m-1)(2n+1))^t mod a(n)), where m any positive integer, and t = 3(mod 6). - Alzhekeyev Ascar M, Oct 07 2016
(3n+1)^(a(n)-1) mod a(n) = (3n+2)^(a(n)-1) mod a(n) = 1. If a(n) not prime, then always strong pseudoprime. - Alzhekeyev Ascar M, Oct 07 2016
Every positive integer is the sum of 8 hex numbers (zero included), at most 3 of which are greater than 1. - Mauro Fiorentini, Jan 01 2018
Area enclosed by the segment of Archimedean spiral between n*Pi/2 and (n+1)*Pi/2 in Pi^3/48 units. - Carmine Suriano, Apr 10 2018
This sequence contains all numbers k such that 12*k - 3 is a square. - Klaus Purath, Oct 19 2021
The continued fraction expansion of sqrt(3*a(n)) is [3n+1; {1, 1, 2n, 1, 1, 6n+2}]. For n = 0, this collapses to [1; {1, 2}]. - Magus K. Chu, Sep 12 2022

Examples

			G.f. = 1 + 7*x + 19*x^2 + 37*x^3 + 61*x^4 + 91*x^5 + 127*x^6 + 169*x^7 + 217*x^8 + ...
From _Omar E. Pol_, Aug 21 2011: (Start)
Illustration of initial terms:
.
.                                 o o o o
.                   o o o        o o o o o
.         o o      o o o o      o o o o o o
.   o    o o o    o o o o o    o o o o o o o
.         o o      o o o o      o o o o o o
.                   o o o        o o o o o
.                                 o o o o
.
.   1      7          19             37
.
(End)
From _Klaus Purath_, Dec 03 2021: (Start)
(1) a(19) is not a prime number, because besides a(19) = a(9) + P(29), a(19) = a(15) + P(20) = a(2) + P(33) is also true.
(2) a(25) is prime, because except for a(25) = a(12) + P(38) there is no other equation of this pattern. (End)
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 81.
  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=3 of A080853, and column k=2 of A047969.
See also A220083 for a list of numbers of the form n*P(s,n)-(n-1)*P(s,n-1), where P(s,n) is the n-th polygonal number with s sides.
Cf. A287326(A000124(n), 1).
Cf. A008292.
Cf. A154105.

Programs

Formula

a(n) = 3*n*(n+1) + 1, n >= 0 (see the name).
a(n) = (n+1)^3 - n^3 = a(-1-n).
G.f.: (1 + 4*x + x^2) / (1 - x)^3. - Simon Plouffe in his 1992 dissertation
a(n) = 6*A000217(n) + 1.
a(n) = a(n-1) + 6*n = 2a(n-1) - a(n-2) + 6 = 3*a(n-1) - 3*a(n-2) + a(n-3) = A056105(n) + 5n = A056106(n) + 4*n = A056107(n) + 3*n = A056108(n) + 2*n = A056108(n) + n.
n-th partial arithmetic mean is n^2. - Amarnath Murthy, May 27 2003
a(n) = 1 + Sum_{j=0..n} (6*j). E.g., a(2)=19 because 1+ 6*0 + 6*1 + 6*2 = 19. - Xavier Acloque, Oct 06 2003
The sum of the first n hexagonal numbers is n^3. That is, Sum_{n>=1} (3*n*(n-1) + 1) = n^3. - Edward Weed (eweed(AT)gdrs.com), Oct 23 2003
a(n) = right term in M^n * [1 1 1], where M = the 3 X 3 matrix [1 0 0 / 2 1 0 / 3 3 1]. M^n * [1 1 1] = [1 2n+1 a(n)]. E.g., a(4) = 61, right term in M^4 * [1 1 1], since M^4 * [1 1 1] = [1 9 61] = [1 2n+1 a(4)]. - Gary W. Adamson, Dec 22 2004
Row sums of triangle A130298. - Gary W. Adamson, Jun 07 2007
a(n) = 3*n^2 + 3*n + 1. Proof: 1) If n occurs once, it may be in 3 positions; for the two other ones, n terms are independently possible, then we have 3*n^2 different triples. 2) If the term n occurs twice, the third one may be placed in 3 positions and have n possible values, then we have 3*n more different triples. 3) The term n may occurs 3 times in one way only that gives the formula. - Philippe Lallouet (philip.lallouet(AT)wanadoo.fr), Aug 20 2007
Binomial transform of [1, 6, 6, 0, 0, 0, ...]; Narayana transform (A001263) of [1, 6, 0, 0, 0, ...]. - Gary W. Adamson, Dec 29 2007
a(n) = (n-1)*A000166(n) + (n-2)*A000166(n-1) = (n-1)floor(n!*e^(-1)+1) + (n-2)*floor((n-1)!*e^(-1)+1) (with offset 0). - Gary Detlefs, Dec 06 2009
a(n) = A028896(n) + 1. - Omar E. Pol, Oct 03 2011
a(n) = integral( (sin((n+1/2)x)/sin(x/2))^3, x=0..Pi)/Pi. - Yalcin Aktar, Dec 03 2011
Sum_{n>=0} 1/a(n) = Pi/sqrt(3)*tanh(Pi/(2*sqrt(3))) = 1.305284153013581... - Ant King, Jun 17 2012
a(n) = A000290(n) + A000217(2n+1). - Ivan N. Ianakiev, Sep 24 2013
a(n) = A002378(n+1) + A056220(n) = A005408(n) + 2*A005449(n) = 6*A000217(n) + 1. - Ivan N. Ianakiev, Sep 26 2013
a(n) = 6*A000124(n) - 5. - Ivan N. Ianakiev, Oct 13 2013
a(n) = A239426(n+1) / A239449(n+1) = A215630(2*n+1,n+1). - Reinhard Zumkeller, Mar 19 2014
a(n) = A243201(n) / A002061(n + 1). - Mathew Englander, Jun 03 2014
a(n) = A101321(6,n). - R. J. Mathar, Jul 28 2016
E.g.f.: (1 + 6*x + 3*x^2)*exp(x). - Ilya Gutkovskiy, Jul 28 2016
a(n) = (A001844(n) + A016754(n))/2. - Bruce J. Nicholson, Aug 06 2017
a(n) = A045943(2n+1). - Miquel Cerda, Jan 22 2018
a(n) = 3*Integral_{x=n..n+1} x^2 dx. - Carmine Suriano, Apr 10 2018
a(n) = A287326(A000124(n), 1). - Kolosov Petro, Oct 22 2018
From Amiram Eldar, Jun 20 2020: (Start)
Sum_{n>=0} a(n)/n! = 10*e.
Sum_{n>=0} (-1)^(n+1)*a(n)/n! = 2/e. (End)
G.f.: polylog(-3, x)*(1-x)/x. See the Simon Plouffe formula above, and the g.f. of the rows of A008292 by Vladeta Jovovic, Sep 02 2002. - Wolfdieter Lang, May 08 2021
a(n) = T(n-1)^2 - 2*T(n)^2 + T(n+1)^2, n >= 1, T = triangular number A000217. - Klaus Purath, Oct 11 2021
a(n) = 1 + 2*Sum_{j=n..2n} j. - Klaus Purath, Oct 19 2021
a(n) = A069099(n+1) - A000217(n). - Klaus Purath, Nov 03 2021
From Leo Tavares, Dec 03 2021: (Start)
a(n) = A005448(n) + A140091(n);
a(n) = A001844(n) + A002378(n);
a(n) = A005891(n) + A000217(n);
a(n) = A000290(n) + A000384(n+1);
a(n) = A060544(n-1) + 3*A000217(n);
a(n) = A060544(n-1) + A045943(n).
a(2*n+1) = A154105(n).
(End)

Extensions

Partially edited by Joerg Arndt, Mar 11 2010

A003136 Loeschian numbers: numbers of the form x^2 + xy + y^2; norms of vectors in A2 lattice.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28, 31, 36, 37, 39, 43, 48, 49, 52, 57, 61, 63, 64, 67, 73, 75, 76, 79, 81, 84, 91, 93, 97, 100, 103, 108, 109, 111, 112, 117, 121, 124, 127, 129, 133, 139, 144, 147, 148, 151, 156, 157, 163, 169, 171, 172, 175, 181, 183, 189, 192
Offset: 1

Views

Author

Keywords

Comments

Equally, numbers of the form x^2 - xy + y^2. - Ray Chandler, Jan 27 2009
Also, numbers of the form X^2+3Y^2 (X=y+x/2, Y=x/2), cf. A092572. - Zak Seidov, Jan 20 2009
Theorem (Schering, Delone, Watson): The only positive definite binary quadratic forms that represent the same numbers are x^2+xy+y^2 and x^2+3y^2 (up to scaling). - N. J. A. Sloane, Jun 22 2014
Equivalently, numbers n such that the coefficient of x^n in Theta3(x)*Theta3(x^3) is nonzero. - Joerg Arndt, Jan 16 2011
Equivalently, numbers n such that the coefficient of x^n in a(x) (resp. b(x)) is nonzero where a(), b() are cubic AGM functions. - Michael Somos, Jan 16 2011
Relative areas of equilateral triangles whose vertices are on a triangular lattice. - Anton Sherwood (bronto(AT)pobox.com), Apr 05 2001
2 appended to a(n) (for positive n) corresponds to capsomere count in viral architectural structures (cf. A071336). - Lekraj Beedassy, Apr 14 2006
The triangle in A132111 gives the enumeration: n^2 + k*n + k^2, 0 <= k <= n.
The number of coat proteins at each corner of a triangular face of a virus shell. - Parthasarathy Nambi, Sep 04 2007
Numbers of the form (x^2 + y^2 + (x + y)^2)/2. If we let z = - x - y, then all the solutions to x^2 + y^2 + z^2 = k with x + y + z = 0 are k = 2a(n) for any n. - Jon Perry, Dec 16 2012
Sequence of divisors of the hexagonal lattice, except zero (where it is said that an integer n divides a lattice if there exists a sublattice of index n; example: 3 divides the hexagonal lattice). - Jean-Christophe Hervé, May 01 2013
Numbers of the form - (x*y + y*z + x*z) with x + y + z = 0. Numbers of the form x^2 + y^2 + z^2 - (x*y + y*z + x*z) = (x - y)*(x - z) + (y - x) * (y - z) + (z - x) * (z - y). - Michael Somos, Jun 26 2013
Equivalently, the existence spectrum of affine Mendelsohn triple systems, cf. A248107. - David Stanovsky, Nov 25 2014
Lame's solutions to the Helmholtz equation with Dirichlet boundary conditions on the unit-edged equilateral triangle have eigenvalues of the form: (x^2+x*y+y^2)*(4*Pi/3)^2. The actual set, starting at 1 and counting degeneracies, is given by A060428, e.g., the first degeneracy is 49 where (x,y)=(0,7) and (3,5). - Robert Stephen Jones, Oct 01 2015
Curvatures of spheres in one bowl of integers, the Loeschian spheres. Mod 12, numbers equal to 0, 1, 3, 4, 7, 9. - Ed Pegg Jr, Jan 10 2017
Norms of Eisenstein integers Z[omega] or k(rho). - Juris Evertovskis, Dec 07 2017
Named after the German economist August Lösch (1906-1945). - Amiram Eldar, Jun 10 2021
Starting from the second element, these and only these numbers of congruent equilateral triangles can be used to cover a regular tetrahedron without overlaps or gaps. - Alexander M. Domashenko, Feb 01 2025
This sequence is closed under multiplication: (x; y)*(u; v) = (x*v - y*u; x*u + y*(u + v)) for x*v - y*u >= 0 , (x; y)*(u; v) = (y*u - x*v; x*u + v*(x + y)) for x*v - y*u < 0. - Alexander M. Domashenko, Feb 03 2025

References

  • J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, p. 111.
  • Ivars Peterson, The Jungles of Randomness: A Mathematical Safari, John Wiley and Sons, (1998) pp. 53.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A092572 for numbers of form x^2 + 3 y^2 with positive x,y.
See A088534 for the number of representations.
Cf. A034020 (complement), A007645 (primes); partitions: A198726, A198727.

Programs

  • Haskell
    import Data.Set (singleton, union, fromList, deleteFindMin)
    a003136 n = a003136_list !! (n-1)
    a003136_list = f 0 $ singleton 0 where
    f x s | m < x ^ 2 = m : f x s'
    | otherwise = m : f x'
    (union s' $ fromList $ map (\y -> x'^2+(x'+y)*y) [0..x'])
    where x' = x + 1
    (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Oct 30 2011
    
  • Julia
    function isA003136(n)
        n % 3 == 2 && return false
        n in [0, 1, 3] && return true
        M = Int(round(2*sqrt(n/3)))
        for y in 0:M, x in 0:y
            n == x^2 + y^2 + x*y && return true
        end
        return false
    end
    A003136list(upto) = [n for n in 0:upto if isA003136(n)]
    A003136list(192) |> println # Peter Luschny, Mar 17 2018
    
  • Magma
    [n: n in [0..192] | NormEquation(3, n) eq true]; // Arkadiusz Wesolowski, May 11 2016
    
  • Maple
    readlib(ifactors): for n from 2 to 200 do m := ifactors(n)[2]: flag := 1: for i from 1 to nops(m) do if m[i,1] mod 3 = 2 and m[i,2] mod 2 = 1 then flag := 0; break fi: od: if flag=1 then printf(`%d,`,n) fi: od: # James Sellers, Dec 07 2000
  • Mathematica
    ok[n_] := Resolve[Exists[{x, y}, Reduce[n == x^2 + x*y + y^2, {x, y}, Integers]]]; Select[Range[0, 192], ok] (* Jean-François Alcover, Apr 18 2011 *)
    nn = 14; Select[Union[Flatten[Table[x^2 + x*y + y^2, {x, 0, nn}, {y, 0, x}]]], # <= nn^2 &] (* T. D. Noe, Apr 18 2011 *)
    QP = QPochhammer; s = QP[q]^3 / QP[q^3]/3 + O[q]^200; Position[ CoefficientList[s, q], n_ /; n != 0] - 1 // Flatten (* Jean-François Alcover, Nov 27 2015, adapted from PARI *)
  • PARI
    isA003136(n)=local(fac,flag);if(n==0,1,fac=factor(n);flag=1;for(i=1,matsize(fac)[1],if(Mod(fac[i,1],3)==2 && Mod(fac[i,2],2)==1,flag=0));flag)
    
  • PARI
    is(n)=#bnfisintnorm(bnfinit(z^2+z+1),n) \\ Ralf Stephan, Oct 18 2013
    
  • PARI
    x='x+O('x^200); p=eta(x)^3/eta(x^3); for(n=0, 199, if(polcoeff(p, n) != 0, print1(n, ", "))) \\ Altug Alkan, Nov 08 2015
    
  • PARI
    list(lim)=my(v=List(),y,t); for(x=0,sqrtint(lim\3), my(y=x,t); while((t=x^2+x*y+y^2)<=lim, listput(v,t); y++)); Set(v) \\ Charles R Greathouse IV, Feb 05 2017
    
  • PARI
    is_a003136(n) = !n || #qfbsolve(Qfb(1, 1, 1), n, 3) \\ Hugo Pfoertner, Aug 04 2023
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A003136_gen(): return (n for n in count(0) if all(e % 2 == 0 for p,e in factorint(n).items() if p % 3 == 2))
    A003136_list = list(islice(A003136_gen(),30)) # Chai Wah Wu, Jan 20 2022

Formula

Either n=0 or else in the prime factorization of n all primes of the form 3a+2 must occur to even powers only (there is no restriction of primes congruent to 0 or 1 mod 3).
If n is in the sequence, then n^k is in the sequence (but the converse is not true). n is in the sequence iff n^(2k+1) is in the sequence. - Ray Chandler, Feb 03 2009
A088534(a(n)) > 0. - Reinhard Zumkeller, Oct 30 2011
The sequence is multiplicative in the sense that if m and n are in the sequence, so is m*n. - Jon Perry, Dec 18 2012
Comments from Richard C. Schroeppel, Jul 20 2016: (Start)
The set is also closed under restricted division: If M and N are members, and M divides N, then N/M is a member.
If N == 2 (mod 3), N is not in the sequence.
The density of members (relative to the integers>0) gradually falls to 0. The density goes as O(1/sqrt(log N)). This implies that, if N is a member, the average expected number of representations of N is O(sqrt(log N)).
Representations usually come in sets of 6: (K,L), (K+L,-K), (K+L,-L) and their negatives. (End)
Since Q(zeta), where zeta is a primitive 3rd root of unity has class number 1, the situation as to whether an integer is of the form x^2 + xy + y^2 is similar to the situation with x^2 + y^2: n is of that form if and only if every prime p dividing n which is = 5 mod 6 divides it to an even power. The density of 1/sqrt(x) that Rich mentioned is an old result due to Landau. - Victor S. Miller, Jul 20 2016
From Juris Evertovskis, Dec 07 2017; Jan 01 2020: (Start)
In the prime factorization of n, let S_1 be the set of distinct prime factors p_i for which p_i == 1 (mod 3), let S_2 be the set of distinct prime factors p_j for which p_j == 2 (mod 3), and let M be the exponent of 3. Then n = 3^M * (Product_{p_i in S_1} p_i ^ e_i) * (Product_{p_j in S_2} p_j ^ e_j), and the number of solutions for x^2+xy+y^2=n is 6*Product_{p_i in S_1} (e_i + 1) if all e_j are even and 0 otherwise.
For all Löschian numbers there are nonnegative X,Y such that X^2+XY+Y^2=n. For x,y such that x^2+xy+y^2=n take X=min(|x|,|y|), Y=|x+y| if xy<0 and X=|x|, Y=|y| otherwise. (End)

A033428 a(n) = 3*n^2.

Original entry on oeis.org

0, 3, 12, 27, 48, 75, 108, 147, 192, 243, 300, 363, 432, 507, 588, 675, 768, 867, 972, 1083, 1200, 1323, 1452, 1587, 1728, 1875, 2028, 2187, 2352, 2523, 2700, 2883, 3072, 3267, 3468, 3675, 3888, 4107, 4332, 4563, 4800, 5043, 5292, 5547, 5808, 6075, 6348
Offset: 0

Views

Author

Keywords

Comments

The number of edges of a complete tripartite graph of order 3n, K_n,n,n. - Roberto E. Martinez II, Oct 18 2001
From Floor van Lamoen, Jul 21 2001: (Start)
Write 1,2,3,4,... in a hexagonal spiral around 0; then a(n) is the sequence found by reading the line from 0 in the direction 0,3,.... The spiral begins:
.
33--32--31--30
/ \
34 16--15--14 29
/ / \ \
35 17 5---4 13 28
/ / / \ \ \
36 18 6 0---3--12--27--48-->
/ / / / / / / /
37 19 7 1---2 11 26 47
\ \ \ / / /
38 20 8---9--10 25 46
\ \ / /
39 21--22--23--24 45
\ /
40--41--42--43--44
(End)
Number of edges of the complete bipartite graph of order 4n, K_n,3n. - Roberto E. Martinez II, Jan 07 2002
Also the number of partitions of 6n + 3 into at most 3 parts. - R. K. Guy, Oct 23 2003
Also the number of partitions of 6n into exactly 3 parts. - Colin Barker, Mar 23 2015
Numbers n such that the imaginary quadratic field Q[sqrt(-n)] has six units. - Marc LeBrun, Apr 12 2006
The denominators of Hoehn's sequence (recalled by G. L. Honaker, Jr.) and the numerators of that sequence reversed. The sequence is 1/3, (1+3)/(5+7), (1+3+5)/(7+9+11), (1+3+5+7)/(9+11+13+15), ...; reduced to 1/3, 4/12, 9/27, 16/48, ... . For the reversal, the reduction is 3/1, 12/4, 27/9, 48/16, ... . - Enoch Haga, Oct 05 2007
Right edge of tables in A200737 and A200741: A200737(n, A000292(n)) = A200741(n, A100440(n)) = a(n). - Reinhard Zumkeller, Nov 21 2011
The Wiener index of the crown graph G(n) (n>=3). The crown graph G(n) is the graph with vertex set {x(1), x(2), ..., x(n), y(1), y(2), ..., y(n)} and edge set {(x(i), y(j)): 1<=i, j<=n, i/=j} (= the complete bipartite graph K(n,n) with horizontal edges removed). Example: a(3)=27 because G(3) is the cycle C(6) and 6*1 + 6*2 + 3*3 = 27. The Hosoya-Wiener polynomial of G(n) is n(n-1)(t+t^2)+nt^3. - Emeric Deutsch, Aug 29 2013
From Michel Lagneau, May 04 2015: (Start)
Integer area A of equilateral triangles whose side lengths are in the commutative ring Z[3^(1/4)] = {a + b*3^(1/4) + c*3^(1/2) + d*3^(3/4), a,b,c and d in Z}.
The area of an equilateral triangle of side length k is given by A = k^2*sqrt(3)/4. In the ring Z[3^(1/4)], if k = q*3^(1/4), then A = 3*q^2/4 is an integer if q is even. Example: 27 is in the sequence because the area of the triangle (6*3^(1/4), 6*3^(1/4), 6*3^(1/4)) is 27. (End)
a(n) is 2*sqrt(3) times the area of a 30-60-90 triangle with short side n. Also, 3 times the area of an n X n square. - Wesley Ivan Hurt, Apr 06 2016
Consider the hexagonal tiling of the plane. Extract any four hexagons adjacent by edge. This can be done in three ways. Fold the four hexagons so that all opposite faces occupy parallel planes. For all parallel projections of the resulting object, at least two correspond to area a(n) for side length of n of the original hexagons. - Torlach Rush, Aug 17 2022
The sequence terms are the exponents in the expansion of Product_{n >= 1} (1 - q^(3*n))/(1 + q^(3*n)) = ( Sum_{n in Z} q^(n*(3*n+1)/2) ) / ( Product_{n >= 1} 1 + q^n ) = 1 - 2*q^3 + 2*q^12 - 2*q^27 + 2*q^48 - 2*q^75 + - .... - Peter Bala, Dec 30 2024

Examples

			From _Ilya Gutkovskiy_, Apr 13 2016: (Start)
Illustration of initial terms:
.                                              o
.                                             o o
.                                            o   o
.                          o                o  o  o
.                         o o              o  o o  o
.                        o   o            o  o   o  o
.           o           o  o  o          o  o  o  o  o
.          o o         o  o o  o        o  o  o o  o  o
.         o   o       o  o   o  o      o  o  o   o  o  o
.  o     o  o  o     o  o  o  o  o    o  o  o  o  o  o  o
. o o   o  o o  o   o  o  o o  o  o  o  o  o  o o  o  o  o
. n=1      n=2            n=3                 n=4
(End)
		

Crossrefs

Programs

  • Haskell
    a033428 = (* 3) . (^ 2)
    a033428_list = 0 : 3 : 12 : zipWith (+) a033428_list
       (map (* 3) $ tail $ zipWith (-) (tail a033428_list) a033428_list)
    -- Reinhard Zumkeller, Jul 11 2013
    
  • Magma
    [3*n^2: n in [0..50]]; // Vincenzo Librandi, May 18 2015
    
  • Maple
    seq(3*n^2, n=0..46); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    3 Range[0, 50]^2
    LinearRecurrence[{3, -3, 1}, {0, 3, 12}, 50] (* Harvey P. Dale, Feb 16 2013 *)
  • Maxima
    makelist(3*n^2,n,0,30); /* Martin Ettl, Nov 12 2012 */
    
  • PARI
    a(n)=3*n^2
    
  • Python
    def a(n): return 3 * (n**2) # Torlach Rush, Aug 25 2022

Formula

a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>2.
G.f.: 3*x*(1+x)/(1-x)^3. - R. J. Mathar, Sep 09 2008
Main diagonal of triangle in A132111: a(n) = A132111(n,n). - Reinhard Zumkeller, Aug 10 2007
A214295(a(n)) = -1. - Reinhard Zumkeller, Jul 12 2012
a(n) = A215631(n,n) for n > 0. - Reinhard Zumkeller, Nov 11 2012
a(n) = A174709(6n+2). - Philippe Deléham, Mar 26 2013
a(n) = a(n-1) + 6*n - 3, with a(0)=0. - Jean-Bernard François, Oct 04 2013
E.g.f.: 3*x*(1 + x)*exp(x). - Ilya Gutkovskiy, Apr 13 2016
a(n) = t(3*n) - 3*t(n), where t(i) = i*(i+k)/2 for any k. Special case (k=1): A000217(3*n) - 3*A000217(n). - Bruno Berselli, Aug 31 2017
a(n) = A000326(n) + A005449(n). - Bruce J. Nicholson, Jan 10 2020
From Amiram Eldar, Jul 03 2020: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/18 (A086463).
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/36. (End)
From Amiram Eldar, Feb 03 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = sqrt(3)*sinh(Pi/sqrt(3))/Pi.
Product_{n>=1} (1 - 1/a(n)) = sqrt(3)*sin(Pi/sqrt(3))/Pi. (End)
a(n) = A003215(n) - A016777(n). - Leo Tavares, Apr 29 2023

Extensions

Better description from N. J. A. Sloane, May 15 1998

A056107 Third spoke of a hexagonal spiral.

Original entry on oeis.org

1, 4, 13, 28, 49, 76, 109, 148, 193, 244, 301, 364, 433, 508, 589, 676, 769, 868, 973, 1084, 1201, 1324, 1453, 1588, 1729, 1876, 2029, 2188, 2353, 2524, 2701, 2884, 3073, 3268, 3469, 3676, 3889, 4108, 4333, 4564, 4801, 5044, 5293, 5548, 5809, 6076, 6349
Offset: 0

Views

Author

Henry Bottomley, Jun 09 2000

Keywords

Comments

a(n+1) is the number of lines crossing n cells of an n X n X n cube. - Lekraj Beedassy, Jul 29 2005
Equals binomial transform of [1, 3, 6, 0, 0, 0, ...]. - Gary W. Adamson, May 03 2008
Each term a(n), with n>1 represents the area of the right trapezoid with bases whose values are equal to hex number A003215(n) and A003215(n+1)and height equal to 1. The right trapezoid is formed by a rectangle with the sides equal to A003215(n) and 1 and a right triangle whose area is 3*n with the greater cathetus equal to the difference A003215(n+1)-A003215(n). - Giacomo Fecondo, Jun 11 2010
2*a(n)^2 is of the form x^4+y^4+(x+y)^4. In fact, 2*a(n)^2 = (n-1)^4+(n+1)^4+(2n)^4. - Bruno Berselli, Jul 16 2013
Numbers m such that m+(m-1)+(m-2) is a square. - César Aguilera, May 26 2015
After 4, twice each term belongs to A181123: 2*a(n) = (n+1)^3 - (n-1)^3. - Bruno Berselli, Mar 09 2016
This is a subsequence of A003136: a(n) = (n-1)^2 + (n-1)*(n+1) + (n+1)^2. - Bruno Berselli, Feb 08 2017
For n > 3, also the number of (not necessarily maximal) cliques in the n X n torus grid graph. - Eric W. Weisstein, Nov 30 2017

References

  • Edward J. Barbeau, Murray S. Klamkin and William O. J. Moser, Five Hundred Mathematical Challenges, MAA, Washington DC, 1995, Problem 444, pp. 42 and 195.
  • Ben Hamilton, Brainteasers and Mindbenders, Fireside, 1992, p. 107.

Crossrefs

Cf. A002648 (prime terms), A201053.
Other spirals: A054552.

Programs

Formula

a(n) = 3*n^2 + 1.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2.
G.f.: (1+x+4*x^2)/(1-x)^3.
a(n) = a(n-1) + 6*n - 3 for n>0.
a(n) = 2*a(n-1) - a(n-2) + 6 for n>1.
a(n) = A056105(n) + 2*n = A056106(n) + n.
a(n) = A056108(n) - n = A056109(n) - 2*n = A003215(n) - 3*n.
a(n) = (A000578(n+1) - A000578(n-1))/2. - Lekraj Beedassy, Jul 29 2005
a(n) = A132111(n+1,n-1) for n>1. - Reinhard Zumkeller, Aug 10 2007
E.g.f.: (1 + 3*x + 3*x^2)*exp(x). - G. C. Greubel, Dec 02 2018
From Amiram Eldar, Jul 15 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + (Pi/sqrt(3))*coth(Pi/sqrt(3)))/2.
Sum_{n>=0} (-1)^n/a(n) = (1 + (Pi/sqrt(3))*csch(Pi/sqrt(3)))/2. (End)
From Amiram Eldar, Feb 05 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = sqrt(2)*csch(Pi/sqrt(3))*sinh(sqrt(2/3)*Pi).
Product_{n>=1} (1 - 1/a(n)) = (Pi/sqrt(3))*csch(Pi/sqrt(3)). (End)

A117950 a(n) = n^2 + 3.

Original entry on oeis.org

3, 4, 7, 12, 19, 28, 39, 52, 67, 84, 103, 124, 147, 172, 199, 228, 259, 292, 327, 364, 403, 444, 487, 532, 579, 628, 679, 732, 787, 844, 903, 964, 1027, 1092, 1159, 1228, 1299, 1372, 1447, 1524, 1603, 1684, 1767, 1852, 1939, 2028, 2119, 2212, 2307, 2404, 2503
Offset: 0

Views

Author

Eric W. Weisstein, Apr 04 2006

Keywords

Comments

Nonnegative X values of solutions to the equation X^3 - (X + 3)^2 + X + 6 = Y^2. To prove that X = n^2 + 3: Y^2 = X^3 - (X + 3)^2 + X + 6 = X^3 - X^2 - 5X - 3 = (X - 3)(X^2 + 2X + 1) = (X - 3)*(X + 1)^2 it means: (X - 3) must be a perfect square, so X = n^2 + 3 and Y = n(n^2 + 4). - Mohamed Bouhamida, Nov 12 2007
An equivalent technique of integer factorization would work, for example, for the equation X^3 - 3*X^2 - 9*X - 5 = (X-5)(X+1)^2 = Y^2, looking for perfect squares of the form X - 5 = n^2. - R. J. Mathar, Nov 20 2007
Take a square array of (n+1) X (n+1) dots (which correspond to the vertices of a grid of n X n squares). Connect the dots with vertical and horizontal line segments of any length so that each dot is connected to each of its orthogonal neighbors, and so that no line segment crosses any previously drawn line segment. Then the minimum number of line segments is a(n), for n >= 1. - Leroy Quet, Apr 12 2009
a(n) is also the Wiener index of the double fan graph F(n). The double fan graph F(n) is defined as the graph obtained by joining each node of an n-node path graph with two additional nodes. The Wiener index of a connected graph is the sum of the distances between all unordered pairs of vertices in the graph. The Wiener polynomial of the graph F(n) is (3n-1)t + (1/2)(n^2 - 3n + 4)t^2. Example: a(3)=12 because the corresponding double fan graph is the wheel graph on 5 nodes OABCD, O being the center of the wheel. Its Wiener index = number of edges + |AC| +|BD| = 8 + 2 + 2 = 12. - Emeric Deutsch, Sep 24 2010

Crossrefs

For primes in this sequence see A049422.

Programs

Formula

G.f.: (3 - 5*x + 4*x^2)/(1-x)^3. - R. J. Mathar, Nov 20 2007
a(n) = A000290(n) + 3. - Omar E. Pol, Dec 20 2008
a(n) = ((n-3)^2 + 3*(n+1)^2)/4. - Reinhard Zumkeller, Feb 13 2009
a(n) = A132111(n-1,2) for n>1. - Reinhard Zumkeller, Aug 10 2007
a(n) = ceiling((n+1/n)^2), n>0. - Vincenzo Librandi, Oct 19 2011
a(n) = 2*n + a(n-1) - 1 (with a(0)=3). - Vincenzo Librandi, Nov 13 2010
a(n)*a(n-1) - 3 = (a(n)-n)^2 = A027688(n-1)^2. - Bruno Berselli, Dec 08 2011
From Amiram Eldar, Jul 21 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(3)*Pi*coth(sqrt(3)*Pi))/6.
Sum_{n>=0} (-1)^n/a(n) = (1 + (sqrt(3)*Pi)*csch(sqrt(3)*Pi))/6. (End)
From Amiram Eldar, Jan 29 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = 2*csch(sqrt(3)*Pi)*sinh(2*Pi)/sqrt(3).
Product_{n>=0} (1 - 1/a(n)) = sqrt(2/3)*csch(sqrt(3)*Pi)*sinh(sqrt(2)*Pi). (End)
E.g.f.: exp(x)*(3 + x + x^2). - Stefano Spezia, Aug 26 2024

Extensions

Edited by N. J. A. Sloane Apr 15 2009 at the suggestion of Leroy Quet

A033582 a(n) = 7*n^2.

Original entry on oeis.org

0, 7, 28, 63, 112, 175, 252, 343, 448, 567, 700, 847, 1008, 1183, 1372, 1575, 1792, 2023, 2268, 2527, 2800, 3087, 3388, 3703, 4032, 4375, 4732, 5103, 5488, 5887, 6300, 6727, 7168, 7623, 8092, 8575, 9072, 9583, 10108, 10647, 11200, 11767, 12348, 12943, 13552, 14175
Offset: 0

Views

Author

Keywords

Comments

From Roberto E. Martinez II, Jan 07 2002: (Start)
Number of edges of the complete bipartite graph of order 8n, K_n,7n.
Number of edges of the complete tripartite graph of order 5n, K_n,n,3n. (End)

Crossrefs

Programs

Formula

Central terms of the triangle in A132111: a(n) = A132111(2*n,n). - Reinhard Zumkeller, Aug 10 2007
a(n) = 7*A000290(n). - Omar E. Pol, Dec 11 2008
a(n) = 14*n + a(n-1) - 7 (with a(0) = 0). - Vincenzo Librandi, Aug 05 2010
G.f.: -7*x*(1+x)/(x-1)^3. - R. J. Mathar, Feb 06 2017
From Amiram Eldar, Feb 03 2021: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/42.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/84.
Product_{n>=1} (1 + 1/a(n)) = sqrt(7)*sinh(Pi/sqrt(7))/Pi.
Product_{n>=1} (1 - 1/a(n)) = sqrt(7)*sin(Pi/sqrt(7))/Pi. (End)
From Elmo R. Oliveira, Dec 02 2024: (Start)
E.g.f.: 7*exp(x)*x*(1 + x).
a(n) = n*A008589(n) = A195041(2*n).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A073254 Array read by antidiagonals, A(n,k) = n^2 + n*k + k^2.

Original entry on oeis.org

0, 1, 1, 4, 3, 4, 9, 7, 7, 9, 16, 13, 12, 13, 16, 25, 21, 19, 19, 21, 25, 36, 31, 28, 27, 28, 31, 36, 49, 43, 39, 37, 37, 39, 43, 49, 64, 57, 52, 49, 48, 49, 52, 57, 64, 81, 73, 67, 63, 61, 61, 63, 67, 73, 81, 100, 91, 84, 79, 76, 75, 76, 79, 84, 91, 100, 121, 111, 103, 97
Offset: 0

Views

Author

Michael Somos, Jul 23 2002

Keywords

Comments

Norm of elements in planar hexagonal lattice A_2.
Only numbers which appear in A003136 (Loeschian numbers) can appear in this array. - Peter Luschny, Nov 10 2021

Examples

			Triangle T(n, k) starts:
[0]               0
[1]              1, 1
[2]            4, 3, 4
[3]           9, 7, 7, 9
[4]       16, 13, 12, 13, 16
[5]     25, 21, 19, 19, 21, 25
[6]   36, 31, 28, 27, 28, 31, 36
[7] 49, 43, 39, 37, 37, 39, 43, 49
		

Crossrefs

A033994 gives antidiagonal sums.
Cf. A198063 (m=3), A198064 (m=4), A198065 (m=5).

Programs

  • Maple
    # Using the triangle formula:
    A073254 := (n,k) -> k^2 - k*n + n^2: # Peter Luschny, Oct 26 2011
  • Mathematica
    (* Using the array formula: *)
    A[n_, k_] := n^2 + n k + k^2;
    Table[A[n - k, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 22 2018 *)
  • PARI
    {A(n, k) = n^2 + n*k + k^2}

Formula

From Peter Luschny, Oct 26 2011: (Start)
Let m = 2, for the cases m = 3, 4, and 5 see the cross-references.
T(n,k) = k^2 - k*n + n^2 = A(n-k,k).
T(n,k) = Sum_{j=0..m} Sum_{i=0..m} (-1)^(j+i)*C(i,j)*n^j*k^(m-j) for m = 2.
T(n,0) = T(n,n) = n^m = n^2 = A000290(n).
T(2n,n) = (m+1)*n^m = 3*n^2 = A033428(n).
T(2n+1,n+1) = (n+1)^(m+1) - n^(m+1) = (n+1)^3 - n^3 = A003215(n).
Sum_{k=0..n} T(n,k) = (5*n^3 + 6*n^2 + n)/6 = A033994(n).
T(n+1, k+1)*binomial(n, k)^3/(k+1)^2 = A194595(n,k). (End)

Extensions

Edited by Peter Luschny, Nov 10 2021

A132112 a(n) = n*(n+1)*(11*n+1)/6.

Original entry on oeis.org

0, 4, 23, 68, 150, 280, 469, 728, 1068, 1500, 2035, 2684, 3458, 4368, 5425, 6640, 8024, 9588, 11343, 13300, 15470, 17864, 20493, 23368, 26500, 29900, 33579, 37548, 41818, 46400, 51305, 56544, 62128, 68068, 74375, 81060, 88134, 95608, 103493, 111800
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 10 2007

Keywords

Comments

Sums of rows of the triangle in A132111.

Crossrefs

Programs

  • Magma
    I:=[0, 4, 23, 68]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jun 29 2012
    
  • Mathematica
    CoefficientList[Series[x*(4+7*x)/(1-x)^4,{x,0,40}],x] (* Vincenzo Librandi, Jun 29 2012 *)
    LinearRecurrence[{4,-6,4,-1},{0,4,23,68},40] (* Harvey P. Dale, Jun 28 2021 *)
  • PARI
    a(n)=n*(n+1)*(11*n+1)/6 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = A132121(n,3) for n > 2.
G.f.: x*(4+7*x)/(1-x)^4. - Colin Barker, Jun 06 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 29 2012
a(-n) = -A254407(n-1). - Bruno Berselli, Jan 31 2015
E.g.f.: exp(x)*x*(24 + 45*x + 11*x^2)/6. - Stefano Spezia, Feb 21 2024
Showing 1-10 of 12 results. Next