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

A008865 a(n) = n^2 - 2.

Original entry on oeis.org

-1, 2, 7, 14, 23, 34, 47, 62, 79, 98, 119, 142, 167, 194, 223, 254, 287, 322, 359, 398, 439, 482, 527, 574, 623, 674, 727, 782, 839, 898, 959, 1022, 1087, 1154, 1223, 1294, 1367, 1442, 1519, 1598, 1679, 1762, 1847, 1934, 2023, 2114, 2207, 2302, 2399, 2498
Offset: 1

Views

Author

Keywords

Comments

For n >= 2, least m >= 1 such that f(m, n) = 0 where f(m,n) = Sum_{i=0..m} Sum_{k= 0..i} (-1)^k*(floor(i/n^k) - n*floor(i/n^(k+1))). - Benoit Cloitre, May 02 2004
For n >= 3, the a(n)-th row of Pascal's triangle always contains a triple forming an arithmetic progression. - Lekraj Beedassy, Jun 03 2004
Let C = 1 + sqrt(2) = 2.414213...; and 1/C = 0.414213... Then a(n) = (n + 1 + 1/C) * (n + 1 - C). Example: a(6) = 34 = (7 + 0.414...) * (7 - 2.414...). - Gary W. Adamson, Jul 29 2009
The sequence (n-4)^2-2, n = 7, 8, ... enumerates the number of non-isomorphic sequences of length n, with entries from {1, 2, 3} and no two adjacent entries the same, that minimally contain each of the thirteen rankings of three players (111, 121, 112, 211, 122, 212, 221, 123, 132, 213, 231, 312, 321) as embedded order isomorphic subsequences. By "minimally", we mean that the n-th symbol is necessary for complete inclusion of all thirteen words. See the arXiv paper below for proof. If n = 7, these sequences are 1213121, 1213212, 1231213, 1231231, 1231321, 1232123, and 1232132, and for each case, there are 3! = 6 isomorphs. - Anant Godbole, Feb 20 2013
a(n), n >= 0, with a(0) = -2, gives the values for a*c of indefinite binary quadratic forms [a, b, c] of discriminant D = 8 for b = 2*n. In general D = b^2 - 4*a*c > 0 and the form [a, b, c] is a*x^2 + b*x*y + c*y^2. - Wolfdieter Lang, Aug 15 2013
With a different offset, this is 2*n^2 - (n + 1)^2, which arises in one explanation of why Bertrand's postulate does not automatically prove Legendre's conjecture: as n gets larger, so does the range of numbers that can have primes that satisfy Bertrand's postulate yet do nothing for Legendre's conjecture. - Alonso del Arte, Nov 06 2013
x*(x + r*y)^2 + y*(y + r*x)^2 can be written as (x + y)*(x^2 + s*x*y + y^2). For r >= 0, the sequence gives the values of s: in fact, s = (r + 1)^2 - 2. - Bruno Berselli, Feb 20 2019
For n >= 2, the continued fraction expansion of sqrt(a(n)) is [n-1; {1, n-2, 1, 2n-2}]. For n=2, this collapses to [1; {2}]. - Magus K. Chu, Sep 06 2022

Examples

			G.f. = -x + 2*x^2 + 7*x^3 + 14*x^4 + 23*x^5 + 34*x^6 + 47*x^7 + 62*x^8 + 79*x^9 + ...
		

Crossrefs

Cf. A145067 (Zero followed by partial sums of A008865).
Cf. A028871 (primes).
Cf. A263766 (partial products).
Cf. A270109. [Bruno Berselli, Mar 17 2016]

Programs

  • Haskell
    a008865 = (subtract 2) . (^ 2) :: Integral t => t -> t
    a008865_list = scanl (+) (-1) [3, 5 ..]
    -- Reinhard Zumkeller, May 06 2013
    
  • Magma
    [n^2 - 2: n in [1..60]]; // Vincenzo Librandi, May 01 2014
  • Mathematica
    Range[50]^2 - 2 (* Harvey P. Dale, Mar 14 2011 *)
  • PARI
    {for(n=1, 47, print1(n^2-2, ","))} \\ Klaus Brockhaus, Oct 17 2008
    

Formula

