%I #41 Dec 14 2023 05:18:57
%S 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,
%T 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,
%U 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
%N Periodic sequence {0,1,1,1,1,1,1} or n^6 mod 7.
%C This sequence also represents n^12 mod 7; n^18 mod 7; (exponents are = 0 mod 6).
%C Characteristic sequence for numbers n>=1 to be relatively prime to 7. - _Wolfdieter Lang_, Oct 29 2008
%C a(n+4), n>=0, (periodic 1,1,1,0,1,1,1) is also the characteristic sequence for mod m reduced positive odd numbers (i.e., gcd(2*n+1,m)=1, n>=0) for each modulus m from 7*A003591 = [7,14,28,49,56,98,112,196,...]. [_Wolfdieter Lang_, Feb 04 2012]
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> - _Reinhard Zumkeller_, Nov 30 2009
%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 if n=0 mod 7; a(n)= 1 else.
%F 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) ).
%F 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
%F Multiplicative with a(p) = (if p=7 then 0 else 1), p prime. - _Reinhard Zumkeller_, Nov 30 2009
%F Dirichlet g.f. (1-7^(-s))*zeta(s). - R. J. Mathar, Mar 06 2011
%F 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
%t PadRight[{},120,{0,1,1,1,1,1,1}] (* _Harvey P. Dale_, Jul 09 2018 *)
%o (Sage) [power_mod(n,6,7)for n in range(0, 105)] # _Zerinvary Lajos_, Nov 06 2009
%o (PARI) a(n)=n^6%7 \\ _Charles R Greathouse IV_, Sep 24 2015
%Y Cf. A010876 = n mod 7; A053879 = n^2 mod 7; A070472 = m^3 mod 7; A070512 = n^4 mod 7; A070593 = n^5 mod 7.
%Y Cf. A168185, A145568, A168184, A168182, A168181, A097325, A011558, A166486, A011655, A000035.
%K easy,mult,nonn
%O 0,1
%A Bruce Corrigan (scentman(AT)myfamily.com), Aug 09 2005
|