A168184 Characteristic function of numbers that are not multiples of 10.
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Index entries for characteristic functions
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
Crossrefs
Programs
-
Haskell
a168184 = (1 -) . (0 ^) . (`mod` 10) a168184_list = cycle [0,1,1,1,1,1,1,1,1,1] -- Reinhard Zumkeller, Oct 10 2012
-
Mathematica
Table[If[Mod[n,10]==0,0,1],{n,0,110}] (* or *) PadRight[{},110,{0,1,1,1,1,1,1,1,1,1}] (* Harvey P. Dale, Jun 03 2023 *)
-
PARI
a(n)=n%10>0 \\ Charles R Greathouse IV, Sep 24 2015
Formula
a(n+10) = a(n);
A033442(n) = Sum_{k=0..n} a(k)*(n-k).
Dirichlet g.f.: (1-1/10^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