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.

A385196 The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is a prime number.

This page as a plain text file.
%I A385196 #10 Jun 23 2025 02:46:10
%S A385196 0,1,1,0,1,3,1,0,0,5,1,3,1,7,6,0,1,8,1,3,8,11,1,7,0,13,0,3,1,14,1,0,
%T A385196 12,17,10,0,1,19,14,7,1,20,1,3,8,23,1,15,0,24,18,3,1,26,14,7,20,29,1,
%U A385196 18,1,31,8,0,16,32,1,3,24,34,1,0,1,37,24,3,16,38
%N A385196 The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is a prime number.
%H A385196 Amiram Eldar, <a href="/A385196/b385196.txt">Table of n, a(n) for n = 1..10000</a>
%F A385196 The unitary convolution of A047994 (the unitary totient phi) with A010051 (the characteristic function of prime numbers): a(n) = Sum_{d | n, gcd(d, n/d) == 1} A047994(d) * A010051(n/d).
%F A385196 a(n) = uphi(n) * Sum_{p || n} (1/(p-1)), where uphi = A047994, and p || n denotes that p unitarily divides n (i.e., the p-adic valuation of n is 1).
%F A385196 a(n) = A385197(n) - A047994(n).
%F A385196 Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = c1 * c2 = 0.21890744964919019488..., c1 = Product_{p prime}(1 - 1/(p*(p+1))) = A065463, and c2 = Sum_{p prime}((p^2-1)/(p^2*(p^2+p-1))) = 0.31075288978811405615... .
%e A385196 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. 3 of the values are primes, and therefore a(6) = 3.
%t A385196 f[p_, e_] := p^e - 1; a[1] = 0; a[n_] := Module[{fct = FactorInteger[n]}, (Times @@ f @@@ fct)*(Total[Boole[# == 1] & /@ fct[[;; , 2]]/(fct[[;; , 1]] - 1)])]; Array[a, 100]
%o A385196 (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i,1]^f[i,2]-1) * sum(i = 1, #f~, (f[i,2] == 1)/(f[i,1] - 1));}
%o A385196 (Python)
%o A385196 from sympy.ntheory import factorint
%o A385196 from sympy import Rational
%o A385196 def a(n: int) -> int:
%o A385196     if n == 1: return 0
%o A385196     S, P, F = 0, 1, factorint(n)
%o A385196     for p, e in F.items():
%o A385196         P *= p**e - 1
%o A385196         if e == 1: S += Rational(1, p - 1)
%o A385196     return int(P * S)
%o A385196 print([a(n) for n in range(1, 79)])  # _Peter Luschny_, Jun 22 2025
%Y A385196 The unitary analog of A117494.
%Y A385196 Cf. A010051, A047994, A065463, A077610, A384047.
%Y A385196 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), A385195 (1 or 2), this sequence (prime), A385197 (noncomposite), A385198 (prime power), A385199 (1 or prime power).
%K A385196 nonn,easy
%O A385196 1,6
%A A385196 _Amiram Eldar_, Jun 21 2025