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.

A099004 First differences of A081145.

Original entry on oeis.org

1, 2, 3, -4, 5, 6, -9, 7, 8, -14, 10, 11, -18, 12, 13, -24, 15, 16, -30, 17, 19, -34, 20, 21, -39, 22, 23, -43, 25, 26, -50, 27, 28, -54, 29, 31, -57, 33, -32, 35, 36, -70, 37, 38, -73, 40, 41, -78, 42, 44, -85, 45, 46, -90, 47, 48, -94, 49, 51, -97, 52, 53, -104, 55, 56, -109, 58, 59, -116, 61, -60, 62, 63
Offset: 1

Views

Author

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

Keywords

Comments

Does every number appear in the sequence of absolute values (see A308007)?

Crossrefs

Programs

  • Mathematica
    f[s_] := Block[{k = 1, d = Abs[Most@s - Rest@s], l = Last@s}, While[MemberQ[s, k] || MemberQ[d, Abs[l - k]], k++ ]; Append[s, k]]; t = Nest[f, {1}, 75]; Rest@t - Most@t (* Robert G. Wilson v, Jun 13 2006 *)
  • Python
    A099004_list, l, s, b1, b2 = [1], 2, 3, set(), set([1])
    for n in range(2, 5*10**3+1):
        i = s
        while True:
            m = abs(i-l)
            if not (i in b1 or m in b2):
                A099004_list.append(i-l)
                b1.add(i)
                b2.add(m)
                l = i
                while s in b1:
                    b1.remove(s)
                    s += 1
                break
            i += 1 # Chai Wah Wu, Dec 15 2014

Extensions

Edited by N. J. A. Sloane, Apr 08 2006
More terms from Robert G. Wilson v, Jun 13 2006