login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008865 a(n) = n^2 - 2. 44
-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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

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 = .414213... Then a(n) = (n + 1 + 1/C) * (n + 1 - C). Example: a(6) = 34 = (7 + .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 2n^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

LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000

Anant Godbole and Martha Liendo, Waiting time distribution for the emergence of superpatterns, arxiv 1302.4668

Eric Weisstein's World of Mathematics, Near-Square Prime

Index entries for linear recurrences with constant coefficients, signature (3,-3,1).

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

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 (with 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

EXAMPLE

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 + ...

MAPLE

with(combinat, fibonacci):seq(fibonacci(3, i)-3, i=1..47); # Zerinvary Lajos, Mar 20 2008

a:=n->sum(k-1, k=0..n):seq(a(n)+sum(k, k=2..n), n=1..54); # Zerinvary Lajos, Jun 10 2008

seq(floor(n^5/(n^3+n+1)), n=2..25); # Gary Detlefs, Feb 10 2010

MATHEMATICA

Range[50]^2-2  (* Harvey P. Dale, Mar 14 2011 *)

PROG

(Sage) [lucas_number1(3, n, 2) for n in xrange(1, 43)] # Zerinvary Lajos, Jul 03 2008

(PARI) {for(n=1, 47, print1(n^2-2, ", "))} \\ Klaus Brockhaus, Oct 17 2008

(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

CROSSREFS

Cf. A145067 (Zero followed by partial sums of A008865).

Cf. A000027, A013648.

Cf. A028871 (primes).

Cf. A263766 (partial products).

Cf. A270109. [From Bruno Berselli, Mar 17 2016]

Sequence in context: A114346 A087324 A261246 * A227582 A249852 A018392

Adjacent sequences:  A008862 A008863 A008864 * A008866 A008867 A008868

KEYWORD

sign,easy

AUTHOR

N. J. A. Sloane, R. K. Guy

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 22 19:30 EDT 2017. Contains 286884 sequences.