A348172 a(n) is the number of positive k (can be greater than n) such that A000005(n)/n = A000005(k)/k.
2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 3, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 2, 2, 2, 2, 2, 3, 1
Offset: 1
Examples
For n = 9, the k such that A000005(9)/9 = 1/3 = A000005(k)/k are 9, 18, and 24. Therefore, a(9) = 3.
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
- Charles R Greathouse IV, PARI/GP script
Programs
-
Mathematica
Array[Function[r, Count[Range[Ceiling[4/r^2]], _?(DivisorSigma[0, #]/# == r &)]][DivisorSigma[0, #]/#] &, 105] (* or *) Block[{nn = 7, m, s}, m = 2^(2 nn); s = KeySort@ PositionIndex[Array[DivisorSigma[0, #]/# &, m]]; s = Reverse@ KeyDrop[s, TakeWhile[Keys@ s, 4/#^2 > m &]]; Length /@ Array[Lookup[s, DivisorSigma[0, #]/#] &, 2^nn]] (* Michael De Vlieger, Oct 04 2021 *)
-
PARI
a(n) = {my(q=numdiv(n)/n); sum(i=1, 4/q^2, numdiv(i)/i == q);} \\ Michel Marcus, Oct 04 2021
-
PARI
a(n) = my(q=numdiv(n)/n, s=denominator(q), res = 0); forstep(i=s, 4/q^2, s, if(numdiv(i) == q * i, res++)); res \\ David A. Corneth, Oct 07 2021
-
PARI
\\ See Greathouse link
Comments