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!)
A079978 Characteristic function of multiples of three. 106
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
If b(0)=0 and for n > 0, b(n)=a(n), then starting at n=0, b(n) is the number of incongruent equilateral triangles formed from the vertices of a regular n-gon. The number of incongruent isosceles triangles (strictly two equal sides) is A174257(n) and the number of incongruent scalene triangles is A069905(n-3) for n > 2, otherwise 0. The total number of incongruent triangles is A069905(n). - Frank M Jackson, Nov 19 2022
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.
Clark Kimberling, A Combinatorial Classification of Triangle Centers on the Line at Infinity, J. Int. Seq., Vol. 22 (2019), Article 19.5.4.
FORMULA
a(n) = a(n-3) for n > 2.
G.f.: 1/(1-x^3) = 1/( (1-x)*(1+x+x^2)).
a(n) = (1 + e^(i*Pi*A002487(n)))/2, i=sqrt(-1). - Paul Barry, Jan 14 2005
Additive with a(p^e) = 1 if p = 3, 0 otherwise.
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)/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
a(n) = 1/3 + (2/3)*cos((2/3)*n*Pi). - Ridouane Oudra, Jan 22 2021
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
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
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 02:44 EDT 2024. Contains 371989 sequences. (Running on oeis4.)