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.

A049605 Smallest k>1 such that k divides sigma(k*n).

Original entry on oeis.org

6, 3, 2, 6, 2, 2, 2, 3, 6, 2, 2, 2, 2, 2, 2, 6, 2, 3, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 6, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Benoit Cloitre, Jul 26 2002

Keywords

Comments

a(n) = 2, 3 or 6. For any m, a(A028983(m)) = 2. If a(m)=6 then m is a square but if m is a square a(m) is not necessarily 6, first example is 7: a(7^2)=3 (cf. A072864).

Crossrefs

Cf. A028983 (locations of 2), A067051 (locations of 3), A072862 (locations of 6).

Programs

  • Maple
    A049605 := proc(n)
        for k from 2 do
            if modp(numtheory[sigma](k*n),k) = 0 then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Oct 26 2015
  • Mathematica
    sk[n_]:=Module[{k=2},While[!Divisible[DivisorSigma[1,k*n],k],k++];k]; sk /@ Range[110] (* Harvey P. Dale, Jan 04 2015 *)
  • PARI
    a(n) = {k = 2; while(sigma(k*n) % k, k++); k ;} \\ Michel Marcus, Nov 21 2013