|
|
A079978
|
|
Characteristic function of multiples of three.
|
|
122
|
|
|
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
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) isA174257(n) and the number of incongruent scalene triangles isA069905(n-3) for n > 2, otherwise 0. The total number of incongruent triangles isA069905(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
|
|
|
FORMULA
|
a(n) = a(n-3) for n > 2.
G.f.: 1/(1-x^3) = 1/( (1-x)*(1+x+x^2)).
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
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) = (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
|
|
MAPLE
|
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a079978 = fromEnum. (== 0). (`mod` 3)
a079978_list = cycle [1, 0, 0]
|
|
CROSSREFS
|
Partial sums are given byA002264(n+3).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|