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.

A332559 a(n) = n + A332558(n) + 1.

Original entry on oeis.org

6, 6, 6, 8, 10, 12, 12, 12, 15, 15, 18, 18, 20, 20, 20, 24, 24, 24, 24, 24, 28, 30, 30, 30, 30, 35, 35, 35, 36, 36, 40, 40, 40, 40, 40, 45, 45, 45, 45, 48, 48, 48, 54, 54, 54, 56, 56, 56, 56, 60, 60, 60, 60, 60, 60, 63, 70, 70, 70, 70, 70, 70, 70, 72, 72, 72
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local k,p;
      p:= n;
      for k from 1 do
        p:= p*(n+k);
        if (p/(n+k+1))::integer then return n+k+1 fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 25 2020
  • Mathematica
    a[n_] := Module[{k, p = n}, For[k = 1, True, k++, p *= (n+k); If[Divisible[p, n+k+1], Return[n+k+1]]]];
    Array[a, 100] (* Jean-François Alcover, Jul 18 2020, after Maple *)
  • Python
    def a(n):
        k, p = 1, n*(n+1)
        while p%(n+k+1): k += 1; p *= (n+k)
        return n + k + 1
    print([a(n) for n in range(1, 67)]) # Michael S. Branicky, Jun 06 2021