A079979 Characteristic function of multiples of six.
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
Offset: 0
References
- D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65538
- Vladimir Baltic, On the number of certain types of strongly restricted permutations, Applicable Analysis and Discrete Mathematics Vol. 4, No 1 (April, 2010), 119-135
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
- Index entries for characteristic functions
Crossrefs
Programs
-
Magma
&cat[[1,0^^5]^^30];
-
Magma
A079979 := func
; [A079979:n in [0..59]]; // Jason Kimberley, Oct 10 2011 -
Mathematica
PadRight[{},120,{1,0,0,0,0,0}] (* Harvey P. Dale, Feb 19 2013 *)
-
PARI
a(n)=!(n%6) \\ Charles R Greathouse IV, Oct 10 2011
-
Scheme
(define (A079979 n) (if (zero? (modulo n 6)) 1 0)) ;; Antti Karttunen, Dec 22 2017
Formula
a(n) = a(n-6).
G.f.: 1/(1-x^6).
a(n) = floor((1/2)*cos(n*Pi/3) + 1/2). - Gary Detlefs, May 16 2011
a(n) = floor(n/6) - floor((n-1)/6). - Tani Akinari, Oct 23 2012
a(n) = (((((v^n - w^n)^2)*(2 - (-1)^n)*(w^(2*n) + w^n - 3))^2 - 144)^2)/20736, where w = (-1+i*sqrt(3))/2, v = (1+i*sqrt(3))/2. - Bogart B. Strauss, Sep 20 2013
E.g.f.: (2*cos(sqrt(3)*x/2)*cosh(x/2) + cosh(x))/3. - Vaclav Kotesovec, Feb 15 2015
Extensions
More terms from Antti Karttunen, Dec 22 2017
Comments