For n > 1: a(n) = A143053(A000290(n)), A143054(a(n)) = A000290(n). - Reinhard Zumkeller, Jul 20 2008
G.f.: (x-5*x^2+2*x^3)/(-1+3*x-3*x^2+x^3). - Klaus Brockhaus, Oct 17 2008
E.g.f.: (x^2 + x -2)*exp(x) + 2. - G. C. Greubel, Aug 19 2017
a(n+1) = A101986(n) - A101986(n-1) = A160805(n) - A160805(n-1). - Reinhard Zumkeller, May 26 2009
For n > 1, a(n) = floor(n^5/(n^3 + n + 1)). - Gary Detlefs, Feb 10 2010
a(n) = a(n-1) + 2*n - 1 for n > 1, a(1) = -1. - Vincenzo Librandi, Nov 18 2010
Right edge of the triangle in A195437: a(n) = A195437(n-2, n-2). - Reinhard Zumkeller, Nov 23 2011
a(n)*a(n-1) + 2 = (a(n) - n)^2 = A028552(n-2)^2. - Bruno Berselli, Dec 07 2011
a(n+1) = A000096(n) + A000096(n-1) for all n in Z. - Michael Somos, Nov 11 2015
From Amiram Eldar, Jul 13 2020: (Start)
Sum_{n>=1} 1/a(n) = (1 - sqrt(2)*Pi*cot(sqrt(2)*Pi))/4.
Sum_{n>=1} (-1)^n/a(n) = (1 - sqrt(2)*Pi*cosec(sqrt(2)*Pi))/4. (End)
Assume offset 0. Then a(n) = 2*LaguerreL(2, 1 - n). - Peter Luschny, May 09 2021
From Amiram Eldar, Feb 05 2024: (Start)
Product_{n>=1} (1 - 1/a(n)) = sqrt(2/3)*sin(sqrt(3)*Pi)/sin(sqrt(2)*Pi).
Product_{n>=2} (1 + 1/a(n)) = -Pi/(sqrt(2)*sin(sqrt(2)*Pi)). (End)

A130883 a(n) = 2*n^2 - n + 1.

Original entry on oeis.org

1, 2, 7, 16, 29, 46, 67, 92, 121, 154, 191, 232, 277, 326, 379, 436, 497, 562, 631, 704, 781, 862, 947, 1036, 1129, 1226, 1327, 1432, 1541, 1654, 1771, 1892, 2017, 2146, 2279, 2416, 2557, 2702, 2851, 3004, 3161, 3322, 3487, 3656, 3829, 4006, 4187, 4372, 4561
Offset: 0

Views

Author

Mohammad K. Azarian, Jul 26 2007

Keywords

Comments

Maximum number of regions determined by n bent lines (or angular sectors). See Concrete Mathematics reference.
A "bent line" may also be regarded as a "long-legged letter V", meaning a letter V with both line segments extended to infinity. See A117625 for the analogous sequence for a long-legged Z. - N. J. A. Sloane, Jun 18 2025
a(n)*Pi is the total length of half circle spiral after n rotations. It is formed as irregular spiral with two center points. At the 2nd stage, there are two alternatives: (1) select 2nd half circle radius, r2 = 2, the sequence will be A014105 or (2) select r2 = 0, the sequence will be A130883. See illustration in links. - Kival Ngaokrajang, Jan 19 2014
A128218(a(n)) = 2*n+1 and A128218(m) != 2*n+1 for m < a(n). - Reinhard Zumkeller, Jun 20 2015

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, Reading, MA, 1994, pp. 7-8, and Problem 1.18, pages 19 and 500.

Crossrefs

See also A117625.
A row of the array in A386478.

Programs

Formula

a(n) = a(n-1) + 4*n - 3 for n > 0, a(0)=1. - Vincenzo Librandi, Nov 23 2010
a(n) = A000124(2*n) - 2*n. - Geoffrey Critzer, Mar 30 2011
O.g.f.: (4*x^2-x+1)/(1-x)^3. - Geoffrey Critzer, Mar 30 2011
a(n) = 2*a(n-1) - a(n-2) + 4. - Eric Werley, Jun 27 2011
a(0)=1, a(1)=2, a(2)=7; for n > 2, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Jul 20 2011
a(n) = A128918(2*n). - Reinhard Zumkeller, Oct 27 2013
a(n) = 1 + A000384(n). - Omar E. Pol, Apr 27 2017
E.g.f.: (2*x^2 + x + 1)*exp(x). - G. C. Greubel, Jul 14 2017
a(n) = A152947(2*n+1). - Franck Maminirina Ramaharo, Jan 10 2018

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

Original entry on oeis.org

0, 3, 14, 39, 84, 155, 258, 399, 584, 819, 1110, 1463, 1884, 2379, 2954, 3615, 4368, 5219, 6174, 7239, 8420, 9723, 11154, 12719, 14424, 16275, 18278, 20439, 22764, 25259, 27930, 30783, 33824, 37059, 40494, 44135, 47988, 52059, 56354, 60879, 65640, 70643, 75894
Offset: 0

Views

Author

Patrick De Geest and Mark Milhet (mm992395(AT)shellus.com)

Keywords

Comments

For n>1, a(n) is the volume of a truncated square pyramid with height n and base lengths n+2 and n-1. - Wesley Ivan Hurt, Apr 05 2016

