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.

A238098 Number of cubic polynomials with coefficients from {1..n} for which all three roots are integers.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 4, 5, 7, 8, 10, 12, 13, 15, 19, 21, 23, 25, 27, 30, 34, 36, 39, 44, 46, 49, 54, 57, 60, 64, 67, 72, 76, 79, 85, 91, 92, 95, 100, 106, 109, 115, 117, 122, 129, 132, 136, 147, 150, 154, 159, 163, 166, 174, 180, 187, 191, 194, 199, 210, 211, 216
Offset: 1

Views

Author

N. J. A. Sloane, Feb 22 2014

Keywords

Comments

A generalization of A006218 and A238096.

Crossrefs

Programs

  • PARI
    f(n) = if( n<1, 0, sum(a1=1, n, sum(a2=1, n, sum(a3=1, n, vecmax([a1, a2, a3]) == n && vecsum( factor( Pol([1, a1, a2, a3]))[, 2]) == 3)))); \\ A238097
    a(n) = sum(k=1, n, (n\k)*f(k));
    lista(nn) = my(v = vector(nn, k, f(k))); vector(nn, i, sum(k=1, i, (i\k)*v[k])); \\ Michel Marcus, Sep 28 2023

Formula

a(n) = Sum_{k=1..n} floor(n/k)*A238097(k).