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!)
A305057 -5x + 1 sequence starting at 5. 0
5, -24, -12, -6, -3, 16, 8, 4, 2, 1, -4, -2, -1, 6, 3, -14, -7, 36, 18, 9, -44, -22, -11, 56, 28, 14, 7, -34, -17, 86, 43, -214, -107, 536, 268, 134, 67, -334, -167, 836, 418, 209, -1044, -522, -261, 1306, 653, -3264, -1632, -816, -408, -204, -102, -51, 256, 128, 64, 32, 16, 8, 4, 2, 1, -4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(0) = 5, a(n) = (-5)*a(n - 1) + 1 if a(n - 1) is odd, a(n) = a(n - 1)/2 otherwise.
EXAMPLE
5 is odd, so it's followed by (-5) * 5 + 1 = -25 + 1 = -24.
-14 is even, so it's followed by -14/2 = -7.
MATHEMATICA
NestList[If[EvenQ[#], #/2, -5# + 1] &, 5, 100]
PROG
(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
CROSSREFS
Cf. A259207.
Sequence in context: A110720 A200822 A112613 * A333633 A222355 A335352
KEYWORD
sign,easy
AUTHOR
Alonso del Arte, May 26 2018
STATUS
approved

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 25 09:24 EDT 2024. Contains 371967 sequences. (Running on oeis4.)