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.

A178144 Sum of divisors d of n which are d=2, 3 or 5.

This page as a plain text file.
%I A178144 #25 Dec 20 2024 02:40:07
%S A178144 0,2,3,2,5,5,0,2,3,7,0,5,0,2,8,2,0,5,0,7,3,2,0,5,5,2,3,2,0,10,0,2,3,2,
%T A178144 5,5,0,2,3,7,0,5,0,2,8,2,0,5,0,7,3,2,0,5,5,2,3,2,0,10,0,2,3,2,5,5,0,2,
%U A178144 3,7,0,5,0,2,8,2,0,5,0,7,3,2,0,5,5,2,3,2,0,10,0,2,3,2,5,5,0,2,3,7,0,5,0,2,8
%N A178144 Sum of divisors d of n which are d=2, 3 or 5.
%C A178144 The sequence is periodic with period length 30.
%H A178144 G. C. Greubel, <a href="/A178144/b178144.txt">Table of n, a(n) for n = 1..10000</a>
%H A178144 Vladimir Shevelev, <a href="http://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 A178144 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-2,-1,0,1,2,2,1).
%F A178144 From _R. J. Mathar_, Jul 23 2012: (Start)
%F A178144 a(n) = -2*a(n-1) -2*a(n-2) -a(n-3) +a(n-5) +2*a(n-6) +2*a(n-7) +a(n-8).
%F A178144 G.f.: ( -x*(2+7*x+12*x^2+17*x^3+22*x^4+10*x^6+20*x^5) ) / ( (x-1)*(1+x)*(1+x+x^2)*(x^4+x^3+x^2+x+1) ). (End)
%p A178144 A178144 := proc(n)
%p A178144     local a;
%p A178144     a := 0 ;
%p A178144     for d in {2,3,5} do
%p A178144         if (n mod d) = 0 then
%p A178144             a := a+d ;
%p A178144         end if;
%p A178144     end do:
%p A178144     a ;
%p A178144 end proc: # _R. J. Mathar_, Jul 23 2012
%t A178144 a[n_] := DivisorSum[n, Boole[MatchQ[#, 2|3|5]]*#&];
%t A178144 Array[a, 105] (* _Jean-François Alcover_, Nov 24 2017 *)
%t A178144 a[n_] := Sum[d * Boole[Divisible[n, d]], {d, {2, 3, 5}}]; Array[a, 100] (* _Amiram Eldar_, Dec 20 2024 *)
%o A178144 (PARI) a(n) = sumdiv(n, d, if ((d==2) || (d==3) || (d==5), d)); \\ _Michel Marcus_, Nov 24 2017
%o A178144 (PARI) a(n) = my(d = [2, 3, 5]); sum(k = 1, 3, d[k] * !(n % d[k])); \\ _Amiram Eldar_, Dec 20 2024
%Y A178144 Cf. A000203, A008472, A178143, A171182, A178142.
%K A178144 nonn,easy
%O A178144 1,2
%A A178144 _Vladimir Shevelev_, May 21 2010