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.

A159459 Rectangular array read by antidiagonals: a(n,m) = number of divisors of m that don't divide n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Apr 12 2009

Keywords

Comments

a(n,1) = 0, for all n. a(1,m) = d(m)-1, for all m.
From Luc Rousseau, Jul 27 2018: (Start)
a(.,m) is periodic with period m.
a(n,m) is the number of nonzero elements S(n) and S(n+m) have in common, where S(n) denotes the set of complex numbers k*(1-exp(i*2*Pi*n/k)), for k positive integer. See illustration, section links.
(End)

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]
		

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