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-9 of 9 results.

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

Original entry on oeis.org

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

Views

Author

Keywords

Comments

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

Examples

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

References

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

Crossrefs

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

Programs

Formula

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

Extensions

Partially edited by Joerg Arndt, Mar 11 2010

A001105 a(n) = 2*n^2.

Original entry on oeis.org

0, 2, 8, 18, 32, 50, 72, 98, 128, 162, 200, 242, 288, 338, 392, 450, 512, 578, 648, 722, 800, 882, 968, 1058, 1152, 1250, 1352, 1458, 1568, 1682, 1800, 1922, 2048, 2178, 2312, 2450, 2592, 2738, 2888, 3042, 3200, 3362, 3528, 3698, 3872, 4050, 4232, 4418
Offset: 0

Views

Author

Bernd.Walter(AT)frankfurt.netsurf.de

Keywords

Comments

Number of edges of the complete bipartite graph of order 3n, K_{n,2n}. - Roberto E. Martinez II, Jan 07 2002
"If each period in the periodic system ends in a rare gas ..., the number of elements in a period can be found from the ordinal number n of the period by the formula: L = ((2n+3+(-1)^n)^2)/8..." - Nature, Jun 09 1951; Nature 411 (Jun 07 2001), p. 648. This produces the present sequence doubled up.
Let z(1) = i = sqrt(-1), z(k+1) = 1/(z(k)+2i); then a(n) = (-1)*Imag(z(n+1))/Real(z(n+1)). - Benoit Cloitre, Aug 06 2002
Maximum number of electrons in an atomic shell with total quantum number n. Partial sums of A016825. - Jeremy Gardiner, Dec 19 2004
Arithmetic mean of triangular numbers in pairs: (1+3)/2, (6+10)/2, (15+21)/2, ... . - Amarnath Murthy, Aug 05 2005
These numbers form a pattern on the Ulam spiral similar to that of the triangular numbers. - G. Roda, Oct 20 2010
Integral areas of isosceles right triangles with rational legs (legs are 2n and triangles are nondegenerate for n > 0). - Rick L. Shepherd, Sep 29 2009
Even squares divided by 2. - Omar E. Pol, Aug 18 2011
Number of stars when distributed as in the U.S.A. flag: n rows with n+1 stars and, between each pair of these, one row with n stars (i.e., n-1 of these), i.e., n*(n+1)+(n-1)*n = 2*n^2 = A001105(n). - César Eliud Lozada, Sep 17 2012
Apparently the number of Dyck paths with semilength n+3 and an odd number of peaks and the central peak having height n-3. - David Scambler, Apr 29 2013
Sum of the partition parts of 2n into exactly two parts. - Wesley Ivan Hurt, Jun 01 2013
Consider primitive Pythagorean triangles (a^2 + b^2 = c^2, gcd(a, b) = 1) with hypotenuse c (A020882) and respective odd leg a (A180620); sequence gives values c-a, sorted with duplicates removed. - K. G. Stier, Nov 04 2013
Number of roots in the root systems of type B_n and C_n (for n > 1). - Tom Edgar, Nov 05 2013
Area of a square with diagonal 2n. - Wesley Ivan Hurt, Jun 18 2014
This sequence appears also as the first and second member of the quartet [a(n), a(n), p(n), p(n)] of the square of [n, n, n+1, n+1] in the Clifford algebra Cl_2 for n >= 0. p(n) = A046092(n). See an Oct 15 2014 comment on A147973 where also a reference is given. - Wolfdieter Lang, Oct 16 2014
a(n) are the only integers m where (A000005(m) + A000203(m)) = (number of divisors of m + sum of divisors of m) is an odd number. - Richard R. Forberg, Jan 09 2015
a(n) represents the first term in a sum of consecutive integers running to a(n+1)-1 that equals (2n+1)^3. - Patrick J. McNab, Dec 24 2016
Also the number of 3-cycles in the (n+4)-triangular honeycomb obtuse knight graph. - Eric W. Weisstein, Jul 29 2017
Also the Wiener index of the n-cocktail party graph for n > 1. - Eric W. Weisstein, Sep 07 2017
Numbers represented as the palindrome 242 in number base B including B=2 (binary), 3 (ternary) and 4: 242(2)=18, 242(3)=32, 242(4)=50, ... 242(9)=200, 242(10)=242, ... - Ron Knott, Nov 14 2017
a(n) is the square of the hypotenuse of an isosceles right triangle whose sides are equal to n. - Thomas M. Green, Aug 20 2019
The sequence contains all odd powers of 2 (A004171) but no even power of 2 (A000302). - Torlach Rush, Oct 10 2019
From Bernard Schott, Aug 31 2021 and Sep 16 2021: (Start)
Apart from 0, integers such that the number of even divisors (A183063) is odd.
Proof: every n = 2^q * (2k+1), q, k >= 0, then 2*n^2 = 2^(2q+1) * (2k+1)^2; now, gcd(2, 2k+1) = 1, tau(2^(2q+1)) = 2q+2 and tau((2k+1)^2) = 2u+1 because (2k+1)^2 is square, so, tau(2*n^2) = (2q+2) * (2u+1).
The 2q+2 divisors of 2^(2q+1) are {1, 2, 2^2, 2^3, ..., 2^(2q+1)}, so 2^(2q+1) has 2q+1 even divisors {2^1, 2^2, 2^3, ..., 2^(2q+1)}.
Conclusion: these 2q+1 even divisors create with the 2u+1 odd divisors of (2k+1)^2 exactly (2q+1)*(2u+1) even divisors of 2*n^2, and (2q+1)*(2u+1) is odd. (End)
a(n) with n>0 are the numbers with period length 2 for Bulgarian and Mancala solitaire. - Paul Weisenhorn, Jan 29 2022
Number of points at L1 distance = 2 from any given point in Z^n. - Shel Kaphan, Feb 25 2023
Integer that multiplies (h^2)/(m*L^2) to give the energy of a 1-D quantum mechanical particle in a box whenever it is an integer multiple of (h^2)/(m*L^2), where h = Planck's constant, m = mass of particle, and L = length of box. - A. Timothy Royappa, Mar 14 2025

