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.

A015906 First k>n such that k | n^k + n.

Original entry on oeis.org

1, 2, 6, 4, 10, 6, 14, 8, 12, 10, 22, 12, 15, 14, 30, 16, 34, 18, 38, 20, 28, 22, 46, 24, 28, 26, 54, 28, 35, 30, 51, 32, 44, 34, 70, 36, 52, 38, 78, 40, 70, 42, 86, 44, 60, 46, 94, 48, 56, 50, 66, 52, 106, 54, 66, 56, 76, 58, 118, 60, 85, 62, 66, 64, 80, 66, 134, 68
Offset: 0

Views

Author

Keywords

Programs

  • Maple
    f:= proc(n) local k;
      for k from n+1 do
        if n &^k + n mod k = 0 then return k fi
      od
    end proc:
    map(f, [$0..100]); # Robert Israel, Sep 13 2018
  • Mathematica
    fk[n_]:=Module[{k=n+1},While[!Divisible[n^k+n,k],k++];k]; Array[fk,70,0] (* Harvey P. Dale, Jan 28 2019 *)

Formula

a(n)=n+1 if n is odd. a(n) <= 2n+2. - Robert Israel, Sep 13 2018

Extensions

a(0)=1 and a(1)=2 inserted by Robert Israel, Sep 13 2018