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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097325 Period 6: repeat [0, 1, 1, 1, 1, 1]. 19
0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

a(n) is 0 if 6 divides n, 1 otherwise.

LINKS

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

Index entries for characteristic functions

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

FORMULA

G.f.: 1/(1-x) - 1/(1-x^6) = Sum_{k>=0} x^k - x^(6*k).

Recurrence: a(n+6) = a(n), a(0) = 0, a(i) = 1, 1 <= i <= 5.

a(n) = (1/4) * (3 - (-1)^n - (-1)^((n+1)/3) - (-1)^((2n+1)/3)).

a(n) = (((1/3)*(cos(2*n*Pi/3) + 1/2)*(1 + (-1)^n)) - 1)^2. - Paolo P. Lava, Oct 09 2006

From Reinhard Zumkeller, Nov 30 2009: (Start)

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

a(A047253(n)) = 1, a(A008588(n)) = 0.

A033438(n) = Sum_{k=0..n} a(k)*(n-k). (End)

Dirichlet g.f.: (1 - 1/6^s)*zeta(s). - R. J. Mathar, Feb 19 2011

For the general case: the characteristic function of numbers that are not multiples of m is a(n) = floor((n-1)/m) - floor(n/m) + 1, m, n > 0. - Boris Putievskiy, May 08 2013

a(n) = sign(n mod 6). - Wesley Ivan Hurt, Jun 29 2013

a(n) = ceiling(5n/6) - floor(5n/6). - Wesley Ivan Hurt, Jun 20 2014

MAPLE

seq(signum(k mod 6), k=0..100); # Wesley Ivan Hurt, Jun 29 2013

MATHEMATICA

Table[Boole[Not[Divisible[n, 6]]], {n, 0, 89}] (* Alonso del Arte, Oct 21 2013 *)

PadRight[{}, 120, {0, 1, 1, 1, 1, 1}] (* Michael De Vlieger, Dec 22 2017 *)

PROG

(PARI) a(n) = sign(n%6);

(MAGMA) [Sign(n mod 6) : n in [0..50]]; // Wesley Ivan Hurt, Jun 20 2014

(Scheme) (define (A097325 n) (if (zero? (modulo n 6)) 0 1)) ;; Antti Karttunen, Dec 22 2017

CROSSREFS

Characteristic sequence of A047253.

Binary complement of A079979.

Cf. A010875, A168185, A145568, A168184, A168182, A168181, A109720, A011558, A166486, A011655, A000035.

Sequence in context: A112713 A143536 A080110 * A167393 A106549 A075897

Adjacent sequences:  A097322 A097323 A097324 * A097326 A097327 A097328

KEYWORD

nonn,easy

AUTHOR

Ralf Stephan, Aug 16 2004

EXTENSIONS

New name from Omar E. Pol, Oct 21 2013

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 November 12 22:01 EST 2018. Contains 317116 sequences. (Running on oeis4.)