Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #51 Mar 02 2024 01:27:13
%S 5,-24,-12,-6,-3,16,8,4,2,1,-4,-2,-1,6,3,-14,-7,36,18,9,-44,-22,-11,
%T 56,28,14,7,-34,-17,86,43,-214,-107,536,268,134,67,-334,-167,836,418,
%U 209,-1044,-522,-261,1306,653,-3264,-1632,-816,-408,-204,-102,-51,256,128,64,32,16,8,4,2,1,-4
%N -5x + 1 sequence starting at 5.
%F a(0) = 5, a(n) = (-5)*a(n - 1) + 1 if a(n - 1) is odd, a(n) = a(n - 1)/2 otherwise.
%e 5 is odd, so it's followed by (-5) * 5 + 1 = -25 + 1 = -24.
%e -14 is even, so it's followed by -14/2 = -7.
%t NestList[If[EvenQ[#], #/2, -5# + 1] &, 5, 100]
%o (Magma) [n eq 1 select 5 else IsOdd(Self(n-1)) select -5*Self(n-1)+1 else Self(n-1) div 2: n in [1..80]]; // _Vincenzo Librandi_, Jun 11 2018
%Y Cf. A259207.
%K sign,easy
%O 0,1
%A _Alonso del Arte_, May 26 2018