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.

A214961 a(0)=a(1)=1, a(n) = least k > a(n-1) such that k*a(n-2) is a triangular number.

Original entry on oeis.org

1, 1, 3, 6, 7, 11, 13, 21, 25, 30, 49, 59, 97, 117, 193, 233, 385, 465, 492, 596, 983, 1191, 1965, 2381, 2516, 4761, 5031, 5761, 6290, 8466, 9795, 15470, 15867, 17403, 20559, 24170, 26945, 27192, 27755, 30130, 35235, 43537, 45100, 56805, 58717, 58739, 91000, 117477
Offset: 0

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(a,b)
      local s;
      s:= map(t -> rhs(op(t)), [msolve(x^2=1, 8*a)]);
      min(select(`>`, map(t -> (t^2-1)/(8*a), s), b))
    end proc:
    A[0]:= 1: A[1]:= 1:
    for nn from 2 to 100 do
      A[nn]:= f(A[nn-2],A[nn-1])
    od:
    seq(A[i],i=0..100); # Robert Israel, Jun 17 2020
  • Mathematica
    a[0]=a[1]=1;a[n_]:=a[n]=(k=a[n-1]+1;While[!IntegerQ@Sqrt[1+8*a[n-2]k],k++];k);Array[a,50,0] (* Giorgos Kalogeropoulos, May 21 2021 *)
    lktn[{a_,b_}]:=Module[{k=b+1},While[!OddQ[Sqrt[8a k+1]],k++];{b,k}]; NestList[lktn,{1,1},50][[;;,1]] (* Harvey P. Dale, Sep 09 2023 *)
  • Python
    prpr = prev = 1
    for n in range(1, 55):
        print(prpr, end=', ')
        b = k = 0
        while k<=prev:
            d = b*(b+1)//2
            k = 0
            if d%prpr==0:
                k = d // prpr
            b += 1
        prpr = prev
        prev = k