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-10 of 12 results. Next

A289845 p-INVERT of A079977, where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 2, 4, 9, 19, 43, 91, 202, 433, 952, 2055, 4494, 9737, 21236, 46099, 100403, 218164, 474833, 1032256, 2245929, 4883690, 10623848, 23103985, 50255443, 109298635, 237734446, 517055409, 1124617945, 2446001258, 5320100761, 11571106298, 25167245524, 54738437517
Offset: 0

Views

Author

Clark Kimberling, Aug 14 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2),...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A289780 for a guide to related sequences.

Crossrefs

Programs

  • Mathematica
    z = 60; s = -x/(x^4 + x^2 - 1); p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A079977 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1] (*A289845*)
    LinearRecurrence[{1,3,-1,1,-1,-2,0,-1},{1,2,4,9,19,43,91,202},40] (* Harvey P. Dale, Jan 16 2019 *)

Formula

G.f.: (1 + x - x^2 - x^4)/(1 - x - 3 x^2 + x^3 - x^4 + x^5 + 2 x^6 + x^8).
a(n) = a(n-1) + 3*a(n-2) - a(n-3) + a(n-4) - a(n-5) - 2*a(n-6) - a(n-8).

A289780 p-INVERT of the positive integers (A000027), where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 4, 14, 47, 156, 517, 1714, 5684, 18851, 62520, 207349, 687676, 2280686, 7563923, 25085844, 83197513, 275925586, 915110636, 3034975799, 10065534960, 33382471801, 110713382644, 367182309614, 1217764693607, 4038731742156, 13394504020957, 44423039068114
Offset: 0

Views

Author

Clark Kimberling, Aug 10 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x).
Taking p(S) = 1 - S gives the INVERT transform of s, so that p-INVERT is a generalization of the INVERT transform (e.g., A033453).
Guide to p-INVERT sequences using p(S) = 1 - S - S^2:
t(A000012) = t(1,1,1,1,1,1,1,...) = A001906
t(A000290) = t(1,4,9,16,25,36,...) = A289779
t(A000027) = t(1,2,3,4,5,6,7,8,...) = A289780
t(A000045) = t(1,2,3,5,8,13,21,...) = A289781
t(A000032) = t(2,1,3,4,7,11,14,...) = A289782
t(A000244) = t(1,3,9,27,81,243,...) = A289783
t(A000302) = t(1,4,16,64,256,...) = A289784
t(A000351) = t(1,5,25,125,625,...) = A289785
t(A005408) = t(1,3,5,7,9,11,13,...) = A289786
t(A005843) = t(2,4,6,8,10,12,14,...) = A289787
t(A016777) = t(1,4,7,10,13,16,...) = A289789
t(A016789) = t(2,5,8,11,14,17,...) = A289790
t(A008585) = t(3,6,9,12,15,18,...) = A289795
t(A000217) = t(1,3,6,10,15,21,...) = A289797
t(A000225) = t(1,3,7,15,31,63,...) = A289798
t(A000578) = t(1,8,27,64,625,...) = A289799
t(A000984) = t(1,2,6,20,70,252,...) = A289800
t(A000292) = t(1,4,10,20,35,56,...) = A289801
t(A002620) = t(1,2,4,6,9,12,16,...) = A289802
t(A001906) = t(1,3,8,21,55,144,...) = A289803
t(A001519) = t(1,1,2,5,13,34,...) = A289804
t(A103889) = t(2,1,4,3,6,5,8,7,,...) = A289805
t(A008619) = t(1,1,2,2,3,3,4,4,...) = A289806
t(A080513) = t(1,2,2,3,3,4,4,5,...) = A289807
t(A133622) = t(1,2,1,3,1,4,1,5,...) = A289809
t(A000108) = t(1,1,2,5,14,42,...) = A081696
t(A081696) = t(1,1,3,9,29,97,...) = A289810
t(A027656) = t(1,0,2,0,3,0,4,0,5...) = A289843
t(A175676) = t(1,0,0,2,0,0,3,0,...) = A289844
t(A079977) = t(1,0,1,0,2,0,3,...) = A289845
t(A059841) = t(1,0,1,0,1,0,1,...) = A289846
t(A000040) = t(2,3,5,7,11,13,...) = A289847
t(A008578) = t(1,2,3,5,7,11,13,...) = A289828
t(A000142) = t(1!, 2!, 3!, 4!, ...) = A289924
t(A000201) = t(1,3,4,6,8,9,11,...) = A289925
t(A001950) = t(2,5,7,10,13,15,...) = A289926
t(A014217) = t(1,2,4,6,11,17,29,...) = A289927
t(A000045*) = t(0,1,1,2,3,5,...) = A289975 (* indicates prepended 0's)
t(A000045*) = t(0,0,1,1,2,3,5,...) = A289976
t(A000045*) = t(0,0,0,1,1,2,3,5,...) = A289977
t(A290990*) = t(0,1,2,3,4,5,...) = A290990
t(A290990*) = t(0,0,1,2,3,4,5,...) = A290991
t(A290990*) = t(0,0,01,2,3,4,5,...) = A290992

Examples

			Example 1:  s = (1,2,3,4,5,6,...) = A000027 and p(S) = 1 - S.
S(x) = x + 2x^2 + 3x^3 + 4x^4 + ...
p(S(x)) = 1 - (x + 2x^2 + 3x^3 + 4x^4 + ... )
- p(0) + 1/p(S(x)) = -1 + 1 + x + 3x^2 + 8x^3 + 21x^4 + ...
T(x) = 1 + 3x + 8x^2 + 21x^3 + ...
t(s) = (1,3,8,21,...) = A001906.
***
Example 2:  s = (1,2,3,4,5,6,...) = A000027 and p(S) = 1 - S - S^2.
S(x) =  x + 2x^2 + 3x^3 + 4x^4 + ...
p(S(x)) = 1 - ( x + 2x^2 + 3x^3 + 4x^4 + ...) - ( x + 2x^2 + 3x^3 + 4x^4 + ...)^2
- p(0) + 1/p(S(x)) = -1 + 1 + x + 4x^2 + 14x^3 + 47x^4 + ...
T(x) = 1 + 4x + 14x^2 + 47x^3 + ...
t(s) = (1,4,14,47,...) = A289780.
		

Crossrefs

Cf. A000027.

Programs

  • GAP
    P:=[1,4,14,47];; for n in [5..10^2] do P[n]:=5*P[n-1]-7*P[n-2]+5*P[n-3]-P[n-4]; od; P; # Muniru A Asiru, Sep 03 2017
  • Mathematica
    z = 60; s = x/(1 - x)^2; p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A000027 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1] (* A289780 *)
  • PARI
    x='x+O('x^99); Vec((1-x+x^2)/(1-5*x+7*x^2-5*x^3+x^4)) \\ Altug Alkan, Aug 13 2017
    

