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.

A054008 n read modulo (number of divisors of n).

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 1, 0, 0, 2, 1, 0, 1, 2, 3, 1, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 1, 2, 3, 2, 1, 8, 1, 2, 3, 4, 1, 6, 3, 0, 1, 2, 1, 0, 1, 2, 3, 1, 1, 2, 1, 2, 1, 6, 1, 0, 1, 2, 3, 4, 1, 6, 1, 0, 1, 2, 1, 0, 1, 2, 3, 0, 1, 6, 3, 2, 1, 2, 3, 0, 1, 2, 3, 1, 1, 6, 1, 0, 1
Offset: 1

Views

Author

Asher Auel, Jan 12 2000

Keywords

Comments

a(n)=0 iff n is a refactorable number (cf. A033950). - Franz Vrabec, Oct 16 2005
a(A066708(n)) = n and a(m) < n for m < A066708(n). - Reinhard Zumkeller, Sep 17 2014

Crossrefs

Programs

  • Haskell
    a054008 n = n `mod` a000005 n  -- Reinhard Zumkeller, Sep 17 2014
    
  • Maple
    [ seq( i mod tau(i), i=1..130) ];
  • Mathematica
    a[n_] := Mod[n, DivisorSigma[0, n]]; Array[a, 105] (* Jean-François Alcover, Sep 19 2017 *)
  • PARI
    a(n) = n % numdiv(n); \\ Michel Marcus, Sep 19 2017
    
  • Python
    from sympy import divisor_count
    def A054008(n): return n%divisor_count(n) # Chai Wah Wu, Mar 14 2023

Formula

a(n) = n mod tau(n).