A175497 Numbers k with the property that k^2 is a product of two distinct triangular numbers.
0, 6, 30, 35, 84, 180, 204, 210, 297, 330, 546, 840, 1170, 1189, 1224, 1710, 2310, 2940, 2970, 3036, 3230, 3900, 4914, 6090, 6930, 7134, 7140, 7245, 7440, 8976, 10710, 12654, 14175, 14820, 16296, 16380, 17220, 19866, 22770, 25172, 25944, 29103
Offset: 1
Keywords
Links
- R. J. Mathar, Table of n, a(n) for n = 1..1000 replacing a b-file of _Robert G. Wilson v_ of 2010.
- R. J. Mathar, OEIS A175497, Mar 16 2023
- Project Euler, Problem 833. Square Triangle Products.
- M. Ulas, On certain diophantine equations related to triangular and tetrahedral numbers, arXiv:0811.2477 [math.NT], 2008. Theorem 5.6.
Crossrefs
Programs
-
Maple
isA175497 := proc(n) local i,Ti,Tj; if n = 0 then return true; end if; for i from 1 do Ti := i*(i+1)/2 ; if Ti > n^2 then return false; else Tj := n^2/Ti ; if Tj <> Ti and type(Tj,'integer') then if isA000217(Tj) then # code in A000217 return true; end if; end if; end if; end do: end proc: for n from 0 do if isA175497(n) then printf("%d,\n",n); end if; end do: # R. J. Mathar, May 26 2016
-
Mathematica
triangularQ[n_] := IntegerQ[Sqrt[8n + 1]]; okQ[n_] := Module[{i, Ti, Tj}, If[n == 0, Return[True]]; For[i = 1, True, i++, Ti = i(i+1)/2; If[Ti > n^2, Return[False], Tj = n^2/Ti; If[Tj != Ti && IntegerQ[Tj], If[ triangularQ[Tj], Return[True]]]]]]; Reap[For[k = 0, k < 30000, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Jun 13 2023, after R. J. Mathar *)
-
Python
from itertools import count, islice, takewhile from sympy import divisors from sympy.ntheory.primetest import is_square def A175497_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda k:not k or any(map(lambda d: is_square((d<<3)+1) and is_square((k**2//d<<3)+1), takewhile(lambda d:d**2
A175497_list = list(islice(A175497_gen(),20)) # Chai Wah Wu, Mar 13 2023 -
Python
def A175497_list(n): def A322699_A(k, n): p, q, r, m = 0, k, 4*k*(k+1), 0 while m < n: p, q, r = q, r, (4*k+3)*(r-q) + p m += 1 return p def a(k, n, j): if n == 0: return 0 p = A322699_A(k, n)*(A322699_A(k, n)+1)*(2*k+1) - a(k, n-1, 1) q = (4*k+2)*p - A322699_A(k, n)*(A322699_A(k, n)+1)//2 m = 1 while m < j: p, q = q, (4*k+2)*q - p; m += 1 return p A = set([a(k, 1, 1) for k in range(n+1)]) k, l, m = 1, 1, 2 while True: x = a(k, l, m) if x < max(A): A |= {x} A = set(sorted(A)[:n+1]) m += 1 else: if m == 1 and l == 1: if k > n: return sorted(A) k += 1 elif m > 1: l += 1; m = 1 elif l > 1: k += 1; l, m = 1, 1 # Onur Ozkan, Mar 15 2023
Formula
a(n)^2 = A169836(n). - R. J. Mathar, Mar 12 2023
Comments