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.
%I A284362 #28 Apr 12 2024 04:36:43 %S A284362 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, %T A284362 30,42,32,1,12,18,48,73,38,20,14,6,42,56,44,12,6,24,48,91,57,31,18,14, %U A284362 54,79,72,8,20,30,60,114,62,32,8,1,84,84,68,18,24,48,72 %N A284362 a(n) = Sum_{d|n, d = 0, 1, or 5 mod 6} d. %H A284362 Seiichi Manyama, <a href="/A284362/b284362.txt">Table of n, a(n) for n = 1..10000</a> %F A284362 From _Peter Bala_, Dec 11 2020: (Start) %F A284362 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)) ). %F A284362 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) %F A284362 Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/24 = A222171 = 0.411233... . - _Amiram Eldar_, Apr 12 2024 %e A284362 From _Peter Bala_, Dec 11 2020: (Start) %e A284362 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; %e A284362 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; %e A284362 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) %t A284362 Table[Sum[If[Mod[d, 6] <2 || Mod[d, 6]==5, d, 0], {d, Divisors[n]}], {n, 80}] (* _Indranil Ghosh_, Mar 25 2017 *) %o A284362 (PARI) a(n) = sumdiv(n, d, ((d + 1) % 6 < 3) * d); \\ _Amiram Eldar_, Apr 12 2024 %Y A284362 Cf. A089802 (f(-x, -x^5)), A195848 (1/f(-x, -x^5)), A222171. %Y A284362 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). %K A284362 nonn,easy %O A284362 1,5 %A A284362 _Seiichi Manyama_, Mar 25 2017