login
Characteristic function of arithmetic numbers, cf. A003601.
12

%I #16 Dec 02 2021 07:02:14

%S 1,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,1,0,1,0,

%T 1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,

%U 1,1,1,0,1,0,0,0,1,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,1,1,1,1,1,0,1,0,1,1,1,0,1

%N Characteristic function of arithmetic numbers, cf. A003601.

%C a(A003601(n)) = 1; a(A049642(n)) = 0.

%H Antti Karttunen, <a href="/A245656/b245656.txt">Table of n, a(n) for n = 1..16384</a>

%H Antti Karttunen, <a href="/A245656/a245656.txt">Data supplement: n, a(n) computed for n = 1..100000</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Arithmetic_number">Arithmetic number</a>

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

%F a(n) = A000007(A054025(n)).

%t a[n_] := Boole[IntegerQ[Mean[Divisors[n]]]];

%t Array[a, 105] (* _Jean-François Alcover_, Dec 02 2021 *)

%o (Haskell)

%o a245656 = (0 ^) . a054025 :: (Integral a, Integral t) => a -> t

%o (PARI) A245656(n) = !(sigma(n)%numdiv(n)); \\ _Antti Karttunen_, Dec 24 2018

%Y Cf. A003601, A049642, A054025, A000007, A069928 (partial sums).

%Y Cf. also A176801.

%K nonn

%O 1

%A _Reinhard Zumkeller_, Jul 28 2014

%E More terms from _Antti Karttunen_, Dec 24 2018