login
a(n+6) = -a(n+5) + a(n+4) + 3a(n+3) + a(n+2) - a(n+1) - a(n). a(n) = sign(n) if abs(n)<=3.
(Formerly M3730 N1525)
10

%I M3730 N1525 #83 Aug 07 2022 07:38:57

%S 0,1,1,1,5,1,7,8,5,19,11,23,35,27,64,61,85,137,133,229,275,344,529,

%T 599,875,1151,1431,2071,2560,3481,4697,5953,8245,10649,14111,19048,

%U 24605,33227,43739,57591,77275,101107,134848,178709,235405,314089,413909

%N a(n+6) = -a(n+5) + a(n+4) + 3a(n+3) + a(n+2) - a(n+1) - a(n). a(n) = sign(n) if abs(n)<=3.

%C It seems likely that this sequence contains infinitely many primes. In the paper by Einsiedler, Everest, Ward the heuristics for the Mersenne sequence are adapted to argue that approximately c*log(N) of the first N terms should be prime, where c is constant. Numerical evidence is provided to support this. - Graham Everest (g.everest(AT)uea.ac.uk), Mar 01 2001

%C For n>=4 a(n-4) is the resultant of the polynomials x^3-x-1 and x^(n+1)-x^n-1. For n=4 in fact the result is 0 as we see from the identity x^5-x^4-1=(x^3-x-1)(x^2-x+1). The characteristic polynomial of the sequence is x^6+x^5-x^4-3x^3-x^2+x+1 = (x^3-x-1)*(x^3+x^2-1). - _Richard Choulet_, Aug 14 2007

%C From _Peter Bala_, Sep 15 2019: (Start)

%C This is a linear divisibility sequence of order 6. It is a particular case of a family of divisibility sequences studied by Roettger et al. The o.g.f. has the form x*d/dx(f(x)/(x^3*f(1/x))) where f(x) = x^3 - x - 1.

%C More generally, if f(x) = 1 + P*x + Q*x^2 + x^3 or f(x) = -1 + P*x + Q*x^2 + x^3, where P and Q are integers, then the rational function x*d/dx(f(x)/(x^3*f(1/x))) is the generating function for a linear divisibility sequence of order 6. Cf. A001351. There are corresponding results when f(x) is a monic quartic polynomial with constant term 1. (End)

%C Resultant of the (s_3, s_3+n) pair where s_n(X) is X^n-X-1. See Rush link. - _Michel Marcus_, Sep 30 2019

%D G. Everest, T. Ward, Heights of Polynomials and Entropy in Algebraic Dynamics, Springer, London, 1999.

%D M. Hall, A slowly increasing arithmetic sequence, J. London Math. Soc., 8 (1933), 162-166.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A001945/b001945.txt">Table of n, a(n) for n = 0..1000</a>

%H Peter Bala, <a href="/A001351/a001351_1.pdf">Some linear divisibility sequences of order 6</a>

%H Manfred Einsiedler, Graham Everest and Thomas Ward, <a href="https://doi.org/10.1112/S1461157000000255">Primes in sequences associated to polynomials (after Lehmer)</a>, LMS J. Comput. Math. 3 (2000), 125-139.

%H G. Everest, A. J. van der Poorten, Y. Puri and T. Ward, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL5/Ward/ward2.html">Integer Sequences and Periodic Points</a>, Journal of Integer Sequences, Vol. 5 (2002), Article 02.2.3.

%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.

%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992

%H Y. Puri and T. Ward, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/WARD/short.html">Arithmetic and growth of periodic orbits</a>, J. Integer Seqs., Vol. 4 (2001), #01.2.1.

%H E. L. Roettger, H. C. Williams, R. K. Guy, <a href="https://carma.newcastle.edu.au/meetings/alfcon/pdfs/Hugh_Williams-alfcon.pdf">Some extensions of the Lucas functions</a>, Number Theory and Related Fields: In Memory of Alf van der Poorten, Series: Springer Proceedings in Mathematics & Statistics, Vol. 43, J. Borwein, I. Shparlinski, W. Zudilin (Eds.) 2013.

