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!)
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
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
(Python)
def A253513(n): return int(not(n&7)) # Chai Wah Wu, Jul 09 2022
CROSSREFS
Cf. A008590 (multiples of 8), A010877, A014025, A168181, A244413.
Sequence in context: A052434 A369034 A015241 * A014025 A279760 A287457
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:38 EDT 2024. Contains 371794 sequences. (Running on oeis4.)