OFFSET
2,9
COMMENTS
This is the i(n) function in the paper by Ufnarovski and Ahlander. Note that a(1) is infinite because all primes satisfy x' = 1. The plot shows the great difference in the number of solutions for even and odd n. Also compare sequence A189558, which gives the least number have n solutions, and A189560, which gives the least such odd number.
REFERENCES
See A003415
LINKS
Antti Karttunen, Table of n, a(n) for n = 2..100000 (terms 2..40000 from T. D. Noe)
Victor Ufnarovski and Bo Ahlander, How to Differentiate a Number, J. Integer Seqs., Vol. 6, 2003.
FORMULA
From Antti Karttunen, Jan 21 2024: (Start)
(End)
MATHEMATICA
dn[0]=0; dn[1]=0; dn[n_]:=Module[{f=Transpose[FactorInteger[n]]}, If[PrimeQ[n], 1, Plus@@(n*f[[2]]/f[[1]])]]; d1=Table[dn[n], {n, 40000}]; Table[Count[d1, n], {n, 2, 400}]
PROG
(Haskell)
a099302 n = length $ filter (== n) $ map a003415 [1 .. a002620 n]
-- Reinhard Zumkeller, Mar 18 2014
(Python)
from sympy import factorint
def A099302(n): return sum(1 for m in range(1, (n**2>>2)+1) if sum((m*e//p for p, e in factorint(m).items())) == n) # Chai Wah Wu, Sep 12 2022
(PARI)
up_to = 100000; \\ A002620(10^5) = 2500000000
A002620(n) = ((n^2)>>2);
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
A099302list(up_to) = { my(d, c, v=vector(up_to)); for(i=1, A002620(up_to), d = A003415(i); if(d>1 && d<=up_to, v[d]++)); (v); };
v099302 = A099302list(up_to);
A099302(n) = v099302[n]; \\ Antti Karttunen, Jan 21 2024
CROSSREFS
KEYWORD
nonn,look
AUTHOR
T. D. Noe, Oct 12 2004, Apr 24 2011
STATUS
approved