OFFSET
1,2
COMMENTS
In the definition tau=A000005. By construction of the two arrays, their row sums and/or first moments are Sum_{x=1..z} k(x)*x = Sum_{x=1..z} h(x) = sigma(n) = A000203(n).
From R. J. Mathar, Oct 12 2011: (Start)
The table k(n,x) with row sums n is a frequency distribution of tau which starts in row n=1 with columns x >= 1 as follows:
1, 0, 0, 0, 0, 0, 0, 0, ...
1, 1, 0, 0, 0, 0, 0, 0, ...
2, 1, 0, 0, 0, 0, 0, 0, ...
2, 1, 1, 0, 0, 0, 0, 0, ...
4, 1, 0, 0, 0, 0, 0, 0, ...
2, 3, 0, 1, 0, 0, 0, 0, ...
6, 1, 0, 0, 0, 0, 0, 0, ...
4, 2, 1, 1, 0, 0, 0, 0, ...
6, 2, 1, 0, 0, 0, 0, 0, ...
4, 5, 0, 1, 0, 0, 0, 0, ...
10, 1, 0, 0, 0, 0, 0, 0, ...
4, 4, 2, 1, 0, 1, 0, 0, ...
By multiplying with the column number x we obtain another array x*k(n,x) which has row sums sigma(n):
1, 0, 0, 0, 0, 0, 0, 0, ...
1, 2, 0, 0, 0, 0, 0, 0, ...
2, 2, 0, 0, 0, 0, 0, 0, ...
2, 2, 3, 0, 0, 0, 0, 0. ...
4, 2, 0, 0, 0, 0, 0, 0, ...
2, 6, 0, 4, 0, 0, 0, 0, ...
6, 2, 0, 0, 0, 0, 0, 0, ...
4, 4, 3, 4, 0, 0, 0, 0, ...
6, 4, 3, 0, 0, 0, 0, 0, ...
4, 10, 0, 4, 0, 0, 0, 0, ...
10, 2, 0, 0, 0, 0, 0, 0, ...
4, 8, 6, 4, 0, 6, 0, 0, ...
The array h(n,x) with another frequency distribution of tau and also rows sums sigma(n) starts in row n=1 as follows:
1, 0, 0, 0, 0, 0, 0, 0, ...
1, 2, 0, 0, 0, 0, 0, 0, ...
1, 3, 0, 0, 0, 0, 0, 0, ...
1, 2, 4, 0, 0, 0, 0, 0, ...
1, 5, 0, 0, 0, 0, 0, 0, ...
1, 5, 0, 6, 0, 0, 0, 0, ...
1, 7, 0, 0, 0, 0, 0, 0, ...
1, 2, 4, 8, 0, 0, 0, 0, ...
1, 3, 9, 0, 0, 0, 0, 0, ...
1, 7, 0, 10, 0, 0, 0, 0, ...
1, 11, 0, 0, 0, 0, 0, 0, ...
1, 5, 4, 6, 0, 12, 0, 0, ...
Whenever the previous two tables match at one position (n,x) for a nonzero entry, we add the corresponding row number n to the sequence. The rows at n=4, (2,2,3) and (1,2,4) for example, match at x=2, which adds n=4 to the sequence. (End)
EXAMPLE
For n = 189: 21|189, 27|189 and tau(21) = tau(27) = 4; h(4) = Sum_{d|189; tau(d) = 4} d = 21+27 = k(4)*4 = 12*4 = 48. Therefore 189 is in the sequence.
MAPLE
k := proc(n, x)
a := 0 ;
for m from 1 to n do
if numtheory[tau](igcd(n, m)) = x then
a := a+1 ;
end if;
end do;
a ;
end proc:
h := proc(n, x)
a := 0 ;
for d in numtheory[divisors](n) do
if numtheory[tau](d) = x then
a := a+d ;
end if;
end do;
a ;
end proc:
isA197099 := proc(n)
for x from 1 to n do
if h(n, x) = x*k(n, x) and h(n, x) <> 0 then
return true;
end if;
end do:
false;
end proc:
for n from 1 do
if isA197099(n) then
print(n);
end if;
end do: # R. J. Mathar, Oct 12 2011
MATHEMATICA
k[n_, x_] := Module[{a = 0}, For[m = 1, m <= n, m++, If[DivisorSigma[0, GCD[n, m]] == x, a++]]; a];
h[n_, x_] := Module[{a = 0}, Do[If[DivisorSigma[0, d] == x, a += d], {d, Divisors[n]}]; a];
isA197099[n_] := For[x = 1, x <= n, x++, If[h[n, x] == x*k[n, x] && h[n, x] != 0, Return[True]]; False];
Reap[For[n = 1, n <= 1000, n++, If[isA197099[n], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jun 07 2024, after R. J. Mathar *)
PROG
(Sage)
def is_A197099(n): # extremely inefficient but useful for reference purposes
k = lambda x: sum(1 for m in (1..n) if number_of_divisors(gcd(n, m))==x)
h = lambda x: sum(d for d in divisors(n) if number_of_divisors(d)==x)
h_values = ((x, h(x)) for x in range(1, n + 1))
return any(hx != 0 and hx % x == 0 and hx == x*k(x) for x, hx in h_values)
[n for n in range(267) if is_A197099(n)]
# D. S. McNeil, Oct 12 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Naohiro Nomoto, Oct 10 2011
STATUS
approved