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 A178142 #24 Aug 03 2024 07:08:37 %S A178142 0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2, %T A178142 0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2, %U A178142 3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3,2,0,5,0,2,3 %N A178142 Sum over the divisors d = 2 and/or 3 of n. %C A178142 Periodic with period {0,2,3,2,0,5}. %H A178142 Vladimir Shevelev, <a href="https://arxiv.org/abs/0903.1743">A recursion for divisor function over divisors belonging to a prescribed finite sequence of positive integers and a solution of the Lahiri problem for divisor function sigma_x(n)</a>, arXiv:0903.1743 [math.NT], 2009. %H A178142 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (-1,0,1,1). %F A178142 a(n) = Sum_{d|n, d=2 or d=3} d. %F A178142 a(n+6) = a(n). %F A178142 a(n) = -a(n-1) + a(n-3) + a(n-4). %F A178142 G.f.: -x*(2+5*x+5*x^2) / ( (x-1)*(1+x)*(1+x+x^2) ). %F A178142 a(n) = A010673(n) + A021337(n). - _R. J. Mathar_, May 28 2010 %F A178142 a(n) = A000203(n) - A171405(n). - _Amiram Eldar_, Aug 03 2024 %t A178142 Table[Total@ Select[Divisors@ n, 2 <= # <= 3 &], {n, 120}] (* or *) %t A178142 Table[Total[Divisors@ n /. {d_ /; d < 2 -> Nothing, d_ /; d > 3 -> Nothing} ], {n, 120}] (* _Michael De Vlieger_, Feb 07 2016 *) %t A178142 Flatten[Table[{0,2,3,2,0,5}, {16}]] (* _Amiram Eldar_, Aug 03 2024 *) %o A178142 (PARI) a(n) = sumdiv(n, d, d*((d==2) || (d==3))); \\ _Michel Marcus_, Feb 07 2016 %o A178142 (PARI) a(n) = [0,2,3,2,0,5][(n-1) % 6 + 1]; \\ _Amiram Eldar_, Aug 03 2024 %Y A178142 Cf. A000203, A008472, A010673, A021337, A171405, A178143. %K A178142 nonn,easy,less %O A178142 1,2 %A A178142 _Vladimir Shevelev_, May 21 2010 %E A178142 Replaced recurrence by a shorter one; added keyword:less - _R. J. Mathar_, May 28 2010