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.

A374968 a(n) = 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, 3, 2, 9, 6, 11, 12, 21, 14, 21, 24, 29, 24, 33, 26, 45, 36, 41, 42, 51, 38, 57, 60, 65, 54, 63, 56, 75, 72, 71, 78, 93, 68, 87, 78, 95, 90, 99, 92, 111, 102, 101, 108, 123, 92, 129, 126, 137, 120, 129, 122, 141, 138, 137, 132, 159, 134, 159, 156, 161, 156, 171, 146, 189, 156, 167, 174, 189
Offset: 0

Views

Author

Thomas Scheuerle, Jul 26 2024

Keywords

Comments

For n > 3, a(n) can be a prime number only if n can be divided by 6. If n cannot be divided by 6 then a(n) has at least one divisors of the set {2, 3}.
a(c^n) for some constant c can be expressed as a linear recurrence with constant coefficients.

Crossrefs

Programs

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

Formula

a(n) = -3*((n+1) Mod 2) + Sum_{k=1..n} ((k*(k+1)/2) Mod n)*6/n, for n > 0.
a(2^n) = A068156(n).
a(3^n) has the ordinary generating function: x*(-6*x - 2)/(9*x^4 - 12*x^3 + 4*x - 1).
a(5^n) has the ordinary generating function: x*(-18*x - 6)/(25*x^4 - 30*x^3 + 6*x - 1).
a(6^n) has the ordinary generating function: x*(9*x^2 - 18*x - 11)/(18*x^4 - 21*x^3 - 3*x^2 + 7*x - 1).
a(n) = n^2 - A374981(n)*6 - 1.