A109720 Periodic sequence {0,1,1,1,1,1,1} or n^6 mod 7.
0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1
Offset: 0
Links
- Index entries for characteristic functions - _Reinhard Zumkeller_, Nov 30 2009
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,1)
Crossrefs
Programs
-
Mathematica
PadRight[{},120,{0,1,1,1,1,1,1}] (* Harvey P. Dale, Jul 09 2018 *)
-
PARI
a(n)=n^6%7 \\ Charles R Greathouse IV, Sep 24 2015
-
Sage
[power_mod(n,6,7)for n in range(0, 105)] # Zerinvary Lajos, Nov 06 2009
Formula
a(n) = 0 if n=0 mod 7; a(n)= 1 else.
G.f. = (x+x^2+x^3+x^4+x^5+x^6)/(1-x^7)= -x*(1+x)*(1+x+x^2)*(x^2-x+1) / ( (x-1)*(1+x+x^2+x^3+x^4+x^5+x^6) ).
a(n)=1-A082784(n); a(A047304(n))=1; a(A008589(n))=0; A033439(n) = SUM(a(k)*(n-k): 0<=k<=n). - Reinhard Zumkeller, Nov 30 2009
Multiplicative with a(p) = (if p=7 then 0 else 1), p prime. - Reinhard Zumkeller, Nov 30 2009
Dirichlet g.f. (1-7^(-s))*zeta(s). - R. J. Mathar, Mar 06 2011
For the general case: the characteristic function of numbers that are not multiples of m is a(n)=floor((n-1)/m)-floor(n/m)+1, m,n > 0. - Boris Putievskiy, May 08 2013
Comments