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.

A084334 a(1) = 1; a(n+1) is the least squarefree m not already used such that |m-a(n)| is not equal to |a(k+1)-a(k)| for any k < n.

Original entry on oeis.org

1, 2, 5, 3, 7, 13, 6, 11, 19, 10, 21, 31, 14, 26, 39, 15, 29, 47, 17, 33, 53, 22, 37, 58, 23, 42, 65, 38, 66, 30, 55, 77, 34, 67, 35, 61, 95, 41, 70, 107, 43, 82, 122, 46, 87, 129, 51, 89, 133, 59, 105, 57, 102, 149, 62, 111, 161, 69, 127, 71, 123, 174, 73, 130, 183, 74
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 18 2003

Keywords

Crossrefs

Programs

  • Maple
    N:= 1000: # for terms before the first term > N
    A[1]:= 1:
    SF:= select(numtheory:-issqrfree, [$2..N]):
    DA:= {}:
    y:= 1:
    found:= true:
    for n from 2 while found do
      found:= false;
      for j from 1 to nops(SF) while not found do
        x:= SF[j];
        if not member(abs(x-y),DA) then
           found:= true;
           A[n]:= x;
           DA:= DA union {abs(x-y)};
           SF:= subsop(j=NULL, SF);
           y:= x;
        fi
    od od:
    convert(A,list); # Robert Israel, Feb 22 2024

Extensions

Edited and extended by David Wasserman, Dec 15 2004