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.

A188795 a(n) counts all integers k in [2,floor(sqrt(n))] such that the number of divisors d>1 of n-k with k|(n-d) equals A188550(n).

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Apr 10 2011

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local c, h, k, m;
           m, c:= 0, 0;
           for k from 2 to floor(sqrt(n)) do
              h:= nops(select(x-> irem(x, k)=0,
                  [seq (n-d, d=divisors(n-k) minus{1})]));
              if h=m then c:=c+1 elif h>m then m, c:= h, 1 fi
           od; c
        end:
    seq(a(n), n=4..120);  # Alois P. Heinz, Apr 10 2011
  • Mathematica
    b[n_] := Max @ Table[Length @ Select[Table[n-d, {d, Divisors[n-k] // Rest} ], Mod[#, k] == 0&], {k, 2, Floor[Sqrt[n]]}];
    a[n_] := a[n] = Count[Range[2, Floor[Sqrt[n]]], k_ /; Count[Rest @ Divisors[n-k], d_ /; Divisible[n-d, k]] == b[n]];
    Table[a[n], {n, 4, 120}] (* Jean-François Alcover, Mar 27 2017, after Alois P. Heinz *)