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.

A178143 Sum of squares d^2 over the divisors d=2 and/or d=3 of n.

Original entry on oeis.org

0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4, 0, 13, 0, 4, 9, 4
Offset: 1

Views

Author

Vladimir Shevelev, May 21 2010

Keywords

Comments

Period 6: repeat [0, 4, 9, 4, 0, 13]. - Wesley Ivan Hurt, Jul 05 2016

Examples

			a(1)=0, a(2)=2^2=4 since 2|2, a(3)=3^2=9 since 3|3, a(4)=2^2=4 since 2|4.
		

Crossrefs

Programs

Formula

a(n) = Sum_{d|n, d=2 and/or d=3} d^2.
a(n) = -a(n-1) + a(n-3) + a(n-4) for n>4.
G.f.: x*(4+13*x+13*x^2) / ( (1-x)*(1+x)*(1+x+x^2) ).
a(n+6) = a(n).
a(n) = A010675(n) + A021115(n). [R. J. Mathar, May 28 2010]
a(n) = 4 * (1 + floor(n/2) - ceiling(n/2)) + 9 * (1 + floor(n/3) - ceiling(n/3)). - Wesley Ivan Hurt, May 20 2013
a(n) = 5 + 2*cos(n*Pi) + 6*cos(2*n*Pi/3). - Wesley Ivan Hurt, Jul 05 2016

Extensions

Replaced recurrence by a shorter one; added keyword:less - R. J. Mathar, May 28 2010