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

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079979 Characteristic function of multiples of six. 20
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

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

a(n)=1 if n=6k, a(n)=0 otherwise.

Decimal expansion of 1/999999.

Number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=3, r=3, I={-2,-1,0,1,2}.

Also, number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=1, r=5, I={0,1,2,3,4}.

a(n) is also the number of partitions of n such that each part is six (a(0)=1 because the empty partition has no parts to test equality with six). Hence a(n) is also the number of 2-regular graphs on n vertices with each part having girth exactly six. - Jason Kimberley, Oct 10 2011

This sequence is the Euler transformation of A185016. - Jason Kimberley, Oct 10 2011

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

FORMULA

Recurrence: a(n) = a(n-6).

G.f.: 1/(1-x^6).

a(n) = (1/3)*[cos(n*(2/3)* Pi)+1/2]*[1+(-1)^n] with n>=0. - Paolo P. Lava, Aug 23 2006

This formula can be used to produce any periodic sequence of 6 numbers b,c,d,e,f,g: a(n)= b*(1/3)*[cos(n*(2/3)* Pi)+ 1/2]*[1+(-1)^n]+ c*(1/3)*[cos((n+5)*(2/3)* Pi)+ 1/2]*[1+(-1)^(n+5)]+ d*(1/3)*[cos((n+4)*(2/3)* Pi)+ 1/2]*[1+(-1)^(n+4)]+ e*(1/3)*[cos((n+3)*(2/3)* Pi)+ 1/2]*[1+(-1)^(n+3)]+ f*(1/3)*[cos((n+2)*(2/3)* Pi)+ 1/2]*[1+(-1)^(n+2)]+ g*(1/3)*[cos((n+1)*(2/3)* Pi)+ 1/2]*[1+(-1)^(n+1)]. - Paolo P. Lava, Aug 23 2006

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

MATHEMATICA

PadRight[{}, 120, {1, 0, 0, 0, 0, 0}] (* Harvey P. Dale, Feb 19 2013 *)

PROG

(MAGMA) &cat[[1, 0^^5]^^30];

(MAGMA) A079979 := func<n|IsDivisibleBy(n, 6)select 1 else 0>; [A079979:n in [0..59]];  // Jason Kimberley, Oct 10 2011

(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

CROSSREFS

Cf. A002524-A002529, A010875, A072827, A072850-A072856, A079955-A080014, A097325, A122841.

Characteristic function of multiples of g: A000007 (g=0), A000012 (g=1), A059841 (g=2), A079978 (g=3), A121262 (g=4), A079998 (g=5), this sequence (g=6), A082784 (g=7).

Sequence in context: A267417 A014189 A319691 * A288711 A089010 A162289

Adjacent sequences:  A079976 A079977 A079978 * A079980 A079981 A079982

KEYWORD

nonn,easy

AUTHOR

Vladimir Baltic, Feb 17 2003

EXTENSIONS

More terms from Antti Karttunen, Dec 22 2017

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 14 14:59 EST 2019. Contains 329979 sequences. (Running on oeis4.)