OFFSET
0,1
COMMENTS
This sequence also represents n^12 mod 7; n^18 mod 7; (exponents are = 0 mod 6).
Characteristic sequence for numbers n>=1 to be relatively prime to 7. - Wolfdieter Lang, Oct 29 2008
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]
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)
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
MATHEMATICA
PadRight[{}, 120, {0, 1, 1, 1, 1, 1, 1}] (* Harvey P. Dale, Jul 09 2018 *)
PROG
(Sage) [power_mod(n, 6, 7)for n in range(0, 105)] # Zerinvary Lajos, Nov 06 2009
(PARI) a(n)=n^6%7 \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
KEYWORD
easy,mult,nonn
AUTHOR
Bruce Corrigan (scentman(AT)myfamily.com), Aug 09 2005
STATUS
approved