[go: up one dir, main page]

login
A168185
Characteristic function of numbers that are not multiples of 12.
12
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
0,1
COMMENTS
a(n+12) = a(n);
a(n) = A000007(A010881(n));
a(A168186(n)) = 1; a(A008594(n)) = 0;
A033444(n) = Sum_{k=0..n} a(k)*(n-k).
FORMULA
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
a:=n->`if`(modp(n, 12)=0, 0, 1); seq(a(n), n=0..150); # Muniru A Asiru, Sep 21 2018
MATHEMATICA
If[Divisible[#, 12], 0, 1]&/@Range[0, 120] (* Harvey P. Dale, Apr 03 2015 *)
PROG
(PARI) a(n)=!!(n%12) \\ Charles R Greathouse IV, Aug 21 2011
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Nov 30 2009
STATUS
approved