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.

Showing 1-5 of 5 results.

A317854 Let b(1) = b(2) = 1; for n >= 3, b(n) = n - b(t(n)) - b(n-t(n)) where t = A287422. a(n) = 2*b(n) - n.

Original entry on oeis.org

1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, 0, 1, 0, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 0, 1, 0, -1, 0, -1, -2, -3, -4, -3, -2, -1, -2, -3, -2, -3, -4, -5, -6, -5, -4, -3, -2, -3, -2, -1, -2, -3, -4, -3, -2, -1, 0, -1, 0, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 4, 5
Offset: 1

Views

Author

Altug Alkan, Aug 09 2018

Keywords

Comments

A different version of A317742. Similar to A317754.

Crossrefs

Programs

  • Maple
    t:= proc(n) option remember; `if`(n<3, 1,
          n -t(t(n-1)) -t(n-t(n-1)))
        end:
    b:= proc(n) option remember; `if`(n<3, 1,
          n -b(t(n)) -b(n-t(n)))
        end:
    seq(2*b(n)-n, n=1..100); # after Alois P. Heinz at A317686
  • Mathematica
    t[1]=t[2]=1; t[n_] := t[n] = n - t[t[n-1]] - t[n - t[n-1]]; b[1]=b[2]=1; b[n_] := b[n] = n - b[t[n]] - b[n - t[n]]; a[n_] := 2*b[n] - n; Array[a, 95] (* Giovanni Resta, Aug 14 2018 *)
  • PARI
    t=vector(99); t[1]=t[2]=1; for(n=3, #t, t[n] = n-t[n-t[n-1]]-t[t[n-1]]); b=vector(99); b[1]=b[2]=1; for(n=3, #b, b[n] = n-b[t[n]]-b[n-t[n]]); vector(99, k, 2*b[k]-k)
    (C++) See Links section.

Formula

abs(a(n)) = A317742(n).

A318056 Let b(1) = b(2) = 1; for n >= 3, b(n) = n - b(t(n)) - b(n-t(n-1)) where t = A004001. a(n) = 2*b(n) - n.

Original entry on oeis.org

1, 0, -1, 0, 1, 0, 1, 0, -3, -2, -3, -2, -1, 0, -1, 0, 5, 4, 5, 4, 5, 2, 1, 2, 3, 4, 3, 0, 1, 0, 1, 0, -11, -10, -11, -10, -11, -10, -7, -6, -7, -6, -9, -10, -9, -8, -7, -8, -3, -4, -3, -2, -1, -2, -5, -4, -5, -4, -1, 0, -1, 0, -1, 0, 21, 20, 21, 20, 21, 20, 21, 16, 15, 16, 15, 16, 19, 20, 19, 20
Offset: 1

Views

Author

Altug Alkan, Aug 14 2018

Keywords

Crossrefs

Programs

  • Maple
    t:= proc(n) option remember; `if`(n<3, 1,
          t(t(n-1)) +t(n-t(n-1)))
        end:
    b:= proc(n) option remember; `if`(n<3, 1,
          n -b(t(n)) -b(n-t(n-1)))
        end:
    seq(2*b(n)-n, n=1..100); # after Alois P. Heinz at A317686
  • Mathematica
    t[1]=t[2]=1; t[n_] := t[n] = t[t[n-1]] + t[n - t[n-1]]; b[1]=b[2]=1; b[n_] := b[n] = n - b[t[n]] - b[n - t[n-1]]; a[n_] := 2*b[n] - n; Array[a, 95] (* after Giovanni Resta at A317854 *)
  • PARI
    t=vector(99); t[1]=t[2]=1; for(n=3, #t, t[n] = t[n-t[n-1]]+t[t[n-1]]); b=vector(99); b[1]=b[2]=1; for(n=3, #b, b[n] = n-b[t[n]]-b[n-t[n-1]]);vector(99, k, 2*b[k]-k)

A319020 Let b_i(k) = 1 for k <= i; for n > i, b_i(n) = b_i(t(n)) + b_i(n-t(n)) where t = A063882. a(n) = 3*b_2(n)-2*n if n is even, a(n) = 3*b_4(n)-n if n is odd.

Original entry on oeis.org

2, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, 1, 0, 2, -1, 0, 1, -2, 0, -1, -1, 0, -2, 1, 0, -1, 2, -3, 1, 1, -3, 2, -1, 3, -2, 1, 0, -1, -1, 0, 1, -2, 0, 2, -1, 0, -2, 1, 0, -1, -1, 0, -2, 1, 0, -1, 2, 0, 1, -2, 3, -1, -1, 3, -2, 1, -3, 2, -1, 0, 1, -2, 0, 2, -4, 3, -2, 4, -3, 2, -1, 0, -2
Offset: 1

Views

Author

Altug Alkan, Sep 08 2018

Keywords

Crossrefs

Programs

  • PARI
    t=f=g=vector(200); t[1]=t[2]=t[3]=t[4]=1; for(n=5, #t, t[n] = t[n-t[n-1]]+t[n-t[n-4]]); f[1]=f[2]=1; for(n=3, #f, f[n] = f[t[n]]+f[n-t[n]]); g[1]=g[2]=g[3]=g[4]=1; for(n=5, #g, g[n] = g[t[n]]+g[n-t[n]]); vector(200, n, if(n%2==0, 3*f[n]-2*n,3*g[n]-n))

A317161 Let b(1) = b(2) = 1; for n >= 3, b(n) = n - b(t(n)) - b(n-t(n)) where t = A005185. a(n) = 2*b(n) - n.

Original entry on oeis.org

1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 2, 1, 0, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -1, 0, 1, -2, -1, 0, -1, -2, -3, -2, -1, 0, 1, 0, -1, 0, -1, -2, 1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 2, 1, 0, 3, 0, 1, 2, 1, 2, 3, 2, 1, 2, 3, 0, 3, 2, 3, 4, 1, 2, 1, 0, -1, 0, 1, 0, 3, 0, -1
Offset: 1

Views

Author

Altug Alkan, Aug 07 2018

Keywords

Comments

If there is a limiting value l such that lim_{n->infinity} b(n)/n = lim_{n->infinity} t(n)/n = l, then l = 1/2. So this sequence has definition a(n) = 2*b(n) - n.

Crossrefs

Programs

  • Mathematica
    Block[{t = NestWhile[Function[{a, n}, Append[a, a[[n - a[[-1]] ]] + a[[n - a[[-2]] ]] ] ] @@ {#, Length@ # + 1} &, {1, 1}, Last@ # < 65 &], b}, b = NestWhile[Function[{b, n}, Append[b, n - b[[t[[n]] ]] - b[[n - t[[n]] ]] ] ] @@ {#, Length@ # + 1} &, {1, 1}, Length@ # < Length@ t &]; Array[2 b[[#]] - # &, Length@ b] ] (* Michael De Vlieger, Aug 08 2018 *)
  • PARI
    t=vector(99); t[1]=t[2]=1; for(n=3, #t, t[n] = t[n-t[n-1]]+t[n-t[n-2]]); b=vector(99); b[1]=b[2]=1; for(n=3, #b, b[n] = n-b[t[n]]-b[n-t[n]]); vector(99, k, 2*b[k]-k)

A317921 a(1) = a(2) = 1; for n >= 3, a(n) = 3*a(t(n)) - a(n-t(n)) where t = A004001.

Original entry on oeis.org

1, 1, 2, 2, 5, 5, 4, 4, 13, 13, 10, 7, 7, 7, 8, 8, 35, 35, 26, 17, 8, 8, 8, 8, 11, 14, 17, 17, 17, 17, 16, 16, 97, 97, 70, 43, 16, -11, -11, -11, -11, -11, -2, 7, 16, 25, 34, 43, 43, 43, 43, 43, 43, 43, 40, 37, 34, 31, 31, 31, 31, 31, 32, 32, 275, 275, 194, 113, 32, -49, -130, -130, -130, -130, -130
Offset: 1

Views

Author

Altug Alkan, Aug 11 2018

Keywords

Comments

Sequence has a fractal-like structure. Each generation (between consecutive powers of 2) provides a pattern which looks like an EKG signal since maximum value of a(n) (in corresponding generation) is damped step by step.

Crossrefs

Programs

  • PARI
    t=vector(99); t[1]=t[2]=1; for(n=3, #t, t[n] = t[n-t[n-1]]+t[t[n-1]]); a=vector(99); a[1]=a[2]=1; for(n=3, #a, a[n] = 3*a[t[n]]-a[n-t[n]]); a
Showing 1-5 of 5 results.