Examples

			a(3) = 18; since 2(3) = 6 has 3 partitions with exactly two parts: (5,1), (4,2), (3,3).  Adding all the parts, we get: 1 + 2 + 3 + 3 + 4 + 5 = 18. - _Wesley Ivan Hurt_, Jun 01 2013
		

References

  • Peter Atkins, Julio De Paula, and James Keeler, "Atkins' Physical Chemistry," Oxford University Press, 2023, p. 31.
  • Arthur Beiser, Concepts of Modern Physics, 2nd Ed., McGraw-Hill, 1973.
  • Martin Gardner, The Colossal Book of Mathematics, Classic Puzzles, Paradoxes and Problems, Chapter 2 entitled "The Calculus of Finite Differences," W. W. Norton and Company, New York, 2001, pages 12-13.
  • L. B. W. Jolley, "Summation of Series", Dover Publications, 1961, p. 44.
  • Alain M. Robert, A Course in p-adic Analysis, Springer-Verlag, 2000, p. 213.

Crossrefs

Cf. numbers of the form n*(n*k-k+4)/2 listed in A226488.
Cf. A058331 and A247375. - Bruno Berselli, Sep 16 2014
Cf. A194715 (4-cycles in the triangular honeycomb obtuse knight graph), A290391 (5-cycles), A290392 (6-cycles). - Eric W. Weisstein, Jul 29 2017
Integers such that: this sequence (the number of even divisors is odd), A028982 (the number of odd divisors is odd), A028983 (the number of odd divisors is even), A183300 (the number of even divisors is even).

Programs

Formula

