cp's OEIS Frontend

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.

A169835 Perfect squares that are a product of two triangular numbers.

Original entry on oeis.org

1, 9, 36, 100, 225, 441, 784, 900, 1225, 1296, 2025, 3025, 4356, 6084, 7056, 8281, 11025, 14400, 18496, 23409, 29241, 32400, 36100, 41616, 44100, 53361, 64009, 76176, 88209, 90000, 105625, 108900, 123201, 142884, 164836, 189225, 216225, 246016, 278784, 298116
Offset: 1

Views

Author

R. J. Mathar, May 30 2010

Keywords

Comments

Includes (except for 0) A000537 and 3/2*x*(x+1) for x in A132596. - Robert Israel, Jan 16 2015

Crossrefs

Superset of A000537. Cf. A000217, A132596, A169836.

Programs

  • Haskell
    a169835 n = a169835_list !! (n-1)
    a169835_list = f [] (tail a000217_list) (tail a000290_list) where
       f ts us'@(u:us) vs'@(v:vs)
         | u <= v = f (u : ts) us vs'
         | any p $ map (divMod v) ts = v : f ts us' vs
         | otherwise = f ts us' vs
         where p (q, r) = r == 0 && a010054 q == 1
    -- Reinhard Zumkeller, Mar 03 2015
    
  • Maple
    N:= 10^6: # to get all terms <= N
    A:= select(issqr,{seq(seq(a*(a+1)*b*(b+1)/4,
        b = a .. floor(sqrt(1/4+4*N/a/(a+1))-1/2)),a=1..floor(sqrt(4*N)))});
    # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(A, list)); # Robert Israel, Jan 16 2015
  • Mathematica
    M = 10^6; (* to get all terms <= M *)
    A = Union[Select[Flatten[Table[Table[(1/4) a (a+1) b (b+1), {b, a, Floor[ Sqrt[1/4 + 4M/(a (a+1))] - 1/2]}], {a, 1, Floor[Sqrt[4M]]}]], IntegerQ[ Sqrt[#]]&]] (* Jean-François Alcover, Mar 09 2019, after Robert Israel *)
  • PARI
    istriangular(n)=issquare(8*n+1) \\ now one can use ispolygonal(n, 3)
    isok(n) = {if (issquare(n), fordiv(n, d, if (d > sqrtint(n), break); if (istriangular(d) && istriangular(n/d), return (1)););); return (0);} \\ Michel Marcus, Jul 24 2013
    
  • Python
    from itertools import count, islice, takewhile
    from sympy import divisors
    from sympy.ntheory.primetest import is_square
    def A169835_gen(): # generator of terms
        return filter(lambda k:any(map(lambda d: is_square((d<<3)+1) and is_square((k//d<<3)+1), takewhile(lambda d:d**2<=k,divisors(k)))),(m**2 for m in count(0)))
    A169835_list = list(islice(A169835_gen(),20)) # Chai Wah Wu, Mar 13 2023

Extensions

Corrected (missing terms inserted) by R. J. Mathar, Jun 04 2010