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

Table of n, a(n) for n=0..63.

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.

MAPLE

P:=proc(q) local a, n; a:=[5]; for n from 1 to q do

if a[nops(a)] mod 2=1 then a:=[op(a), -5*a[nops(a)]+1] else a:=[op(a), a[nops(a)]/2]; fi; od;

op(a); end: P(63); # Paolo P. Lava, Jun 11 2018

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

Adjacent sequences:  A305054 A305055 A305056 * A305058 A305059 A305060

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 August 13 10:40 EDT 2022. Contains 356080 sequences. (Running on oeis4.)