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!)
A082784 Characteristic function of multiples of 7. 22

%I #48 Oct 31 2023 11:15:45

%S 1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,

%T 0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,

%U 0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0

%N Characteristic function of multiples of 7.

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

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

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

%F a(n) = 0^(n mod 7).

%F a(0)=1, a(n)=0 for 1<=n<7, a(n+7)=a(n).

%F a(n) = 1 - (n^6 mod 7). - _Paolo P. Lava_, Oct 02 2006

%F a(n) = 1 - A109720(n); a(A008589(n)) = 1; a(A047304(n)) = 0. - _Reinhard Zumkeller_, Nov 30 2009

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

%F a(n) = C(n-1,6) mod 7. - _Wesley Ivan Hurt_, Oct 07 2014

%F From _Wesley Ivan Hurt_, Jul 11 2016: (Start)

%F G.f.: 1/(1-x^7).

%F a(n) = a(n-7) for n>6.

%F a(n) = (gcd(n,7) - 1)/6. (End)

%e a(14) = a(2*7) = 1; a(41) = a(5*7+6) = 0.

%p A082784:=n->0^(n mod 7): seq(A082784(n), n=0..100); # _Wesley Ivan Hurt_, Oct 07 2014

%t Table[Mod[Binomial[n - 1, 6], 7], {n, 0, 100}] (* _Wesley Ivan Hurt_, Oct 07 2014 *)

%t Table[Boole[Divisible[n, 7]], {n, 0, 100}] (* _Amiram Eldar_, Oct 31 2023 *)

%o (Haskell)

%o a082784 = a000007 . (`mod` 7)

%o a082784_list = cycle [1,0,0,0,0,0,0]

%o -- _Reinhard Zumkeller_, Oct 27 2012

%o (PARI) a(n)=!(n%7) \\ _Charles R Greathouse IV_, Dec 03 2012

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

%Y Cf. A008589, A076309.

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

%Y Cf. A000007, A047304, A109720, A185017.

%K nonn,easy

%O 0,1

%A _Reinhard Zumkeller_, May 22 2003

%E Wrong formula and keyword mult removed by _Amiram Eldar_, Oct 31 2023

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 May 6 16:31 EDT 2024. Contains 372296 sequences. (Running on oeis4.)