a(n) = (-1)^(n+1) * A053120(2*n, 2).
G.f.: 2*x*(1+x)/(1-x)^3.
a(n) = A100345(n, n).
Sum_{n>=1} 1/a(n) = Pi^2/12 =A072691. [Jolley eq. 319]. - Gary W. Adamson, Dec 21 2006
a(n) = A049452(n) - A033991(n). - Zerinvary Lajos, Jun 12 2007
a(n) = A016742(n)/2. - Zerinvary Lajos, Jun 20 2008
a(n) = 2 * A000290(n). - Omar E. Pol, May 14 2008
a(n) = 4*n + a(n-1) - 2, n > 0. - Vincenzo Librandi
a(n) = A002378(n-1) + A002378(n). - Joerg M. Schuetze (joerg(AT)cyberheim.de), Mar 08 2010 [Corrected by Klaus Purath, Jun 18 2020]
a(n) = A176271(n,k) + A176271(n,n-k+1), 1 <= k <= n. - Reinhard Zumkeller, Apr 13 2010
a(n) = A007607(A000290(n)). - Reinhard Zumkeller, Feb 12 2011
For n > 0, a(n) = 1/coefficient of x^2 in the Maclaurin expansion of 1/(cos(x)+n-1). - Francesco Daddi, Aug 04 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Artur Jasinski, Nov 24 2011
a(n) = A070216(n,n) for n > 0. - Reinhard Zumkeller, Nov 11 2012
a(n) = A014132(2*n-1,n) for n > 0. - Reinhard Zumkeller, Dec 12 2012
a(n) = A000217(n) + A000326(n). - Omar E. Pol, Jan 11 2013
(a(n) - A000217(k))^2 = A000217(2*n-1-k)*A000217(2*n+k) + n^2, for all k. - Charlie Marion, May 04 2013
a(n) = floor(1/(1-cos(1/n))), n > 0. - Clark Kimberling, Oct 08 2014
a(n) = A251599(3*n-1) for n > 0. - Reinhard Zumkeller, Dec 13 2014
a(n) = Sum_{j=1..n} Sum_{i=1..n} ceiling((i+j-n+4)/3). - Wesley Ivan Hurt, Mar 12 2015
a(n) = A002061(n+1) + A165900(n). - Torlach Rush, Feb 21 2019
E.g.f.: 2*exp(x)*x*(1 + x). - Stefano Spezia, Oct 12 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/24 (A222171). - Amiram Eldar, Jul 03 2020
From Amiram Eldar, Feb 03 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = sqrt(2)*sinh(Pi/sqrt(2))/Pi.
Product_{n>=1} (1 - 1/a(n)) = sqrt(2)*sin(Pi/sqrt(2))/Pi. (End)

A215631 Triangle read by rows: T(n,k) = n^2 + n*k + k^2, 1 <= k <= n.

Original entry on oeis.org

3, 7, 12, 13, 19, 27, 21, 28, 37, 48, 31, 39, 49, 61, 75, 43, 52, 63, 76, 91, 108, 57, 67, 79, 93, 109, 127, 147, 73, 84, 97, 112, 129, 148, 169, 192, 91, 103, 117, 133, 151, 171, 193, 217, 243, 111, 124, 139, 156, 175, 196, 219, 244, 271, 300, 133, 147, 163
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 11 2012

Keywords

Examples

			The triangle begins:
row n   T(n,k), 1 <= k <= n
   1:     3
   2:     7   12
   3:    13   19   27
   4:    21   28   37   48
   5:    31   39   49   61   75
   6:    43   52   63   76   91  108
   7:    57   67   79   93  109  127  147
   8:    73   84   97  112  129  148  169  192
   9:    91  103  117  133  151  171  193  217  243
  10:   111  124  139  156  175  196  219  244  271  300
  11:   133  147  163  181  201  223  247  273  301  331  363
  12:   157  172  189  208  229  252  277  304  333  364  397  432
		

Crossrefs

