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.

A179682 Least integer, k, greater than n such that t(k)*t(n) form a perfect square; t(i) is the i-th triangular number (A000217).

Original entry on oeis.org

1, 8, 24, 48, 80, 120, 168, 224, 49, 360, 440, 528, 624, 728, 840, 960, 1088, 1224, 1368, 1520, 1680, 1848, 2024, 2208, 242, 2600, 2808, 3024, 3248, 3480, 3720, 3968, 4224, 4488, 4760, 5040, 5328, 5624, 5928, 6240, 6560, 6888, 7224, 7568, 7920, 8280, 8648
Offset: 0

Views

Author

Robert G. Wilson v, Jul 24 2010

Keywords

Comments

It appears that a(n) = A033996(n) for most n. - Robert Israel, Feb 15 2019

Crossrefs

Programs

  • Maple
    f:= proc(n) local F,t,p,k0,d,k,a,j;
      p:= max(map(t -> `if`(t[2]::odd, t[1],NULL), [op(ifactors(n)[2]),op(ifactors(n+1)[2])]));
      if n mod p = 0 then k0:= n+p-1; d:= 1;
        else  k0:= n+1; d:= p-1;
      fi;
      t:= n*(n+1)/4;
      for a from k0 by p do
        for k in [a, a+d] do
           if issqr(k*(k+1)*t) then return k fi
      od od
    end proc:
    f(0):= 1:
    map(f, [$0..100]); # Robert Israel, Feb 15 2019
  • Mathematica
    f[n_] := Block[{k = n + 1, n2 = n (n + 1)/2}, While[ !IntegerQ@ Sqrt[n2*k (k + 1)/2], k++ ]; k]; Array[f, 47, 0]
  • Python
    from sympy.ntheory.primetest import is_square
    def A179682(n):
        m = n*(n+1)>>1
        k = n+1
        while not is_square(m*k*(k+1)>>1):
            k += 1
        return k # Chai Wah Wu, Mar 13 2023

Formula

From Robert Israel, Feb 15 2019: (Start)
a(n) <= A033996(n).
If n = A033996(j) then a(n) <= A033996(a(j)).
If n = a(j) < A033996(j) then a(n) <= A033996(j).
(End)

Extensions

Incorrect empirical g.f. removed by Robert Israel, Feb 15 2019