login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010679 Period 2: repeat (0,8). 1
0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

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

Index entries for linear recurrences with constant coefficients, signature (0,1).

FORMULA

a(n) = 4*(1-(-1)^n) = 8*(n mod 2). - Paolo P. Lava, Oct 20 2006

G.f.: 8*x/((1-x)*(1+x)). - R. J. Mathar, Nov 21 2011

a(n) = 3^(1-(-1)^n) - 1. - Bruno Berselli, Dec 29 2015

MATHEMATICA

PadRight[{}, 120, {0, 8}] (* Harvey P. Dale, Dec 21 2015 *)

PROG

(MAGMA) &cat [[0, 8]^^40]; // Bruno Berselli, Dec 29 2015

(PARI) a(n)=n%2*8 \\ Charles R Greathouse IV, Jul 26 2016

CROSSREFS

Cf. A010700: 3^(1-(-1)^n) + 1.

Sequence in context: A066606 A048729 A003131 * A186981 A156744 A228438

Adjacent sequences:  A010676 A010677 A010678 * A010680 A010681 A010682

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane.

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 02:56 EDT 2019. Contains 325290 sequences. (Running on oeis4.)