%I #17 Jan 02 2024 02:47:47
%S 1,1,1,1,2,1,1,1,1,2,1,2,1,1,2,1,1,1,1,2,1,2,1,2,2,1,1,1,1,2,1,1,1,1,
%T 3,2,1,1,1,2,1,1,1,2,2,1,1,2,1,2,2,1,1,1,2,1,1,1,1,3,1,1,1,1,2,2,1,1,
%U 1,4,1,2,1,1,2,1,1,1,1,2,1,1,1,2,2,1,1,2,1,2,1,2,1,1,2,2,1,1,1,2,1,2,1,1,3,1,1,2,1,3,1,1,1,1,2,1,2,1,1,3
%N Number of pentagonal numbers dividing n.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PentagonalNumber.html">Pentagonal Number</a>.
%H <a href="/index/Pol#polygonal_numbers">Index to sequences related to polygonal numbers</a>.
%F G.f.: Sum_{k>=1} x^(k*(3*k-1)/2)/(1 - x^(k*(3*k-1)/2)).
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3*log(3) - Pi/sqrt(3) = 1.482037... (A244641). - _Amiram Eldar_, Jan 02 2024
%e a(12) = 2 because 12 has 6 divisors {1,2,3,4,6,12} among which 2 divisors {1,12} are pentagonal numbers.
%t Rest[CoefficientList[Series[Sum[x^(k (3k -1)/2)/(1 - x^(k (3k -1)/2)), {k, 120}], {x, 0, 120}], x]]
%t Table[Count[Divisors[n],_?(IntegerQ[(1+Sqrt[1+24#])/6]&)],{n,120}] (* _Harvey P. Dale_, Jan 05 2022 *)
%o (PARI) a(n) = sumdiv(n, d, ispolygonal(d, 5)); \\ _Michel Marcus_, Jul 27 2022
%Y Cf. A000326, A007862, A046951, A244641.
%K nonn,easy
%O 1,5
%A _Ilya Gutkovskiy_, Dec 13 2016