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!)
A097325 Period 6: repeat [0, 1, 1, 1, 1, 1]. 19

%I #58 Dec 14 2023 05:16:39

%S 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,

%T 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,

%U 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

%N Period 6: repeat [0, 1, 1, 1, 1, 1].

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

%H Antti Karttunen, <a href="/A097325/b097325.txt">Table of n, a(n) for n = 0..26244</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1).

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

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

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

%F From _Reinhard Zumkeller_, Nov 30 2009: (Start)

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

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

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

%F Dirichlet g.f.: (1 - 1/6^s)*zeta(s). - _R. J. Mathar_, Feb 19 2011

%F 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

%F a(n) = sign(n mod 6). - _Wesley Ivan Hurt_, Jun 29 2013

%F a(n) = ceiling(5n/6) - floor(5n/6). - _Wesley Ivan Hurt_, Jun 20 2014

%p seq(signum(k mod 6), k=0..100); # _Wesley Ivan Hurt_, Jun 29 2013

%t Table[Boole[Not[Divisible[n, 6]]], {n, 0, 89}] (* _Alonso del Arte_, Oct 21 2013 *)

%t PadRight[{}, 120, {0, 1, 1, 1, 1, 1}] (* _Michael De Vlieger_, Dec 22 2017 *)

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

%o (Magma) [Sign(n mod 6) : n in [0..50]]; // _Wesley Ivan Hurt_, Jun 20 2014

%o (Scheme) (define (A097325 n) (if (zero? (modulo n 6)) 0 1)) ;; _Antti Karttunen_, Dec 22 2017

%Y Characteristic sequence of A047253.

%Y Binary complement of A079979.

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

%K nonn,easy

%O 0,1

%A _Ralf Stephan_, Aug 16 2004

%E New name from _Omar E. Pol_, Oct 21 2013

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 08:08 EDT 2024. Contains 371782 sequences. (Running on oeis4.)