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.

A269735 G.f.: Sum_{k >= 0} x^(2^k)*(1-x^(2^k))/(1+x^(2^k)).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 11 2016

Keywords

Comments

Second differences of A268289.

Crossrefs

Programs

  • Maple
    t7:=add(x^(2^k)*(1-x^(2^k))/(1+x^(2^k)),k=0..12);
    t8:=series(t7,x,256);
    # second Maple program:
    b:= proc(n) option remember; `if`(n<0, 0,
          add(2*i-1, i=Bits[Split](n)))
        end:
    a:= n-> b(n)-b(n-1):
    seq(a(n), n=0..92);  # Alois P. Heinz, Jan 18 2022
  • Mathematica
    Join[{0, 0}, Table[DigitCount[n, 2, 1] - DigitCount[n, 2, 0], {n, 1, 100}]] // Differences (* Jean-François Alcover, Jun 27 2022 *)
  • PARI
    up_to = 1024;
    A268289list(up_to) =  { my(v=vector(up_to), s = 1); v[1] = s; for(n=2, up_to, s += (2*hammingweight(n) - #binary(n)); v[n] = s); (v); };
    v268289 = A268289list(up_to+1);
    A268289(n) = if(!n,n,v268289[n]);
    almost_firstdiffs_of_A268289(n) = if(!n,1,v268289[n+1]-v268289[n]);
    A269735(n) = if(n<=1,n,almost_firstdiffs_of_A268289(n-1)-almost_firstdiffs_of_A268289(n-2)); \\ Antti Karttunen, Sep 30 2018
    
  • PARI
    up_to_k = 16;
    up_to = 1+(2^up_to_k);
    x='x+O('x^(up_to+1));
    v269735 = Vec(sum(k=0,up_to_k,x^(2^k)*(1-x^(2^k))/(1+x^(2^k))));
    A269735(n) = if(!n,n,v269735[n]); \\ Antti Karttunen, Oct 01 2018