Cf. A215646 (row sums), A002061 (left edge, shifted), A033428 (right edge), A003215.

Programs

  • Haskell
    a215631 n k = a215631_tabl !! (n-1) !! (k-1)
    a215631_row n = a215631_tabl !! (n-1)
    a215631_tabl = zipWith3 (zipWith3 (\u v w -> u + v + w))
                            a093995_tabl a075362_tabl a133819_tabl
    -- Reinhard Zumkeller, Nov 11 2012
    
  • Magma
    [[i^2+i*j+j^2: j in [1..i]]: i in [1..10]]; // Vincenzo Librandi, Jun 07 2015
  • Maple
    seq(seq(i^2+i*j+j^2, j=1..i),i=1..10); # Robert Israel, May 10 2015
  • Mathematica
    Table[n^2 + n*k + k^2, {n, 11}, {k, n}] // Flatten (* Michael De Vlieger, May 12 2015 *)
  • PARI
    for(n=1,15,for(k=1,n,print1(n^2+n*k+k^2,", "))) \\ Derek Orr, May 13 2015
    

Formula

T(n,k) = 2*A070216(n,k) - A215630(n,k).
G.f. for triangle: (3-2*x+3*x*y+x^2-11*x^2*y+4*x^3*y+x^3*y^2+x^4*y^2)*x*y/((1-x)^3*(1-x*y)^3). - Robert Israel, May 10 2015
From Avi Friedlich, May 26 2015: (Start)
T(n,k) = A093995(n,k) + A075362(n,k) + A133819(n,k).
T(k+1,k) = A003215(k).
T(k+2,k) = A003215(k)/2 + A003215(k+1)/2.
T(k+3,k) = A003215(k)/3 + A003215(k+1)/3 + A003215(k+2)/3 and so on. (End)

A215630 Triangle read by rows: T(n,k) = n^2 - n*k + k^2, 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 11 2012

Keywords

Comments

T(n,k) = A093995(n,k) - A075362(n,k) + A133819(n,k) = 2*A070216(n,k) - A215631(n,k), 1 <= k <= n.

Examples

			The triangle begins:
.  1:     1
.  2:     3    4
.  3:     7    7    9
.  4:    13   12   13   16
.  5:    21   19   19   21   25
.  6:    31   28   27   28   31   36
.  7:    43   39   37   37   39   43   49
.  8:    57   52   49   48   49   52   57   64
.  9:    73   67   63   61   61   63   67   73   81
. 10:    91   84   79   76   75   76   79   84   91  100
. 11:   111  103   97   93   91   91   93   97  103  111  121
. 12:   133  124  117  112  109  108  109  112  117  124  133  144 .
		

Crossrefs

Cf. A004068 (row sums), A002061 (left edge), A000290 (right edge).
Cf. A003215 (central terms).

Programs

  • Haskell
    a215630 n k = a215630_tabl !! (n-1) !! (k-1)
    a215630_row n = a215630_tabl !! (n-1)
    a215630_tabl = zipWith3 (zipWith3 (\u v w -> u - v + w))
                            a093995_tabl a075362_tabl a133819_tabl

A124895 Triangle read by rows, 1 <= k <= n: T(n,k) = mu(n^2 + k^2) with mu = A008683.

Original entry on oeis.org

-1, -1, 0, 1, -1, 0, -1, 0, 0, 0, 1, -1, 1, -1, 0, -1, 0, 0, 0, -1, 0, 0, -1, 1, 1, 1, 1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, 0, -1, 0, 1, 0, 1, 0, 0, 0, -1, 0, -1, 0, 1, 0, 1, -1, 0, -1, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 12 2006

Keywords

Examples

			Triangle begins:
 -1
 -1,  0
  1, -1,  0
 -1,  0,  0,  0
  1, -1,  1, -1,  0
 -1,  0,  0,  0, -1, 0
  0, -1,  1,  1,  1, 1,  0
  1,  0, -1,  0, -1, 0, -1, 0
  1,  1,  0, -1,  1, 0, -1, 1,  0
 -1,  0, -1,  0,  0, 0, -1, 0, -1, 0
		

