A079998 The characteristic function of the multiples of five.
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
Offset: 0
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..16385
- 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.
- Benoit Cloitre, A study of a family of self-referential sequences, arXiv:2506.18103 [math.GM], 2025. See p. 10.
- Index entries for characteristic functions
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
Crossrefs
Programs
-
Magma
[Binomial(n-1,4) mod 5 : n in [0..100]]; // Wesley Ivan Hurt, Oct 06 2014
-
Maple
A079998:=n->binomial(n-1,4) mod 5: seq(A079998(n), n=0..100); # Wesley Ivan Hurt, Oct 06 2014
-
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 *) PadRight[{},120,{1,0,0,0,0}] (* Harvey P. Dale, Jul 11 2023 *)
-
PARI
a(n)=!(n%5) \\ Charles R Greathouse IV, Mar 07 2012
-
Scheme
(define (A079998 n) (if (zero? (modulo n 5)) 1 0)) ;; Antti Karttunen, Dec 21 2017
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
a(n) = binomial(n - 1, 4) mod 5. - Wesley Ivan Hurt, Oct 06 2014
Extensions
More terms from Antti Karttunen, Dec 21 2017
Comments