login
Number of triangular numbers that divide n.
63

%I #49 Dec 31 2023 06:23:12

%S 1,1,2,1,1,3,1,1,2,2,1,3,1,1,3,1,1,3,1,2,3,1,1,3,1,1,2,2,1,5,1,1,2,1,

%T 1,4,1,1,2,2,1,4,1,1,4,1,1,3,1,2,2,1,1,3,2,2,2,1,1,5,1,1,3,1,1,4,1,1,

%U 2,2,1,4,1,1,3,1,1,4,1,2,2,1,1,5,1,1,2,1,1,6,2,1,2,1,1,3,1,1,2,2,1,3,1,1,5

%N Number of triangular numbers that divide n.

%C Also a(n) is the total number of ways to represent n+1 as a centered polygonal number of the form km(m+1)/2+1 for k>1. - _Alexander Adamchuk_, Apr 26 2007

%C Number of oblong numbers that divide 2n. - _Ray Chandler_, Jun 24 2008

%C The number of divisors d of 2n such that d+1 is also a divisor of 2n, see first formula. - _Michel Marcus_, Jun 18 2015

%C From _Gus Wiseman_, May 03 2019: (Start)

%C Also the number of integer partitions of n forming a finite arithmetic progression with offset 0, i.e. the differences are all equal (with the last part taken to be 0). The Heinz numbers of these partitions are given by A325327. For example, the a(1) = 1 through a(12) = 3 partitions are (A = 10, B = 11, C = 12):

%C 1 2 3 4 5 6 7 8 9 A B C

%C 21 42 63 4321 84

%C 321 642

%C (End)

%H Reinhard Zumkeller, <a href="/A007862/b007862.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CenteredPolygonalNumber.html">Centered Polygonal Number</a>.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Arithmetic_progression">Arithmetic progression</a>.

%H Gus Wiseman, <a href="/A325325/a325325.txt">Sequences counting and ranking integer partitions by the differences of their successive parts</a>.

%F a(n) = Sum_{d|2*n,d+1|2*n} 1.

%F G.f.: Sum_{k>=1} x^A000217(k)/(1-x^A000217(k)). - _Jon Perry_, Jul 03 2004

%F a(A130317(n)) = n and a(m) <> n for m < A130317(n). - _Reinhard Zumkeller_, May 23 2007

%F a(n) = A129308(2n). - _Ray Chandler_, Jun 24 2008

%F a(n) = Sum_{k=1..A000005(n)} A010054(A027750(n,k)). - _Reinhard Zumkeller_, Jul 05 2014

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - _Amiram Eldar_, Dec 31 2023

%t sup=90; TriN=Array[ (#+1)(#+2)/2&, Floor[ N[ Sqrt[ sup*2 ] ] ]-1 ]; Array[ Function[n, 1+Count[ Map[ Mod[ n, # ]&, TriN ], 0 ] ], sup ]

%t Table[Count[Divisors[k], _?(IntegerQ[Sqrt[8 # + 1]] &)], {k, 105}] (* _Jayanta Basu_, Aug 12 2013 *)

%t Table[Length[Select[IntegerPartitions[n],SameQ@@Differences[Append[#,0]]&]],{n,0,30}] (* _Gus Wiseman_, May 03 2019 *)

%o (Haskell)

%o a007862 = sum . map a010054 . a027750_row

%o -- _Reinhard Zumkeller_, Jul 05 2014

%o (PARI) a(n) = sumdiv(n, d, ispolygonal(d, 3)); \\ _Michel Marcus_, Jun 18 2015

%Y Cf. A046951, A130317.

%Y Cf. A010054, A027750, A000005, A239930.

%Y Cf. A000217, A007294, A049988, A325324, A325327, A325407.

%K nonn

%O 1,3

%A _Richard Stanley_

%E Extended by _Ray Chandler_, Jun 24 2008