A159459 Rectangular array read by antidiagonals: a(n,m) = number of divisors of m that don't divide n.
0, 0, 1, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 1, 2, 1, 3, 0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 2, 1, 2, 1, 3, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 1, 1, 2, 1, 3, 1, 3, 2, 3, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 1, 0, 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 5, 0, 0, 1, 1, 1, 2, 0, 2, 2, 2, 1, 4, 1, 0, 1, 0, 2, 0, 2, 1, 3, 1, 2, 1, 4, 1, 3
Offset: 1
Examples
From _Andrew Howroyd_, Jul 27 2018: (Start) Array begins: 0 1 1 2 1 3 1 3 2 ... 0 0 1 1 1 2 1 2 2 ... 0 1 0 2 1 2 1 3 1 ... 0 0 1 0 1 2 1 1 2 ... 0 1 1 2 0 3 1 3 2 ... 0 0 0 1 1 0 1 2 1 ... 0 1 1 2 1 3 0 3 2 ... 0 0 1 0 1 2 1 0 2 ... 0 1 0 2 1 2 1 3 0 ... ... (End) [corrected by _Jason Yuen_, Feb 05 2025]
Links
Crossrefs
Cf. A077478.
Programs
-
Maple
A159459 := proc(n,m) numtheory[tau](m)-numtheory[tau](gcd(n,m)) ; end: for d from 2 to 20 do for m from 1 to d-1 do n := d-m ; printf("%d,",A159459(n,m)) ; od: od: # R. J. Mathar, Apr 16 2009
-
Mathematica
Table[DivisorSigma[0, #] - DivisorSigma[0, GCD[n, #]] &[m - n + 1], {m, 13}, {n, m, 1, -1}] // Flatten (* Michael De Vlieger, Jul 30 2018 *)
-
PARI
\\ port of R.J. Mathar's Maple program a(n,m)=numdiv(m)-numdiv(gcd(n,m)) for(d=2,20,for(m=1,d-1,n=d-m;print1(a(n,m),", "))) \\ Luc Rousseau, Jul 27 2018
Formula
a(n,m) = d(m) - d(gcd(n,m)), where d(m) = A000005(m).
Extensions
2 terms corrected by R. J. Mathar, Apr 16 2009
Comments