login
a(n) = 1 if 3*n is squarefree, otherwise 0.
10

%I #28 Sep 16 2023 16:03:07

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

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

%U 0,1,1,0,1,1,0,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,1,0,1,0,0,1,1,0,1,1,0,0,1,0,1,0,0,1,1,0

%N a(n) = 1 if 3*n is squarefree, otherwise 0.

%C Note the correspondences between four sequences:

%C A156277 --- abs ---> A359377 (this sequence)

%C ^ ^

%C | |

%C inv inv

%C | |

%C v v

%C A011655 <--- abs --- A359378

%C Here inv means that the sequences are Dirichlet Inverses of each other, and abs means taking absolute values.

%H Antti Karttunen, <a href="/A359377/b359377.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 Multiplicative with a(3^e) = 0, and for primes p <> 3, a(p^e) = 1 if e = 1, and 0 if e > 1.

%F a(n) = A008966(3*n).

%F a(n) = abs(A156277(n)).

%F a(n) = A000035(A349125(n)).

%F From _Amiram Eldar_, Jan 03 2023: (Start)

%F Dirichlet g.f.: zeta(s)*(1-1/3^s).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 9/(2*Pi^2) = 0.455945... (A088245). (End)

%F a(n) = A011655(|A055615(n)|) = abs(A365428(n)). - _Antti Karttunen_, Sep 16 2023

%t a[n_] := If[SquareFreeQ[3*n], 1, 0]; Array[a, 100] (* _Amiram Eldar_, Dec 30 2022 *)

%o (PARI) A359377(n) = issquarefree(3*n);

%o (PARI) A359377(n) = { my(f = factor(n)); prod(k=1, #f~, ((3!=f[k,1])&&(1==f[k, 2]))); };

%Y Characteristic function of A261034.

%Y Absolute values of A156277 and of A365428.

%Y Cf. A000035, A008966, A088245, A011655, A055615, A349125, A359378 (Dirichlet inverse).

%Y Cf. also A323239, A353627.

%K nonn,mult

%O 1

%A _Antti Karttunen_, Dec 29 2022