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”).

A358261
a(n) is the number of noninfinitary square divisors of n.
4
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
OFFSET
1
COMMENTS
First differs from A295884 at n = 64.
The first occurrence of 1 is at n = 16, of 2 is at n = 144, of 3 is at n = 256, ... (see A358262).
LINKS
FORMULA
a(n) = A046951(n) - A358260(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi^2/6 - Product_{p prime} ((1-1/p) * Sum_{k>=1} a(p^k)/p^k) = 0.09038522017381649992... .
MATHEMATICA
f1[p_, e_] := 1 + Floor[e/2]; f2[p_, e_] := 2^DigitCount[If[OddQ[e], e - 1, e], 2, 1]; a[1] = 0; a[n_] := Times @@ f1 @@@ (fct = FactorInteger[n]) - Times @@ f2 @@@ fct; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i=1, #f~, 1+f[i, 2]\2) - prod(i=1, #f~, 2^hammingweight(if(f[i, 2]%2, f[i, 2]-1, f[i, 2])))};
CROSSREFS
Similar sequences: A046951, A056624, A056626, A358260.
Sequence in context: A023974 A277164 A011730 * A295884 A101637 A337380
KEYWORD
nonn
AUTHOR
Amiram Eldar, Nov 06 2022
STATUS
approved