login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Characteristic function of numbers that are not multiples of 10.
17

%I #32 Jun 03 2023 10:46:15

%S 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,

%T 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,

%U 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

%N Characteristic function of numbers that are not multiples of 10.

%H Reinhard Zumkeller, <a href="/A168184/b168184.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,0,1).

%F a(n+10) = a(n);

%F a(n) = A000007(A010879(n));

%F a(A067251(n)) = 1; a(A008592(n)) = 0;

%F not the same as A168046: a(n)=A168046 for n<=100;

%F A033442(n) = Sum_{k=0..n} a(k)*(n-k).

%F Dirichlet g.f.: (1-1/10^s)*zeta(s). - _R. J. Mathar_, Feb 19 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 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 *)

%o (Haskell)

%o a168184 = (1 -) . (0 ^) . (`mod` 10)

%o a168184_list = cycle [0,1,1,1,1,1,1,1,1,1]

%o -- _Reinhard Zumkeller_, Oct 10 2012

%o (PARI) a(n)=n%10>0 \\ _Charles R Greathouse IV_, Sep 24 2015

%Y Cf. A168185, A145568, A168182, A168181, A109720, A097325, A011558, A166486, A011655, A000035, A010690, A033442.

%K nonn,easy

%O 0,1

%A _Reinhard Zumkeller_, Nov 30 2009