%H David E. Rush, <a href="https://www.fq.math.ca/Papers1/50-4/Rush.pdf">Degree n Relatives of the Golden Ratio and Resultants of the Corresponding Polynomials</a>, Fib. Q. 50(4), 2012, 313-325. See p. 319.

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (-1,1,3,1,-1,-1).

%F G.f.: (x^5+2x^4+x^3+2x^2+x)/(x^6+x^5-x^4-3x^3-x^2+x+1). - _Ralf Stephan_, Dec 15 2002

%F a(n) ~ r1^n-2*real(r2^n), with r1=1.324717957 the inverse real root of x^3+x^2-1=0 and r2=(0.87744+0.7448617i) one inverse complex root of x^3-x-1=0. With n>9, a(n) = round(r1^n-2*real(r2^n)). - _Ralf Stephan_, Dec 17 2002

%F a(n) = A001608(n) + A078712(n). - _Ralf Stephan_, Dec 27 2002

%F a(A104499(n+1)) = A204138(n). - _Reinhard Zumkeller_, Jan 11 2012

%F a(-n) = -a(n). - _Michael Somos_, Apr 25 2014

%F a(n) = (alpha^n - 1)*(beta^n - 1)*(gamma^n - 1) where alpha, beta and gamma are the zeros of x^3 - x - 1. - _Peter Bala_, Sep 15 2019

%e G.f. = x + x^2 + x^3 + 5*x^4 + x^5 + 7*x^6 + 8*x^7 + 5*x^8 + 19*x^9 + ...

%p A001945:=z*(1+2*z+z**2+2*z**3+z**4)/(z**3-z-1)/(z**3+z**2-1); # conjectured by _Simon Plouffe_ in his 1992 dissertation

%t a[0] = 0; a[1] = a[2] = a[3] = a[5] = 1; a[4] = 5; a[n_] := a[n] = -a[n - 1] + a[n - 2] + 3a[n - 3] + a[n - 4] - a[n - 5] - a[n - 6]; Table[ a[n], {n, 0, 46}] (* _Robert G. Wilson v_, Mar 10 2005 *)

%t LinearRecurrence[{-1, 1, 3, 1, -1, -1}, {0, 1, 1, 1, 5, 1}, 50] (* _T. D. Noe_, Jan 11 2012 *)

%t a[ n_] := Sign[n] SeriesCoefficient[ x * (1 + 2 x + x^2 + 2 x^3 + x^4) / (1 + x - x^2 - 3 x^3 - x^4 + x^5 + x^6), {x, 0, Abs @ n}]; (* _Michael Somos_, Apr 25 2014 *)

%o (Haskell)

%o import Data.List (zipWith6)

%o a001945 n = a001945_list !! n

%o a001945_list = 0 : 1 : 1 : 1 : 5 : 1 : zipWith6

%o (\u v w x y z -> - u + v + 3*w + x - y - z)

%o (drop 5 a001945_list) (drop 4 a001945_list) (drop 3 a001945_list)

%o (drop 2 a001945_list) (drop 1 a001945_list) (drop 0 a001945_list)

%o -- _Reinhard Zumkeller_, Jan 11 2012

%o (PARI) {a(n) = sign(n) * polcoeff( x * (1 + 2*x + x^2 + 2*x^3 + x^4) / (1 + x - x^2 - 3*x^3 - x^4 + x^5 + x^6) + x * O(x^abs(n)), abs(n))}; /* _Michael Somos_, Apr 25 2014 */

%o (PARI) a(n)=([0,1,0,0,0,0; 0,0,1,0,0,0; 0,0,0,1,0,0; 0,0,0,0,1,0; 0,0,0,0,0,1; -1,-1,1,3,1,-1]^n*[0;1;1;1;5;1])[1,1] \\ _Charles R Greathouse IV_, Jul 19 2016

%o (PARI) L3(n) = polsym(x^3-x-1, n)[n+1]; \\ A001608

%o a(n) = my(L3n=L3(n)); L3n - matdet([L3n, L3(2*n);1, L3n])/2; \\ _Michel Marcus_, Sep 30 2019

%Y Cf. A001608, A078712, A104499, A001351.

%K nonn,nice,easy

%O 0,5

%A _N. J. A. Sloane_

%E More terms from _James A. Sellers_, Dec 23 1999