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.

A284362 a(n) = Sum_{d|n, d = 0, 1, or 5 mod 6} d.

Original entry on oeis.org

1, 1, 1, 1, 6, 7, 8, 1, 1, 6, 12, 19, 14, 8, 6, 1, 18, 25, 20, 6, 8, 12, 24, 43, 31, 14, 1, 8, 30, 42, 32, 1, 12, 18, 48, 73, 38, 20, 14, 6, 42, 56, 44, 12, 6, 24, 48, 91, 57, 31, 18, 14, 54, 79, 72, 8, 20, 30, 60, 114, 62, 32, 8, 1, 84, 84, 68, 18, 24, 48, 72
Offset: 1

Views

Author

Seiichi Manyama, Mar 25 2017

Keywords

Examples

			From _Peter Bala_, Dec 11 2020: (Start)
n = 20: n is not of the form m*(3*m +- 2), so e(n) = 0 and a(20) = a(19) + a(15) - a(12) - a(4) = 20 + 6 - 19 - 1 = 6;
n = 21: n = m*(3*m - 2) for m = 3, so e(n) = 21 and a(21) = 21 + a(20) + a(16) - a(13) - a(5) = 21 + 6 + 1 - 14 - 6 = 8;
n = 40: n = m*(3*m - 2) for m = 4, so e(n) = -40 and a(4) = -40 + a(39) + a(35) - a(32) - a(24) + a(19) + a(7) = -40 + 14 + 48  - 1 - 43 + 20 + 8 = 6. (End)
		

Crossrefs

Cf. A089802 (f(-x, -x^5)), A195848 (1/f(-x, -x^5)), A222171.
Cf. Sum_{d|n, d = 0, 1, or k-1 mod k} d: A000203 (k=3), A284361 (k=5), this sequence (k=6), A284363 (k=7), A284372 (k=12).

Programs

  • Mathematica
    Table[Sum[If[Mod[d, 6] <2 || Mod[d, 6]==5, d, 0], {d, Divisors[n]}], {n, 80}] (* Indranil Ghosh, Mar 25 2017 *)
  • PARI
    a(n) = sumdiv(n, d, ((d + 1) % 6 < 3) * d); \\ Amiram Eldar, Apr 12 2024

Formula

From Peter Bala, Dec 11 2020: (Start)
O.g.f.: Sum_{k >= 1} ( (6*k)*x^(6*k)/(1 - x^(6*k)) + (6*k-1)*x^(6*k-1)/(1 - x^(6*k-1)) + (6*k-5)*x^(6*k-5)/(1 - x^(6*k-5)) ).
Define a(n) = 0 for n < 1. Then a(n) = e(n) + a(n-1) + a(n-5) - a(n-8) - a(n-16) + + - -, where [1, 5, 8, 16, ...] is the sequence of generalized octagonal numbers A001082, and e(n) = (-1)^(m+1)*n if n is a generalized octagonal number of the form m*(3*m+-2); otherwise e(n) = 0. Examples of this recurrence are given below. (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/24 = A222171 = 0.411233... . - Amiram Eldar, Apr 12 2024