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.
%I A385195 #11 Jun 22 2025 16:33:52 %S A385195 1,2,2,3,4,4,6,7,8,8,10,6,12,12,8,15,16,16,18,12,12,20,22,14,24,24,26, %T A385195 18,28,16,30,31,20,32,24,24,36,36,24,28,40,24,42,30,32,44,46,30,48,48, %U A385195 32,36,52,52,40,42,36,56,58,24,60,60,48,63,48,40,66,48,44 %N A385195 The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is either 1 or 2. %H A385195 Amiram Eldar, <a href="/A385195/b385195.txt">Table of n, a(n) for n = 1..10000</a> %F A385195 Multiplicative with a(p^e) = 2 if p = 2 and e = 1, and p^e - 1 otherwise. %F A385195 In general, the number of integers k from 1 to n such that ugcd(n, k), the greatest divisor of k that is a unitary divisor of n, is either 1 or a prime power q is a multiplicative function f(n) with f(p^e) = q if p^e = q, and p^e - 1 otherwise. %F A385195 a(n) = A138191(n) * A047994(n), i.e., a(n) = 2*A047994(n) if n == 2 (mod 4) and A047994(n) otherwise. %F A385195 In general, the number of integers k from 1 to n such that ugcd(n, k) is either 1 or a prime power q is (q/(q-1))*A047994(n) if q is a unitary divisor of n, and A047994(n) otherwise. %F A385195 Sum_{k=1..n} a(k) ~ (23/40) * c * n^2, where c = Product_{p prime} (1 - 1/(p*(p+1))) = A065463. %F A385195 In general, the average order of the number of integers k from 1 to n such that ugcd(n, k) is either 1 or a prime p is ((p^4+p^3-1)/(p^4+p^3-p^2)) * c * n^2 / 2, where c = A065463. %e A385195 For n = 6, the greatest divisor of k that is a unitary divisor of 6 for k = 1 to 6 is 1, 2, 3, 2, 1 and 6, respectively. 4 of the values are either 1 or 2, and therefore a(6) = 4. %t A385195 f[p_, e_] := p^e - 1; f[2, 1] = 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] %o A385195 (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~,f[i,1]^f[i,2] - if(f[i,1] == 2 && f[i,2] == 1, 0, 1));} %Y A385195 The unitary analog of A126246 (with respect to the definition "the number of integers k from 1 to n such that gcd(n,k) is either 1 or 2"). %Y A385195 Cf. A065463, A077610, A138191, A384047. %Y A385195 The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is: A047994 (1), A384048 (squarefree), A384049 (cubefree), A384050 (powerful), A384051 (cubefull), A384052 (square), A384053 (cube), A384054 (exponentially odd), A384055 (odd), A384056 (power of 2), A384057 (3-smooth), A384058 (5-rough), this sequence (1 or 2), A385196 (prime), A385197 (noncomposite), A385198 (prime power), A385199 (1 or prime power). %K A385195 nonn,easy,mult %O A385195 1,2 %A A385195 _Amiram Eldar_, Jun 21 2025