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 A007862 #54 Jun 09 2025 14:40:57 %S A007862 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 A007862 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 A007862 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 A007862 Number of triangular numbers that divide n. %C A007862 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 A007862 Number of oblong numbers that divide 2n. - _Ray Chandler_, Jun 24 2008 %C A007862 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 A007862 From _Gus Wiseman_, May 03 2019: (Start) %C A007862 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 A007862 1 2 3 4 5 6 7 8 9 A B C %C A007862 21 42 63 4321 84 %C A007862 321 642 %C A007862 (End) %H A007862 Reinhard Zumkeller, <a href="/A007862/b007862.txt">Table of n, a(n) for n = 1..10000</a> %H A007862 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CenteredPolygonalNumber.html">Centered Polygonal Number</a>. %H A007862 Wikipedia, <a href="https://en.wikipedia.org/wiki/Arithmetic_progression">Arithmetic progression</a>. %H A007862 Gus Wiseman, <a href="/A325325/a325325.txt">Sequences counting and ranking integer partitions by the differences of their successive parts</a>. %F A007862 a(n) = Sum_{d|2*n,d+1|2*n} 1. %F A007862 G.f.: Sum_{k>=1} x^A000217(k)/(1-x^A000217(k)). - _Jon Perry_, Jul 03 2004 %F A007862 a(A130317(n)) = n and a(m) <> n for m < A130317(n). - _Reinhard Zumkeller_, May 23 2007 %F A007862 a(n) = A129308(2n). - _Ray Chandler_, Jun 24 2008 %F A007862 a(n) = Sum_{k=1..A000005(n)} A010054(A027750(n,k)). - _Reinhard Zumkeller_, Jul 05 2014 %F A007862 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - _Amiram Eldar_, Dec 31 2023 %t A007862 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 A007862 Table[Count[Divisors[k], _?(IntegerQ[Sqrt[8 # + 1]] &)], {k, 105}] (* _Jayanta Basu_, Aug 12 2013 *) %t A007862 Table[Length[Select[IntegerPartitions[n],SameQ@@Differences[Append[#,0]]&]],{n,0,30}] (* _Gus Wiseman_, May 03 2019 *) %o A007862 (Haskell) %o A007862 a007862 = sum . map a010054 . a027750_row %o A007862 -- _Reinhard Zumkeller_, Jul 05 2014 %o A007862 (PARI) a(n) = sumdiv(n, d, ispolygonal(d, 3)); \\ _Michel Marcus_, Jun 18 2015 %o A007862 (Python) %o A007862 from itertools import pairwise %o A007862 from sympy import divisors %o A007862 def A007862(n): return sum(1 for a, b in pairwise(divisors(n<<1)) if a+1==b) # _Chai Wah Wu_, Jun 09 2025 %Y A007862 Cf. A046951, A130317. %Y A007862 Cf. A010054, A027750, A000005, A239930. %Y A007862 Cf. A000217, A007294, A049988, A325324, A325327, A325407. %K A007862 nonn %O A007862 1,3 %A A007862 _Richard Stanley_ %E A007862 Extended by _Ray Chandler_, Jun 24 2008