Examples

			For n = 4, 4^3 + 4^2 + 4 = 64 + 16 + 4 = 84.
		

Crossrefs

Column k=3 of A228275.
Cf. A270109.

Programs

Formula

O.g.f.: x*(3 + 2*x + x^2)/(1 - x)^4. - R. J. Mathar, Feb 04 2008
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>3. - Wesley Ivan Hurt, Apr 05 2016

A270867 a(n) = n^3 + 2*n^2 + 4*n + 1.

Original entry on oeis.org

1, 8, 25, 58, 113, 196, 313, 470, 673, 928, 1241, 1618, 2065, 2588, 3193, 3886, 4673, 5560, 6553, 7658, 8881, 10228, 11705, 13318, 15073, 16976, 19033, 21250, 23633, 26188, 28921, 31838, 34945, 38248, 41753, 45466, 49393, 53540, 57913, 62518, 67361, 72448
Offset: 0

Views

Author

Vincenzo Librandi, Apr 01 2016

Keywords

Comments

Numbers of the type (m+1)^3 - (m-1)*m. Similar sequences are: A069778 with the closed form (m+1)^3 - m*(m+1), A152015 with (m+1)^3 - (m+1)*(m+2).

Crossrefs

Programs

  • Magma
    [n^3+2*n^2+4*n+1: n in [0..50]];
    
  • Maple
    A270867:=n->n^3+2*n^2+4*n+1: seq(A270867(n), n=0..100); # Wesley Ivan Hurt, Apr 01 2016
  • Mathematica
    Table[n^3 + 2 n^2 + 4 n + 1, {n, 0, 40}]
  • PARI
    x='x+O('x^99); Vec((1+4*x-x^2+2*x^3)/(1-x)^4) \\ Altug Alkan, Apr 01 2016
    
  • Python
    for i in range(0,100):print(i**3+2*i**2+4*i+1) # Soumil Mandal, Apr 02 2016

Formula

O.g.f.: (1 + 4*x - x^2 + 2*x^3)/(1 - x)^4.
E.g.f.: (1 + 7*x + 5*x^2 + x^3)*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = -A270109(-n-1). - Bruno Berselli, Apr 01 2016
a(n+2) - 2*a(n+1) + a(n) = A016957(n+1). - Wesley Ivan Hurt, Apr 02 2016

A085490 Number of pairs with two different elements which can be obtained by selecting unique elements from two sets with n+1 and n^2 elements respectively and n common elements.

Original entry on oeis.org

0, 1, 10, 33, 76, 145, 246, 385, 568, 801, 1090, 1441, 1860, 2353, 2926, 3585, 4336, 5185, 6138, 7201, 8380, 9681, 11110, 12673, 14376, 16225, 18226, 20385, 22708, 25201, 27870, 30721, 33760, 36993, 40426, 44065, 47916, 51985, 56278, 60801, 65560, 70561, 75810, 81313
Offset: 0

Views

Author

Polina S. Dolmatova (polinasport(AT)mail.ru), Aug 15 2003

Keywords

Examples

			a(2) = 10 because we can write a(2) = 2^3 + 2^2 - 2 = 10.
		

Crossrefs

Cf. A270109.

Programs

  • Magma
    [n^3+n^2-n: n in [0..50]]; // Vincenzo Librandi, Jun 22 2017
  • Maple
    a:=n->sum(n*k, k=0..n):seq(a(n)+sum(n*k, k=2..n), n=0..30); # Zerinvary Lajos, Jun 10 2008
    a:=n->sum(-2+sum(2+sum(2, j=1..n),j=1..n),j=1..n):seq(a(n)/2,n=0..40);# Zerinvary Lajos, Dec 06 2008
    seq(n^3+n^2-n, n=0..100); # Robert Israel, Dec 05 2014
  • Mathematica
    LinearRecurrence[{4, -6, 4, -1}, {0, 1, 10, 33}, 60] (* Vincenzo Librandi, Jun 22 2017 *)

Formula

a(n) = n^3 + n^2 - n = n*A028387(n-1).
a(n) = A081437(n-1), n>0. - R. J. Mathar, Sep 12 2008
G.f.: x*(1+6*x-x^2)/(1-x)^4. - Robert Israel, Dec 05 2014
E.g.f.: x*(1+4*x+x^2)*exp(x). - Robert Israel, Dec 05 2014
For q a prime power, a(q) is the number of pairs of commuting nilpotent 2*2 matrices with coefficients in GL(q). (Proof: the zero matrix commutes with all q^2 nilpotent matrices, each of the remaining q^2-1 nilpotent matrices commutes with exactly q nilpotent matrices.) - Mark Wildon, Jun 18 2017
Showing 1-5 of 5 results.