|
|
A079998
|
|
The characteristic function of the multiples of five.
|
|
28
|
|
|
1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i = 1..n, with k = 2, r = 3, I = {-1, 0, 1, 2}.
a(n) = 1 if n = 5k, a(n) = 0 otherwise. Also, number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i = 1..n, with k = 1, r = 4, I = {0, 1, 2, 3}.
a(n) is also the number of partitions of n with each part being five (a(0) = 1 because the empty partition has no parts to test equality with five). Hence a(n) is also the number of 2-regular graphs on n vertices with each component having girth exactly five. - 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
|
|
|
FORMULA
|
Recurrence: a(n) = a(n-5). G.f.: -1/(x^5 - 1).
a(n) = floor(1/2*cos(2*n*Pi/5) + 1/2). - Gary Detlefs, May 16 2011
a(n) = floor(n/5) - floor((n-1)/5). - Tani Akinari, Oct 21 2012
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[Mod[Binomial[n - 1, 4], 5], {n, 0, 100}] (* Wesley Ivan Hurt, Oct 06 2014 *)
Table[Boole[Divisible[n, 5]], {n, 0, 99}] (* Alonso del Arte, Nov 29 2014 *)
|
|
PROG
|
(Magma) [Binomial(n-1, 4) mod 5 : n in [0..100]]; // Wesley Ivan Hurt, Oct 06 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|