Formula

G.f.: (1 - x + x^2)/(1 - 5 x + 7 x^2 - 5 x^3 + x^4).
a(n) = 5*a(n-1) - 7*a(n-2) + 5*a(n-3) - a(n-4).

A053602 a(n) = a(n-1) - (-1)^n*a(n-2), a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025
Offset: 0

Views

Author

Michael Somos, Jan 17 2000

Keywords

Comments

If b(0)=0, b(1)=1 and b(n) = b(n-1) + (-1)^n*b(n-2), then a(n) = b(n+3). - Jaume Oliver Lafont, Oct 03 2009
a(n) is the number of palindromic compositions of n-1 into parts of 1 and 2. a(7) = 5 because we have 2+2+2, 2+1+1+2, 1+2+2+1, 1+1+2+1+1, 1+1+1+1+1+1. - Geoffrey Critzer, Mar 17 2014
a(n) is the number of palindromic compositions of n into odd parts (the corresponding generating function follows easily from Theorem 1.2 of the Hoggatt et al. reference). Example: a(7) = 5 because we have 7, 1+5+1, 3+1+3, 1+1+3+1+1, 1+1+1+1+1+1+1. - Emeric Deutsch, Aug 16 2016
The ratio of a(n)/a(n-1) oscillates between phi-1 and phi+1 as n tends to infinity, where phi is golden ratio (A001622). - Waldemar Puszkarz, Oct 10 2017

Crossrefs

