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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A253513 The characteristic function of the multiples of eight. 4
1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Period 8: repeat [1, 0, 0, 0, 0, 0, 0, 0].

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..16384

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

FORMULA

a(n) = floor(n/8) - floor((n-1)/8).

a(n) = sin((sin(Pi*(n+1)/2)^2)*Pi*(n+2)/4)/2 + (sin(Pi*(n+1)/2)^2)/4 + sin(Pi*(n+1)/2)/4.

a(n) = abs(A014025(n)).

From Alois P. Heinz, Jan 03 2015: (Start)

a(n) = 1 - A168181(n).

G.f.: 1/(1-x^8). (End)

MATHEMATICA

Table[Boole[IntegerQ[n/8]], {n, 0, 127}] (* Michael De Vlieger, Jan 03 2015, after Alonso del Arte at A121262 *)

LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 0, 0, 0}, 120] (* or *) PadRight[ {}, 120, {1, 0, 0, 0, 0, 0, 0, 0}] (* Harvey P. Dale, Apr 07 2017 *)

Array[ Boole[ Mod[#, 8] == 0] &, 105, 0] (* Robert G. Wilson v, Oct 08 2017 *)

PROG

(PARI) A253513(n) = !(n%8); \\ Antti Karttunen, Oct 08 2017

CROSSREFS

Cf. A008590 (multiples of 8), A010877, A014025, A168181, A244413.

Sequence in context: A104124 A052434 A015241 * A014025 A285898 A156297

Adjacent sequences:  A253510 A253511 A253512 * A253514 A253515 A253516

KEYWORD

nonn,easy

AUTHOR

Mikael Aaltonen, Jan 03 2015

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 21 06:38 EST 2018. Contains 299390 sequences. (Running on oeis4.)