Crossrefs

Programs

  • Mathematica
    row[n_] := Table[MoebiusMu[n^2 + k^2], {k, 1, n}]; Array[row, 15] // Flatten (* Amiram Eldar, May 12 2025 *)
  • PARI
    row(n) = vector(n, k, moebius(n^2 + k^2)); \\ Amiram Eldar, May 12 2025

Formula

T(n,k) = A008683(A070216(n,k)).
T(n,1) = A124897(1); T(A049533(n),1) <> 0; T(A049532(n),1) = 0.
T(n,n) = -A000007(n-1).
A124896(n) = Sum_{k=1..n} abs(T(n,k)), row sums of absolute values.

A124896 Number of squarefree numbers of the form n^2 + k^2, 1<=k<=n.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 5, 4, 6, 4, 9, 3, 11, 6, 7, 7, 14, 5, 16, 8, 11, 8, 19, 7, 20, 11, 16, 12, 24, 8, 26, 15, 18, 15, 23, 11, 33, 16, 21, 15, 34, 10, 38, 19, 23, 20, 41, 15, 38, 19, 29, 22, 46, 15, 38, 22, 33, 26, 53, 15, 52, 26, 32, 30, 48, 18, 59, 30, 40, 22, 62, 21, 64, 32, 39, 34
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 12 2006

Keywords

Comments

a(n) = Sum(A008966(A070216(n,k)):1<=k<=n) = Sum(ABS(A124895(n,k)):1<=k<=n).
0 < a(n) <= n-1.

Crossrefs

Programs

A219054 (8*n^3 + 3*n^2 + n) / 6.

Original entry on oeis.org

2, 13, 41, 94, 180, 307, 483, 716, 1014, 1385, 1837, 2378, 3016, 3759, 4615, 5592, 6698, 7941, 9329, 10870, 12572, 14443, 16491, 18724, 21150, 23777, 26613, 29666, 32944, 36455, 40207, 44208, 48466, 52989, 57785, 62862, 68228, 73891, 79859, 86140, 92742
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 11 2012

Keywords

Comments

Row sums of the triangle in A070216.

Programs

Formula

a(n) = A000578(n) + A000330(n).
G.f. x*(2+5*x+x^2) / (x-1)^4 . - R. J. Mathar, Nov 12 2012

A294774 a(n) = 2*n^2 + 2*n + 5.

Original entry on oeis.org

5, 9, 17, 29, 45, 65, 89, 117, 149, 185, 225, 269, 317, 369, 425, 485, 549, 617, 689, 765, 845, 929, 1017, 1109, 1205, 1305, 1409, 1517, 1629, 1745, 1865, 1989, 2117, 2249, 2385, 2525, 2669, 2817, 2969, 3125, 3285, 3449, 3617, 3789, 3965, 4145, 4329, 4517, 4709, 4905
Offset: 0

Views

Author

Bruno Berselli, Nov 08 2017

Keywords

Comments

This is the case k = 9 of 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 (similar sequences are listed in Crossrefs section). Note that:
2*( 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 ) - k = ( 2*n + (1-(-1)^k)/2 )^2. From this follows an alternative definition for the sequence: Numbers h such that 2*h - 9 is a square. Therefore, if a(n) is a square then its base is a term of A075841.

Crossrefs

