OFFSET
1,1
COMMENTS
Numbers n such that the polynomial x^4 - n*x^2 + 1 is reducible.
The corresponding factorizations are (x^2 + k*x - 1)*(x^2 - k*x - 1) == x^4 - (k^2 + 2)*x^2 + 1 and (x^2 + k*x + 1)*(x^2 - k*x + 1) == x^4 - (k^2 - 2)*x^2 + 1. - Joerg Arndt, Feb 07 2015
For k > 1: a(2*k+1) - a(2*k) = 4 and a(2*k) - a(2*k-1) = k - 1; for n > 4: a(n) - a(n-2) = 2*floor(n/2) + 1 = A109613(n). - Reinhard Zumkeller, Feb 10 2015
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
From Colin Barker, Oct 24 2013: (Start)
a(n) = (5-13*(-1)^n+2*(3+(-1)^n)*n+2*n^2)/8 for n>2.
a(n) = (n^2+4*n-4)/4 for n>2 and even.
a(n) = (n^2+2*n+9)/4 for n>2 and odd.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5) for n>7.
G.f.: x*(x^6-2*x^5+x^3+x^2-x-2) / ((x-1)^3*(x+1)^2). (End)
After the first two terms 0^2+2 = 2^2-2, 1^2+2, the squares are sufficiently spaced to ensure that the sequence continues 2^2+2, 3^2-2, 3^2+2, 4^2-2, 4^2+2,..., i.e., a(2n-1) = n^2+2, a(2n)=(n+1)^2-2. - M. F. Hasler, Oct 26 2013
PROG
(PARI) is(n)=issquare(n-2)||issquare(n+2)
(PARI) A230584_vec(N)=Vec((2+x-x^2-x^3+2*x^5-x^6)/((1-x)^3*(1+x)^2)+O(x^N)) \\ M. F. Hasler, Oct 26 2013
(Haskell)
import Data.List (transpose)
a230584 n = a230584_list !! (n-1)
a230584_list = 2 : 3 : concat
(transpose [drop 2 a059100_list, drop 2 a008865_list])
-- Reinhard Zumkeller, Feb 10 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Oct 24 2013
STATUS
approved