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.

A374981 a(n) = (n^2 - 1)/6 - Sum_{t=0..n-1} [ A000217(t)/n ], where [ x ] means the fractional part of x here.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 6, 7, 11, 13, 16, 19, 24, 27, 33, 35, 42, 47, 53, 58, 67, 71, 78, 85, 95, 102, 112, 118, 128, 138, 147, 155, 170, 178, 191, 200, 213, 224, 238, 248, 263, 277, 290, 302, 322, 331, 347, 361, 380, 395, 413, 427, 445, 463, 482, 496, 519, 534, 554, 573, 594, 612, 637, 651, 678, 698
Offset: 1

Views

Author

Thomas Scheuerle, Jul 26 2024

Keywords

Comments

a(c^n) for some constant c can be expressed as a linear recurrence with constant coefficients.

Crossrefs

Programs

  • PARI
    a(n) = (n^2-1)/6-sum(k=1,n,(k*(k+1)/2)%n)/n+((n+1)%2)/2

Formula

a(n) = (n^2 - 1 - A374968(n))/6.
a(2^n) = A006095(n).
a(3^n) has the ordinary generating function: x*(1 - 2*x + 5*x^2 + 12*x^3)/(1 - 13*x + 36*x^2 + 12*x^3 - 117*x^4 + 81*x^5).