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

A104976 Row sums of A104975.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, -1, -1, 2, 2, -2, -2, 4, 4, -6, -6, 9, 9, -13, -13, 21, 21, -31, -31, 47, 47, -71, -71, 109, 109, -165, -165, 250, 250, -380, -380, 578, 578, -876, -876, 1330, 1330, -2020, -2020, 3068, 3068, -4656, -4656, 7070, 7070, -10736, -10736, 16300, 16300, -24746, -24746, 37574, 37574, -57050, -57050
Offset: 0

Views

Author

Paul Barry, Mar 30 2005

Keywords

Crossrefs

Programs

  • Mathematica
    t[n_, k_]:= t[n, k]= If[k==n, 1, ((1+(-1)^(n-k))/2)*Sum[Binomial[k, j]*t[(n-k)/2, j], {j,(n-k)/2}] ];
    S[n_]:= Sum[(-1)^j*t[n, j], {j,0,n}]; (* S = A104977 *)
    a[n_]:= a[n]= Sum[If[EvenQ[n-k], S[(n-k)/2], 0], {k,0,n}];
    Table[a[n], {n, 0, 65}] (* G. C. Greubel, Jun 08 2021 *)
  • Sage
    @CachedFunction
    def t(n,k): return 1 if (k==n) else ((1+(-1)^(n-k))/2)*sum( binomial(k, j)*t((n-k)/2, j) for j in (1..(n-k)//2) )
    def S(n): return sum( (-1)^j*t(n, j) for j in (0..n) ) # S = A104977
    def T(n,k): return S((n-k)/2) if (mod(n-k, 2)==0) else 0 # T = A104975
    def a(n): return sum( T(n,k) for k in (0..n) )
    [a(n) for n in (0..65)] # G. C. Greubel, Jun 08 2021

Formula

a(n) = Sum_{k=0..n} A104975(n, k).
G.f.: x^2/((1-x)*(Sum_{k>=1} x^(2^k))).

A104977 Defining sequence for an inverse Fredholm-Rueppel triangle.

Original entry on oeis.org

1, -1, 1, -2, 3, -4, 6, -10, 15, -22, 34, -52, 78, -118, 180, -274, 415, -630, 958, -1454, 2206, -3350, 5088, -7724, 11726, -17806, 27036, -41046, 62320, -94624, 143668, -218130, 331191, -502854, 763486, -1159206, 1760038, -2672286, 4057356, -6160326, 9353294, -14201206, 21561836
Offset: 0

Views

Author

Paul Barry, Mar 30 2005

Keywords

Comments

A104975 is the sequence array for this sequence.
abs(a(n)) is the numbers of compositions of n into parts of the form 2^k-1, see example. [Joerg Arndt, Jan 06 2013]

Examples

			G.f. = 1 - x + x^2 - 2*x^3 + 3*x^4 - 4*x^5 + 6*x^6 - 10*x^7 + 15*x^8 - 22*x^9 + 34*x^10 + ...
From _Joerg Arndt_, Jan 06 2013: (Start)
There are abs(a(8)) = 15 compositions of 8 into parts 2^k-1:
[ 1]  [ 1 1 1 1 1 1 1 1 ]
[ 2]  [ 1 1 1 1 1 3 ]
[ 3]  [ 1 1 1 1 3 1 ]
[ 4]  [ 1 1 1 3 1 1 ]
[ 5]  [ 1 1 3 1 1 1 ]
[ 6]  [ 1 1 3 3 ]
[ 7]  [ 1 3 1 1 1 1 ]
[ 8]  [ 1 3 1 3 ]
[ 9]  [ 1 3 3 1 ]
[10]  [ 1 7 ]
[11]  [ 3 1 1 1 1 1 ]
[12]  [ 3 1 1 3 ]
[13]  [ 3 1 3 1 ]
[14]  [ 3 3 1 1 ]
[15]  [ 7 1 ]
(End)
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    S:= series(x/add(x^(2^k),k=0..ilog2(N+1)),x,N+2):
    [seq](coeff(S, x, j), j = 0 .. N); # Robert Israel, Feb 07 2018
  • Mathematica
    T[n_, n_] = 1; T[n_, m_] := T[n, m] =(1 + (-1)^(n-m))/2 Sum[Binomial[m, k]* T[(n-m)/2, k], {k, 1, (n-m)/2}];
    a[n_] := Sum[T[n, m] (-1)^m, {m, 0, n}];
    Array[a, 50, 0] (* Jean-François Alcover, Jul 21 2018, after Vladimir Kruchinin *)
  • Maxima
    T(n,m):=if n=m then 1 else (1+(-1)^(n-m))/2*sum(binomial(m,k)*T((n-m)/2,k),k,1,(n-m)/2); makelist(sum(T(n,m)*(-1)^(m),m,0,n),n,0,20); /* Vladimir Kruchinin, Mar 18 2015 */
  • PARI
    N = 66;  q = 'q + O('q^N);  L = 2+ceil(log(N)/log(2));
    gf = q / sum(n=0, L, q^(2^n) );
    /* gf = 1 / (1 + sum(n=1, L, q^(2^n-1) ) ); */  /* same */
    v = Vec(gf)
    /* Joerg Arndt, Jan 06 2013 */
    

Formula

G.f.: x / (sum_{k>=0} x^(2^k)). (corrected by Joerg Arndt, Jan 06 2013)
G.f.: 1 / (1 + sum(n>=1, x^(2^n-1) ) ), replace the '+' by '-' to obtain the g.f. for compositions into parts 2^k-1. [Joerg Arndt, Jan 06 2013]
G.f.: 1 - x / (1 + x / (1 + x / (1 - x / (1 + x / (1 - x / ...))))) = 1 + b(1) * x / (1 + b(2) * x / (1 + b(3) * x / ...)) where b(n) = (-1)^ A090678(n+1) [Conjecture]. - Michael Somos, Jan 03 2013
Convolution inverse is A209229 with 0 preprended. - Michael Somos, Jan 03 2013
a(n) = sum(m=0..n, T(n,m)*(-1)^(m)), where T(n,m)=(1+(-1)^(n-m))/2 *sum(k=1..(n-m)/2, binomial(m,k)*T((n-m)/2,k)), T(n,n)=1. - Vladimir Kruchinin, Mar 18 2015

Extensions

Added more terms, Joerg Arndt, Jan 06 2013

A104974 A Fredholm-Rueppel triangle.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1
Offset: 0

Views

Author

Paul Barry, Mar 30 2005

Keywords

Comments

Sequence matrix for A036987(n+1).
Riordan array ( (Sum_{k>=0} x^(2^k)/x^2) - 1/x, x).
Diagonal sums are A070939(n+1), with interpolated zeros.
Inverse is A104975.

Examples

			Triangle begins as:
  1;
  0, 1;
  1, 0, 1;
  0, 1, 0, 1;
  0, 0, 1, 0, 1;
  0, 0, 0, 1, 0, 1;
  1, 0, 0, 0, 1, 0, 1;
  0, 1, 0, 0, 0, 1, 0, 1;
  0, 0, 1, 0, 0, 0, 1, 0, 1;
  0, 0, 0, 1, 0, 0, 0, 1, 0, 1;
  0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1;
  0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1;
  0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1;
  0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1;
		

Crossrefs

Cf. A000523 (row sums), A036987, A070939, A104975.

Programs

  • Magma
    [(Catalan(n-k+1) mod 2): k in [0..n], n in [0..15]]; // G. C. Greubel, Jun 08 2021
    
  • Maple
    A104974 := proc(n,k)
        modp(A000108(n+1-k),2);
    end proc:
    seq(seq( A104974(n,k), k=0..n), n=0..15); # R. J. Mathar, Apr 21 2021
  • Mathematica
    Table[Mod[CatalanNumber[n-k+1], 2], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 08 2021 *)
  • Sage
    flatten([[mod(catalan_number(n-k+1), 2) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jun 08 2021

Formula

T(n, k) = A000108(n+1-k) mod 2. [Corrected by R. J. Mathar, Apr 21 2021]
Sum_{k=0..n} T(n, k) = A000523(n+1).
Showing 1-3 of 3 results.