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 A330657 #39 Jan 05 2025 19:51:41 %S A330657 0,0,0,1,1,0,2,0,0,1,0,1,1,1,0,1,2,0,2,1,1,3,1,0,2,3,0,3,1,1,2,1,1,1, %T A330657 2,1,3,1,2,2,1,2,1,1,1,1,3,2,2,2,1,4,1,0,2,1,2,1,1,1,3,2,2,1,3,1,3,2, %U A330657 1,6,1,1,1,3,2 %N A330657 Number of ways the n-th pentagonal number A000326(n) can be written as the difference of two positive pentagonal numbers. %C A330657 Equivalently, a(n) is the number of triples [n,k,m] with k>0 satisfying the Diophantine equation n*(3*n-1) + k*(3*k-1) - m*(3*m-1) = 0. Any such triple satisfies a triangle inequality, n+k > m. The n for which there is a triple [n,n,m] are listed in A137694. Solutions of the form [n,m-1,m] appear only when n=3*z+1, z > 0. The n for which a(n)=0 are listed in A135768. %D A330657 N. J. A. Sloane et al., "sum of 2 triangular numbers is a triangular number", math-fun mailing list, Feb. 19-29, 2020. %H A330657 Chai Wah Wu, <a href="/A330657/b330657.txt">Table of n, a(n) for n = 1..10000</a> %H A330657 B. Klee, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2020-March/020564.html">Pentathagorean triples: two easy proofs</a>, seqfan mailing list, Mar. 20, 2020. %H A330657 M. A. Nyblom, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/39-3/nyblom.pdf">On the representation of the integers as a difference of nonconsecutive triangular numbers</a>, Fibonacci Quarterly 39:3 (2001), pp. 256-263. %e A330657 Isosceles case, n=5: 2*5*(3*5-1) - 7*(3*7-1) = 0. %t A330657 PentaTriples[PNn_] := Sort[Select[{PNn, %t A330657 (-PNn + 3 PNn^2 + # - 3 #^2)/(6 #), %t A330657 (-PNn + 3 PNn^2 + # + 3 #^2)/(6 #) %t A330657 } & /@ Divisors[PNn*(3*PNn - 1)], %t A330657 And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]] %t A330657 Length[PentaTriples[#]] & /@ Range[100] %t A330657 a[n_] := Length@FindInstance[n > 0 && y > 0 && z > 0 && %t A330657 n (3 n - 1) + y (3 y - 1) == z (3 z - 1), {y, z}, Integers, 10^9]; %t A330657 a /@ Range[100] %Y A330657 Cf. A046079, A309507, A000326. %K A330657 nonn %O A330657 1,7 %A A330657 _Bradley Klee_, Mar 01 2020