login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = 1 if the squarefree part of n is congruent to 1 or 5 modulo 6, otherwise 0.
1

%I #16 May 29 2024 06:58:30

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

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

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

%N a(n) = 1 if the squarefree part of n is congruent to 1 or 5 modulo 6, otherwise 0.

%C a(n) = 1 iff A007913(n) is in A007310.

%H Antti Karttunen, <a href="/A372574/b372574.txt">Table of n, a(n) for n = 1..100000</a>

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

%F a(n) = A354354(A007913(n)).

%F Sum_{k=1..n} a(k) ~ n/2. - _Amiram Eldar_, May 27 2024

%F Multiplicative with a(p^e) = [e == 0 (mod 2)] if p <= 3 and a(p^e) = 1 if p > 3, where [ ] is the Iverson bracket.

%t a[n_] := If[And @@ EvenQ[IntegerExponent[n, {2, 3}]], 1, 0]; Array[a, 100] (* _Amiram Eldar_, May 27 2024 *)

%o (PARI) A372574(n) = (1==gcd(core(n),6));

%o (PARI) A372574(n) = { my(f = factor(n)); prod(k=1, #f~, if(f[k, 1]<=3, !(f[k,2]%2), 1)); }; \\ _Antti Karttunen_, May 29 2024

%Y Characteristic function of A339690.

%Y Cf. A007310, A007913, A354354.

%K nonn,mult,easy

%O 1

%A _Antti Karttunen_, May 26 2024