1st diagonal of A154631, 3rd diagonal of A055096, 4th diagonal of A070216.
Second column of Mathar's array in A016813 (Comments section).
Subsequence of A001481, A001983, A004766, A020668, A046711 and A057653 (because a(n) = (n+2)^2 + (n-1)^2); A097268 (because it is also a(n) = (n^2+n+3)^2 - (n^2+n+2)^2); A047270; A243182 (for y=1).
Similar sequences (see the first comment): A161532 (k=-14), A181510 (k=-13), A152811 (k=-12), A222182 (k=-11), A271625 (k=-10), A139570 (k=-9), (-1)*A147973 (k=-8), A059993 (k=-7), A268581 (k=-6), A090288 (k=-5), A054000 (k=-4), A142463 or A132209 (k=-3), A056220 (k=-2), A046092 (k=-1), A001105 (k=0), A001844 (k=1), A058331 (k=2), A051890 (k=3), A271624 (k=4), A097080 (k=5), A093328 (k=6), A271649 (k=7), A255843 (k=8), this sequence (k=9).

Programs

  • Maple
    seq(2*n^2 + 2*n + 5, n=0..100); # Robert Israel, Nov 10 2017
  • Mathematica
    Table[2n^2+2n+5,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{5,9,17},50] (* Harvey P. Dale, Sep 18 2023 *)
  • PARI
    Vec((5 - 6*x + 5*x^2) / (1 - x)^3 + O(x^50)) \\ Colin Barker, Nov 13 2017

Formula

O.g.f.: (5 - 6*x + 5*x^2)/(1 - x)^3.
E.g.f.: (5 + 4*x + 2*x^2)*exp(x).
a(n) = a(-1-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 5*A000217(n+1) - 6*A000217(n) + 5*A000217(n-1).
n*a(n) - Sum_{j=0..n-1} a(j) = A002492(n) for n>0.
a(n) = Integral_{x=0..2n+4} |3-x| dx. - Pedro Caceres, Dec 29 2020

A088307 Triangle, read by rows, T(n,k) = n^2 + k^2 if gcd(n,k)=1, otherwise 0.

Original entry on oeis.org

2, 5, 0, 10, 13, 0, 17, 0, 25, 0, 26, 29, 34, 41, 0, 37, 0, 0, 0, 61, 0, 50, 53, 58, 65, 74, 85, 0, 65, 0, 73, 0, 89, 0, 113, 0, 82, 85, 0, 97, 106, 0, 130, 145, 0, 101, 0, 109, 0, 0, 0, 149, 0, 181, 0, 122, 125, 130, 137, 146, 157, 170, 185, 202, 221, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 05 2003

Keywords

Comments

(n^2-k^2, 2*k*n, T(n,k)) is a primitive Pythagorean triple iff T(n,k) > 0.

Examples

			Triangle begins:
   2;
   5,  0;
  10, 13,  0;
  17,  0, 25,  0;
  26, 29, 34, 41,  0;
  37,  0,  0,  0, 61, 0;
  ...
		

Crossrefs

Programs

  • Magma
    function A088307(n,k)
      if GCD(k,n) eq 1 then return n^2+k^2;
      else return 0;
      end if; return A088307;
    end function;
    [A088307(n,k): k in [1..n], n in [1..13]]; // G. C. Greubel, Dec 16 2022
    
  • Mathematica
    Table[If[CoprimeQ[n,k],n^2+k^2,0],{n,20},{k,n}]//Flatten (* Harvey P. Dale, Jul 13 2018 *)
  • SageMath
    def A088307(n,k):
        if (gcd(n,k)==1): return n^2 + k^2
        else: return 0
    flatten([[A088307(n,k) for k in range(1,n+1)] for n in range(1,14)]) # G. C. Greubel, Dec 16 2022

Formula

T(n, n) = 2*A000007(n-1).
T(n, 1) = A002522(n).
T(2*n+1, 2) = A078370(n).
Sum_{k=1..n} A057427(T(n,m)) = A000010(n).
From G. C. Greubel, Dec 15 2022: (Start)
T(n, n-1) = A001844(n).
T(n, n-2) = ((1-(-1)^n)/2) * A008527((n+1)/2).
T(2*n, n) = 5*A000007(n-1).
T(2*n+1, n) = A079273(n+1).
T(2*n-1, n) = A190816(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = A053818(n+1) + [n=1]. (End)
Showing 1-9 of 9 results.