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-1 of 1 results.

A303404 a(0) = 0, a(1) = 1; for n >= 1, a(2*n) = a(2*n-1) - 2*a(n), a(2*n+1) = n - 2*a(n).

Original entry on oeis.org

0, 1, -1, -1, 1, 4, 6, 5, 3, 2, -6, -3, -15, -6, -16, -3, -9, 2, -2, 5, 17, 22, 28, 17, 47, 42, 54, 25, 57, 46, 52, 21, 39, 34, 30, 13, 17, 22, 12, 9, -25, -14, -58, -23, -79, -34, -68, -11, -105, -70, -154, -59, -167, -82, -132, -23, -137, -86, -178, -63, -167, -74, -116, -11, -89, -46, -114, -35, -95, -26, -52, 9
Offset: 0

Views

Author

Altug Alkan, Aug 19 2018

Keywords

Comments

Inspired by A002487.
A020714 is generally determinative for block structures of this sequence.

Crossrefs

Programs

  • Maple
    A[0]:= 0: A[1]:= 1:
    for n from 1 to 50 do
      A[2*n]:= A[2*n-1]-2*A[n];
      A[2*n+1]:= n - 2*A[n]
    od:
    seq(A[i],i=0..101); # Robert Israel, Aug 20 2018
  • PARI
    a(n)=if(n<=1, n, if(n%2==0, a(n-1)-2*a(n/2), (n-1)/2-2*a((n-1)/2)));

Formula

G.f. g(x) satisfies g(x) + 2*g(x^2)*(1+x+x^2) = x + x^2 + x^3 + x^4 + 2*x^5. - Robert Israel, Aug 20 2018
Showing 1-1 of 1 results.