Programs

  • Magma
    I:=[0,1,1,2]; [n le 4 select I[n] else Self(n-2)+Self(n-4): n in [1..50]]; // Vincenzo Librandi Oct 10 2017
    
  • Maple
    a[0] := 0: a[1] := 1: for n from 2 to 60 do a[n] := a[n-1]-(-1)^n*a[n-2] end do: seq(a[n], n = 0 .. 50); # Emeric Deutsch, Oct 09 2017
  • Mathematica
    nn=50;CoefficientList[Series[x (1+x+x^2)/(1-x^2-x^4),{x,0,nn}],x] (* Geoffrey Critzer, Mar 17 2014 *)
    LinearRecurrence[{0,1,0,1},{0,1,1,2},60] (* Harvey P. Dale, Nov 07 2016 *)
    RecurrenceTable[{a[0]==0, a[1]==1, a[n]==a[n-1]-(-1)^n a[n-2]}, a, {n, 50}] (* Vincenzo Librandi, Oct 10 2017 *)
  • PARI
    a(n)=fibonacci(n\2+n%2*2)
    
  • SageMath
    [fibonacci(n//2 + 2*(n%2)) for n in range(61)] # G. C. Greubel, Dec 06 2022

Formula

G.f.: x*(1 + x + x^2)/(1 - x^2 - x^4).
a(n) = a(n-2) + a(n-4).
a(2n) = F(n), a(2n-1) = F(n+1) where F() is Fibonacci sequence.
a(3-n) = A051792(n).
a(3)=1, a(4)=2, a(n+2) = a(n+1) + sign(a(n) - a(n+1))*a(n), n > 4. - Benoit Cloitre, Apr 08 2002
a(n) = A079977(n-1) + A079977(n-2) + A079977(n-3), n > 2. - Ralf Stephan, Apr 26 2003
a(0) = 0, a(1) = 1; a(2n) = a(2n-1) - a(2n-2); a(2n+1) = a(2n) + a(2n-1). - Amarnath Murthy, Jul 21 2005

A226206 Number A(n,k) of tilings of a k X n rectangle using integer-sided square tiles of area > 1; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 2, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 3, 1, 3, 0, 1, 0, 1, 1, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 1, 0, 1, 1, 5, 0, 7, 0, 5, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, May 31 2013

Keywords

Examples

			A(6,4) = A(4,6) = 3:
  ._._._._._._.   ._._._._._._.   ._._._._._._.
  |   |   |   |   |       |   |   |   |       |
  |___|___|___|   |       |___|   |___|       |
  |   |   |   |   |       |   |   |   |       |
  |___|___|___|   |_______|___|   |___|_______|  .
Square array A(n,k) begins:
  1, 1, 1, 1, 1, 1,  1, 1,   1,  1,   1, ...
  1, 0, 0, 0, 0, 0,  0, 0,   0,  0,   0, ...
  1, 0, 1, 0, 1, 0,  1, 0,   1,  0,   1, ...
  1, 0, 0, 1, 0, 0,  1, 0,   0,  1,   0, ...
  1, 0, 1, 0, 2, 0,  3, 0,   5,  0,   8, ...
  1, 0, 0, 0, 0, 1,  2, 0,   0,  0,   1, ...
  1, 0, 1, 1, 3, 2,  7, 7,  16, 19,  40, ...
  1, 0, 0, 0, 0, 0,  7, 1,   0,  0,   2, ...
  1, 0, 1, 0, 5, 0, 16, 0,  48,  0, 160, ...
  1, 0, 0, 1, 0, 0, 19, 0,   0, 50,  17, ...
  1, 0, 1, 0, 8, 1, 40, 2, 160, 17, 796, ...
  ...
		

Crossrefs

Main diagonal gives A347800.
Cf. A219924.

Programs

  • Maple
    b:= proc(n, l) option remember; local i, k, s, t;
          if max(l[])>n then 0 elif n=0 or l=[] then 1
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
        else for k do if l[k]=0 then break fi od; s:=0;
             for i from k+1 to nops(l) while l[i]=0 do s:=s+
               b(n, [l[j]$j=1..k-1, 1+i-k$j=k..i, l[j]$j=i+1..nops(l)])
             od; s
          fi
        end:
    A:= (n, k)-> `if`(n>=k, b(n, [0$k]), b(k, [0$n])):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, l_List] := b[n, l] = Module[{i, k, s, t}, Which [Max[l] > n, 0, n == 0 || l == {}, 1, Min[l] > 0, t = Min[l]; b[n-t, l-t], True, k = Position[l, 0, 1][[1, 1]]; s = 0; For[i = k+1, i <= Length[l] && l[[i]] == 0, i++, s = s + b[n, Join [l[[1 ;; k-1]], Table[1+i-k, {j, k, i}], l[[i+1 ;; -1]] ]]]; s]]; a [n_, k_] := If[n >= k, b[n, Array[0&, k]], b[k, Array[0&, n]]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 11 2013, translated from Maple *)

A051792 a(n) = (-1)^(n-1)*(a(n-1) - a(n-2)), a(1)=1, a(2)=1.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, -1, 1, 2, -1, -3, 2, 5, -3, -8, 5, 13, -8, -21, 13, 34, -21, -55, 34, 89, -55, -144, 89, 233, -144, -377, 233, 610, -377, -987, 610, 1597, -987, -2584, 1597, 4181, -2584, -6765, 4181, 10946, -6765, -17711, 10946, 28657, -17711, -46368
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 10 1999

Keywords

Crossrefs

Programs

  • Magma
    [Fibonacci(1 -Floor((n-4)/2) -2*((n-4) mod 2)): n in [1..60]]; // G. C. Greubel, Dec 06 2022
  • Mathematica
    LinearRecurrence[{0,-1,0,1},{1,1,0,1},60] (* Harvey P. Dale, May 08 2017 *)
  • PARI
    a(n)=fibonacci((3-n)\2+(3-n)%2*2)
    
  • Sage
    def A051792():
        x, y, b = 1, 1, true
        while True:
            yield x
            x, y = y, x - y
            y = -y if b else y
            b = not b
    a = A051792()
    print([next(a) for  in range(51)]) # _Peter Luschny, Mar 19 2020
    

Formula

a(3-n) = A053602(n).
From Michael Somos: (Start)
G.f.: x*(1 + x + x^2 + 2*x^3)/(1 + x^2 - x^4).
a(n) = -a(n-2) + a(n-4). (End)
a(n) = b(n-1) + b(n-2) + b(n-3) + 2*b(n-4), where b(n) = i^n * A079977(n). - G. C. Greubel, Dec 06 2022

A096748 Expansion of (1+x)^2/(1-x^2-x^4).

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 5, 6, 8, 10, 13, 16, 21, 26, 34, 42, 55, 68, 89, 110, 144, 178, 233, 288, 377, 466, 610, 754, 987, 1220, 1597, 1974, 2584, 3194, 4181, 5168, 6765, 8362, 10946, 13530, 17711, 21892, 28657, 35422, 46368, 57314, 75025, 92736, 121393, 150050
Offset: 0

Views

Author

Paul Barry, Jul 07 2004

Keywords

Comments

The ratio a(n+1) / a(n) increasingly approximates two constants connected to the golden ratio phi = (1 + sqrt(5))/2: (phi+1)/2 = 1.30901699... = A239798 and (phi-1)*2 = 1.23606797... = A134972, according to whether n is odd or even. - Davide Rotondo, Jul 31 2020

Crossrefs

Cf. A134972 and A239798 (limiting ratios for a(n+1)/a(n)).

Programs

  • Mathematica
    CoefficientList[Series[(1+x)^2/(1-x^2-x^4),{x,0,50}],x] (* or *) LinearRecurrence[{0,1,0,1},{1,2,2,2},50] (* Harvey P. Dale, Jan 29 2012 *)

Formula

a(n) = a(n-2) + a(n-4).
a(n) = 2*F((n+1)/2)*(1-(-1)^n)/2 + F((n+4)/2)*(1+(-1)^n)/2.
a(2*n) = A000045(n+2); a(2*n+1) = 2*A000045(n+1).
a(n) = Sum_{k=0..n} binomial(floor((n-k)/2), floor(k/2)). - Paul Barry, Jul 24 2004
a(n) = A079977(n) + A079977(n-2) + 2*A079977(n-1). - R. J. Mathar, Jul 15 2013

A099574 Diagonal sums of triangle A099573.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 9, 11, 18, 23, 37, 48, 74, 97, 147, 195, 290, 387, 568, 763, 1108, 1495, 2152, 2915, 4167, 5662, 8047, 10962, 15506, 21168, 29825, 40787, 57280, 78448, 109870, 150657, 210521, 288969, 403020, 553677, 770963, 1059932, 1473898
Offset: 0

Views

Author

Paul Barry, Oct 23 2004

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x^4)/((1-x^2-x^4)*(1-x-x^4)) )); // G. C. Greubel, Jul 25 2022
    
  • Mathematica
    a[n_]:= a[n]= Sum[Binomial[n-k-j, j], {k,0,Floor[n/2]}, {j,0,Floor[k/2]}];
    Table[a[n], {n, 0, 40}] (* G. C. Greubel, Jul 25 2022 *)
  • SageMath
    @CachedFunction
    def A099574(n): return sum(sum(binomial(n-k-j, j) for j in (0..(k//2))) for k in (0..(n//2)))
    [A099574(n) for n in (0..40)] # G. C. Greubel, Jul 25 2022

Formula

a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..floor(k/2)} binomial(n-k-j, j).
G.f.: (1-x)*(1+x)*(1+x^2) / ( (1-x-x^4)*(1-x^2-x^4) ). - R. J. Mathar, Nov 11 2014
From G. C. Greubel, Jul 25 2022: (Start)
a(n) = A003269(n+5) - A079977(n+3) - A079977(n+2).
a(n) = A003269(n+5) - A103609(n+5). (End)

A246690 Number A(n,k) of compositions of n into parts of the k-th list of distinct parts in the order given by A246688; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 2, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 1, 0, 1, 1, 5, 0, 1, 0, 1, 1, 0, 2, 0, 8, 1, 1, 0, 1, 0, 1, 0, 3, 0, 13, 0, 1, 0, 1, 0, 1, 1, 1, 4, 1, 21, 1, 1, 0, 1, 1, 0, 1, 2, 0, 6, 0, 34, 0, 1, 0, 1, 1, 2, 0, 1, 3, 0, 9, 0, 55, 1, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 01 2014

Keywords

Comments

The first lists of distinct parts in the order given by A246688 are: 0:[], 1:[1], 2:[2], 3:[1,2], 4:[3], 5:[1,3], 6:[4], 7:[1,4], 8:[2,3], 9:[5], 10:[1,2,3], 11:[1,5], 12:[2,4], 13:[6], 14:[1,2,4], 15:[1,6], 16:[2,5], 17:[3,4], 18:[7], 19:[1,2,5], 20:[1,3,4], ... .

Examples

			Square array A(n,k) begins:
  1, 1, 1,  1, 1,  1, 1,  1, 1, 1,   1, 1, 1, 1,   1, ...
  0, 1, 0,  1, 0,  1, 0,  1, 0, 0,   1, 1, 0, 0,   1, ...
  0, 1, 1,  2, 0,  1, 0,  1, 1, 0,   2, 1, 1, 0,   2, ...
  0, 1, 0,  3, 1,  2, 0,  1, 1, 0,   4, 1, 0, 0,   3, ...
  0, 1, 1,  5, 0,  3, 1,  2, 1, 0,   7, 1, 2, 0,   6, ...
  0, 1, 0,  8, 0,  4, 0,  3, 2, 1,  13, 2, 0, 0,  10, ...
  0, 1, 1, 13, 1,  6, 0,  4, 2, 0,  24, 3, 3, 1,  18, ...
  0, 1, 0, 21, 0,  9, 0,  5, 3, 0,  44, 4, 0, 0,  31, ...
  0, 1, 1, 34, 0, 13, 1,  7, 4, 0,  81, 5, 5, 0,  55, ...
  0, 1, 0, 55, 1, 19, 0, 10, 5, 0, 149, 6, 0, 0,  96, ...
  0, 1, 1, 89, 0, 28, 0, 14, 7, 1, 274, 8, 8, 0, 169, ...
		

Crossrefs

Main diagonal gives A246691.
Cf. A246688, A246720 (the same for partitions).

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [[]], `if`(i>n, [],
          [map(x->[i, x[]], b(n-i, i+1))[], b(n, i+1)[]]))
        end:
    f:= proc() local i, l; i, l:=0, [];
          proc(n) while n>=nops(l)
            do l:=[l[], b(i, 1)[]]; i:=i+1 od; l[n+1]
          end
        end():
    g:= proc(n, l) option remember; `if`(n=0, 1,
          add(`if`(i>n, 0, g(n-i, l)), i=l))
        end:
    A:= (n, k)-> g(n, f(k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i>n, {}, Join[Prepend[#, i]& /@ b[n - i, i + 1], b[n, i + 1]]]];
    f = Module[{i = 0, l = {}}, Function[n, While[n >= Length[l], l = Join[l, b[i, 1]]; i++]; l[[n + 1]]]];
    g[n_, l_] := g[n, l] = If[n==0, 1, Sum[If[i>n, 0, g[n - i, l]], {i, l}]];
    A[n_, k_] := g[n, f[k]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 07 2020, after Alois P. Heinz *)

A124304 Riordan array (1, x*(1-x^2)).

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 25 2006

Keywords

Comments

T(2n,n) is a signed aerated version of C(2n,n).
Inverse is A124305.

Examples

			Triangle begins
  1;
  0,  1;
  0,  0,  1;
  0, -1,  0,  1;
  0,  0, -2,  0,  1;
  0,  0,  0, -3,  0,  1;
  0,  0,  1,  0, -4,  0,  1;
  0,  0,  0,  3,  0, -5,  0,  1;
  0,  0,  0,  0,  6,  0, -6,  0,  1;
		

Crossrefs

Cf. A014021 (diagonal sums), A050935 (row sums), A124305 (inverse).

Programs

  • Magma
    A124304:= func< n,k | (&+[(-1)^j*Binomial(k,k-j)*Binomial(k,n-k-j) : j in [0..n]]) >;
    [A124304(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Aug 18 2023
    
  • Mathematica
    A124304[n_, k_]:= Binomial[k, (n-k)/2]*(-1)^((n-k)/2)*(1+(-1)^(n-k))/2;
    Table[A124304[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 18 2023 *)
  • SageMath
    def A124304(n, k): return binomial(k, (n-k)//2)*(-1)^((n-k)//2)*(1+(-1)^(n-k))/2
    flatten([[A124304(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Aug 18 2023

Formula

T(n, k) = Sum_{j=0..n} C(k,k-j)*C(k,n-k-j)*(-1)^j.
T(n, k) = C(k,(n-k)/2)*(-1)^((n-k)/2)*(1 + (-1)^(n-k))/2.
Sum_{k=0..n} T(n, k) = A050935(n+2).
Sum_{k=0..floor(n/2)} T(n-k, k) = A014021(n).
T(2*n, n) = (1 - 2*0^(n+2 mod 4))*A126869(n).
From G. C. Greubel, Aug 18 2023: (Start)
T(2*n-1, n-1) = (1 - 2*0^(n+1 mod 4))*A138364(n-1).
T(2*n-1, n+1) = (1 - 2*0^(n mod 4))*((1+(-1)^n)/2)*A002054(floor(n/2)).
Sum_{k=0..n} (-1)^k*T(n, k) = A176971(n+3).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (1 - 2*0^(n+2 mod 4))*A079977(n).
G.f.: 1/(1 - x*y*(1-x^2)). (End)

A174618 For n odd a(n) = a(n-2) + a(n-3), for n even a(n) = a(n-2) + a(n-5); with a(1) = 0, a(2) = 1.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 2, 1, 3, 2, 4, 4, 6, 7, 10, 11, 17, 17, 28, 27, 45, 44, 72, 72, 116, 117, 188, 189, 305, 305, 494, 493, 799, 798, 1292, 1292, 2090, 2091, 3382, 3383, 5473, 5473, 8856, 8855, 14329, 14328, 23184, 23184, 37512, 37513, 60696
Offset: 1

Views

Author

Mark Dols, Mar 23 2010

Keywords

Comments

Combination a(2n)=A005252(n-1) and a(2n+1)=A024490(n). Consecutive pairs add up to A000045 and subtract to A010892. If a(1)= 1 formula gives: A103609.

Examples

			As consecutive pairs: (0,1),(0,1),(1,1),(2,1),(3,2),(4,4),...
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 70);
    [0] cat Coefficients(R!( x^2*(1-x^2+x^3)/((1-x^2+x^4)*(1-x^2-x^4)) )); // G. C. Greubel, Oct 23 2024
    
  • Mathematica
    nxt[{n_,a_,b_,c_,d_,e_}]:={n+1,b,c,d,e,If[EvenQ[n],d+c,d+a]}; NestList[nxt,{5,0,1,0,1,1},50][[All,2]] (* or *) LinearRecurrence[ {0,2,0,-1,0,0,0,1},{0,1,0,1,1,1,2,1},60] (* Harvey P. Dale, Nov 15 2019 *)
  • SageMath
    def A174618(n): return (kronecker(12,n-3) - kronecker(12,n-2) + ((n+1)%2)*fibonacci(n//2) + (n%2)*fibonacci((n+1)//2))//2
    [A174618(n) for n in range(1,71)] # G. C. Greubel, Oct 23 2024

Formula

G.f.: x^2*(1-x^2+x^3) / ( (1-x^2+x^4)*(1-x^2-x^4) ). - R. J. Mathar, Jan 27 2011
a(n) = (1/2)*(A110161(n-3) - A110161(n-2) + A079977(n-2) + A079977(n-1)). - G. C. Greubel, Oct 23 2024
Showing 1-10 of 12 results. Next