cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A056624 Number of unitary square divisors of n.

This page as a plain text file.
%I A056624 #50 Jun 14 2025 06:46:10
%S A056624 1,1,1,2,1,1,1,1,2,1,1,2,1,1,1,2,1,2,1,2,1,1,1,1,2,1,1,2,1,1,1,1,1,1,
%T A056624 1,4,1,1,1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1,1,1,1,1,1,2,1,1,2,2,1,1,1,2,
%U A056624 1,1,1,2,1,1,2,2,1,1,1,2,2,1,1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,2,2,4,1,1,1,1,1
%N A056624 Number of unitary square divisors of n.
%C A056624 Unitary analog of A046951.
%C A056624 The number of exponential divisors (A322791) of n that are cubefree (A004709). - _Amiram Eldar_, Jun 03 2025
%H A056624 Antti Karttunen, <a href="/A056624/b056624.txt">Table of n, a(n) for n = 1..10000</a>
%H A056624 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.
%F A056624 a(n) = 2^r, where r is the number of prime factors of the largest unitary square divisor of n.
%F A056624 Multiplicative with a(p^e) = 2^(1-(e mod 2)). - _Vladeta Jovovic_, Dec 13 2002
%F A056624 Dirichlet g.f.: zeta(s)*zeta(2*s)/zeta(3*s). - _Werner Schulte_, Apr 03 2018
%F A056624 Sum_{k=1..n} a(k) ~ n*Pi^2/(6*zeta(3)) + sqrt(n)*zeta(1/2)/zeta(3/2). - _Vaclav Kotesovec_, Feb 07 2019
%F A056624 a(n) = 2^A162641(n). - _Amiram Eldar_, Sep 26 2022
%F A056624 a(n) = A034444(A350388(n)). - _Amiram Eldar_, Sep 09 2023
%e A056624 n=256, it has 5 square divisors of which only 2,{1,256} are unitary, 3 divisors are not.
%e A056624 n=124 has 2 (1 and 4) square divisors, both of them unitary a(124) = 2.
%e A056624 n=108 has 12 divisors, 4 square divisors: {1,4,9,36} of which 1 and 4 are unitary, 9 and 36 are not. So a(108)=2. The largest unitary square divisor of 108 is 4 with 1 prime divisor so a(108) = 2^1 = 2.
%p A056624 isA056624 := (n, d) -> igcd(n, d) = d and igcd(n/d, d) = d and igcd(n/d^2, d) = 1:
%p A056624 a := n -> nops(select(k -> isA056624(n, k), [seq(1..n)])):  # _Peter Luschny_, Jun 13 2025
%t A056624 Table[DivisorSum[n, 1 &, And[IntegerQ@ Sqrt@ #, CoprimeQ[#, n/#]] &], {n, 105}] (* _Michael De Vlieger_, Jul 28 2017 *)
%t A056624 f[p_, e_] := 2^(1 - Mod[e, 2]); a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jan 03 2022 *)
%o A056624 (Scheme) (define (A056624 n) (if (= 1 n) n (* (A000079 (A059841 (A067029 n))) (A056624 (A028234 n))))) ;; _Antti Karttunen_, Jul 28 2017
%o A056624 (PARI) a(n) = sumdiv(n, d, if(gcd(d, n/d)==1, issquare(d))); \\ _Michel Marcus_, Jul 28 2017
%o A056624 (Python)
%o A056624 from sympy import factorint
%o A056624 def A056624(n): return 1<<sum(e&1^1 for e in factorint(n).values()) # _Chai Wah Wu_, Aug 03 2024
%o A056624 (Python)
%o A056624 def is_A056624(n, d): return gcd(n, d) == d and gcd(n//d, d) == d and gcd(n//(d*d), d) == 1
%o A056624 def a(n): return len([k for k in range(1, n+1) if is_A056624(n, k)])
%o A056624 print([a(n) for n in range(1, 106)])  # _Peter Luschny_, Jun 13 2025
%Y A056624 Cf. A000188, A004709, A008833, A034444, A046952, A055229, A056626, A059841, A162641, A322791, A350388.
%K A056624 nonn,easy,mult
%O A056624 1,4
%A A056624 _Labos Elemer_, Aug 08 2000
%E A056624 More terms from _Vladeta Jovovic_, Dec 13 2002