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!)
A079998 The characteristic function of the multiples of five. 28

%I #85 Jan 01 2024 02:23:25

%S 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,

%T 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,

%U 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

%N The characteristic function of the multiples of five.

%C 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}.

%C 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}.

%C 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

%C This sequence is the Euler transformation of A185015. - _Jason Kimberley_, Oct 02 2011

%D 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.

%H Antti Karttunen, <a href="/A079998/b079998.txt">Table of n, a(n) for n = 0..16385</a>

%H Vladimir Baltic, <a href="http://pefmath.etf.rs/vol4num1/AADM-Vol4-No1-119-135.pdf">On the number of certain types of strongly restricted permutations</a>, Applicable Analysis and Discrete Mathematics Vol. 4, No 1 (April, 2010), 119-135.

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 1).

%F Recurrence: a(n) = a(n-5). G.f.: -1/(x^5 - 1).

%F a(n) = 1 - A011558(n); a(A008587(n)) = 1; a(A047201(n)) = 0. - _Reinhard Zumkeller_, Nov 30 2009

%F a(n) = floor(1/2*cos(2*n*Pi/5) + 1/2). - _Gary Detlefs_, May 16 2011

%F a(n) = floor(n/5) - floor((n-1)/5). - _Tani Akinari_, Oct 21 2012

%F a(n) = binomial(n - 1, 4) mod 5. - _Wesley Ivan Hurt_, Oct 06 2014

%p A079998:=n->binomial(n-1,4) mod 5: seq(A079998(n), n=0..100); # _Wesley Ivan Hurt_, Oct 06 2014

%t Table[Mod[Binomial[n - 1, 4], 5], {n, 0, 100}] (* _Wesley Ivan Hurt_, Oct 06 2014 *)

%t Table[Boole[Divisible[n, 5]], {n, 0, 99}] (* _Alonso del Arte_, Nov 29 2014 *)

%t PadRight[{},120,{1,0,0,0,0}] (* _Harvey P. Dale_, Jul 11 2023 *)

%o (PARI) a(n)=!(n%5) \\ _Charles R Greathouse IV_, Mar 07 2012

%o (Magma) [Binomial(n-1,4) mod 5 : n in [0..100]]; // _Wesley Ivan Hurt_, Oct 06 2014

%o (Scheme) (define (A079998 n) (if (zero? (modulo n 5)) 1 0)) ;; _Antti Karttunen_, Dec 21 2017

%Y Cf. A011558, A008587, A002524-A002529, A072827, A072850-A072856, A079955-A080014.

%Y Characteristic function of multiples of g: A000007 (g = 0), A000012 (g = 1), A059841 (g = 2), A079978 (g = 3), A121262 (g = 4), this sequence (g = 5), A079979 (g = 6), A082784 (g = 7). - _Jason Kimberley_, Oct 14 2011

%K nonn,easy

%O 0,1

%A _Vladimir Baltic_, Feb 10 2003

%E More terms from _Antti Karttunen_, Dec 21 2017

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)