|
|
A097325
|
|
Period 6: repeat [0, 1, 1, 1, 1, 1].
|
|
19
|
|
|
0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
a(n) is 0 if 6 divides n, 1 otherwise.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: 1/(1-x) - 1/(1-x^6) = Sum_{k>=0} x^k - x^(6*k).
Recurrence: a(n+6) = a(n), a(0) = 0, a(i) = 1, 1 <= i <= 5.
a(n) = (1/4) * (3 - (-1)^n - (-1)^((n+1)/3) - (-1)^((2n+1)/3)).
A033438(n) = Sum_{k=0..n} a(k)*(n-k). (End)
Dirichlet g.f.: (1 - 1/6^s)*zeta(s). - R. J. Mathar, Feb 19 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
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[Boole[Not[Divisible[n, 6]]], {n, 0, 89}] (* Alonso del Arte, Oct 21 2013 *)
|
|
PROG
|
(PARI) a(n) = sign(n%6);
|
|
CROSSREFS
|
Characteristic sequence of A047253.
Cf. A010875, A168185, A145568, A168184, A168182, A168181, A109720, A011558, A166486, A011655, A000035.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|