This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A079978 Characteristic function of multiples of three. 75
 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS Period 3: repeat [1, 0, 0]. a(n)=1 if n=3k, a(n)=0 otherwise. Decimal expansion of 1/999. Number of permutations satisfying -k <= p(i)-i <= r and p(i)-i not in I, i=1..n, with k=1, r=2, I={0,1}. a(n) is also the number of partitions of n with every part being three (a(0)=1 because the empty partition has no parts). Hence a(n) is also the number of 2-regular graphs on n vertices with each component having girth 3. - Jason Kimberley, Oct 02 2011 Euler transformation of A185013. - Jason Kimberley, Oct 02 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 Vladimir Baltic, On the number of certain types of strongly restricted permutations, Applicable Analysis and Discrete Mathematics Vol. 4, No 1 (2010), 119-135 N. Gogin and A. Mylläri, Padovan-like sequences and Bell polynomials, Proceedings of Applications of Computer Algebra ACA, 2013. Index entries for linear recurrences with constant coefficients, signature (0,0,1). FORMULA a(n) = a(n-3) for n > 2. G.f.: 1/(1-x^3). a(n) = (1 + e^(i*Pi*A002487(n)))/2, i=sqrt(-1). - Paul Barry, Jan 14 2005 a(n) = ceiling(cos(n*(2/3)*Pi)). - Paolo P. Lava, Aug 22 2006 Additive with a(p^e) = 1 if p = 3, 0 otherwise. a(n) = -1*((n^2 mod 3)-1) - Paolo P. Lava, Oct 02 2006 a(n) = ((n+1) mod 3) mod 2. Also: a(n) = (1/2)*(1 + (-1)^(n + floor((n+1)/3))). - Hieronymus Fischer, May 29 2007 a(n) = 1 - A011655(n). - Reinhard Zumkeller, Nov 30 2009 a(n) = (1 + (-1)^(2*n/3) + (-1)^(-2*n/3))/3. - Jaume Oliver Lafont, May 13 2010 For the general case: the characteristic function of numbers that are multiples of m is a(n) = floor(n/m) - floor((n-1)/m), m,n > 0. - Boris Putievskiy, May 08 2013 a(n) = floor( ((n-1) mod 3)/2 ). - Wesley Ivan Hurt, Jun 29 2013 a(n) = (2^(n mod 3)) mod 2. - Olivier Gérard, Jul 04 2013 a(n) = ((w^(2*n)) + (w^n) + 1)/3, w = (-1 + i*sqrt(3))/2 (w is a primitive 3rd root of unity). - Bogart B. Strauss, Jul 20 2013 E.g.f.: (exp(x) + 2*exp(-x/2)*cos(sqrt(3)*x/2))/3. - Geoffrey Critzer, Nov 03 2014 a(n) = (sin(Pi*(n+1)/3)^2)*(2/3) + sin(Pi*(n+1)*2/3)*(1/sqrt(3)). - Mikael Aaltonen, Jan 03 2015 a(n) = (2*n^2 + 1) mod 3. The characteristic function of numbers that are multiples of 2k+1 is (2*k*n^(2*k) + 1) mod (2k+1). Example: A058331(n) mod 3 for k=1, A211412(n) mod 5 for k=2, ... - Eric Desbiaux, Dec 25 2015 a(n) = floor(2*(n-1)/3) - 2*floor((n-1)/3). - Wesley Ivan Hurt, Jul 25 2016 a(n) == A007908(n+1) (mod 3), n >= 0. See A011655 (bit flipped). - Wolfdieter Lang, Jun 12 2017 MAPLE seq(op([1, 0, 0]), n=0..50); # Wesley Ivan Hurt, Jun 30 2016 MATHEMATICA Table[Boole[IntegerQ[n/3]], {n, 0, 127}] (* Michael De Vlieger, Jan 03 2015, after Alonso del Arte at A121262 *) PROG (PARI) a(n)=!(n%3) \\ Jaume Oliver Lafont, Mar 01 2009 (Haskell) a079978 = fromEnum . (== 0) . (`mod` 3) a079978_list = cycle [1, 0, 0] -- Reinhard Zumkeller, Aug 28 2012, Nov 26 2011 (MAGMA) &cat[[1, 0, 0]^^30]; // Vincenzo Librandi, Dec 26 2015 CROSSREFS Cf. A002524-A002529, A072827, A072850-A072856, A079955-A080014, A022003. Essentially the same as A022003. Partial sums are given by A002264(n+3). Characteristic function of multiples of g: A000007 (g=0), A000012 (g=1), A059841 (g=2), this sequence (g=3), A121262 (g=4), A079998 (g=5), A079979 (g=6), A082784 (g=7). - Jason Kimberley, Oct 14 2011 Cf. A007908, A011655 (bit flipped). Sequence in context: A037011 A070563 A024692 * A164704 A245485 A068429 Adjacent sequences:  A079975 A079976 A079977 * A079979 A079980 A079981 KEYWORD nonn,easy AUTHOR Vladimir Baltic, Feb 17 2003 EXTENSIONS Name simplified by Ralf Stephan, Nov 22 2010 Name changed by Jason Kimberley, Oct 14 2011 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.

Last modified July 20 13:55 EDT 2019. Contains 325181 sequences. (Running on oeis4.)