login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112455 a(n) = -a(n-2) - a(n-3). 5

%I #30 Feb 18 2024 10:20:40

%S -3,0,2,3,-2,-5,-1,7,6,-6,-13,0,19,13,-19,-32,6,51,26,-57,-77,31,134,

%T 46,-165,-180,119,345,61,-464,-406,403,870,3,-1273,-873,1270,2146,

%U -397,-3416,-1749,3813,5165,-2064,-8978,-3101,11042,12079,-7941

%N a(n) = -a(n-2) - a(n-3).

%C This sequence resembles the Perrin sequence, A001608. Like many such sequences with a(1)=0, any prime p divides a(p). The first pseudoprime (composite n divides a(n)) is 121.

%H G. C. Greubel, <a href="/A112455/b112455.txt">Table of n, a(n) for n = 0..5000</a>

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

%F a(n) = - trace({{0, 0, -1}, {1, 0, -1}, {0, 1, 0}})^n. - _Artur Jasinski_, Jan 10 2007

%F From _R. J. Mathar_, Oct 24 2009: (Start)

%F G.f.: -(3+x^2)/(1+x^2+x^3).

%F a(n) = -3*A077962(n) - A077962(n-2). (End)

%F a(n) = (-1)^(n+1)*(A001609(n)^2 - A001609(2*n))/2. - _Greg Dresden_, Apr 14 2023

%p A112455 := proc(n)

%p option remember ;

%p if n <= 2 then

%p op(n+1,[-3,0,2]) ;

%p else

%p -procname(n-2)-procname(n-3) ;

%p end if;

%p end proc: # _R. J. Mathar_, Feb 18 2024

%t Table[ -Tr[MatrixPower[{{0, 0, -1}, {1, 0, -1}, {0, 1, 0}}, n]], {n, 1, 60}] (* _Artur Jasinski_, Jan 10 2007 *)

%t LinearRecurrence[{0,-1,-1}, {-3,0,2}, 60] (* _G. C. Greubel_, May 19 2019 *)

%o (PARI) Vec(-(3+x^2)/(1+x^2+x^3)+O(x^60)) \\ _Charles R Greathouse IV_, May 15 2013

%o (Magma) I:=[-3,0,2]; [n le 3 select I[n] else -Self(n-2) -Self(n-3): n in [1..60]]; // _G. C. Greubel_, May 19 2019

%o (Sage) (-(3+x^2)/(1+x^2+x^3)).series(x, 60).coefficients(x, sparse=False) # _G. C. Greubel_, May 19 2019

%o (GAP) a:=[-3,0,2];; for n in [4..60] do a[n]:=-a[n-2]-a[n-3]; od; a; # _G. C. Greubel_, May 19 2019

%Y Cf. A001608, A112458.

%K sign,easy

%O 0,1

%A _Anthony C Robin_, Dec 13 2005

%E Edited by _Don Reble_, Jan 25 2006

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 15:16 EDT 2024. Contains 371780 sequences. (Running on oeis4.)