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 11 results. Next

A008937 a(n) = Sum_{k=0..n} T(k) where T(n) are the tribonacci numbers A000073.

Original entry on oeis.org

0, 1, 2, 4, 8, 15, 28, 52, 96, 177, 326, 600, 1104, 2031, 3736, 6872, 12640, 23249, 42762, 78652, 144664, 266079, 489396, 900140, 1655616, 3045153, 5600910, 10301680, 18947744, 34850335, 64099760, 117897840, 216847936, 398845537, 733591314, 1349284788
Offset: 0

Views

Author

N. J. A. Sloane, Alejandro Teruel (teruel(AT)usb.ve)

Keywords

Comments

a(n+1) is the number of n-bit sequences that avoid 1100. - David Callan, Jul 19 2004 [corrected by Kent E. Morrison, Jan 08 2019]. Also the number of n-bit sequences avoiding one of the patterns 1000, 0011, 1110, ... or any binary string of length 4 without overlap at beginning and end. Strings where it is not true are: 1111, 1010, 1001, ... and their bitwise complements. - Alois P. Heinz, Jan 09 2019
Row sums of Riordan array (1/(1-x), x(1+x+x^2)). - Paul Barry, Feb 16 2005
Diagonal sums of Riordan array (1/(1-x)^2, x(1+x)/(1-x)), A104698.
A shifted version of this sequence can be found in Eqs. (4) and (3) on p. 356 of Dunkel (1925) with r = 3. (Equation (3) follows equation (4) in the paper!) The whole paper is a study of the properties of this and other similar sequences indexed by the parameter r. For r = 2, we get a shifted version of A000071. For r = 4, we get a shifted version of A107066. For r = 5, we get a shifted version of A001949. For r = 6, we get a shifted version of A172316. See also the table in A172119. - Petros Hadjicostas, Jun 14 2019
Officially, to match A000073, this should start with a(0)=a(1)=0, a(2)=1. - N. J. A. Sloane, Sep 12 2020
Numbers with tribonacci representation that is a prefix of 100100100100... . - Jeffrey Shallit, Jul 10 2024

Examples

			G.f. = x + 2*x^2 + 4*x^3 + 8*x^4 + 15*x^5 + 28*x^6 + 52*x^7 + 96*x^8 + 177*x^9 + ... [edited by _Petros Hadjicostas_, Jun 12 2019]
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 41.

Crossrefs

Partial sums of A000073. Cf. A000213, A018921, A027084, A077908, A209972.
Row sums of A055216.
Column k = 1 of A140997 and second main diagonal of A140994.

Programs

  • GAP
    a:=[0,1,1];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Sep 13 2019
  • Haskell
    a008937 n = a008937_list !! n
    a008937_list = tail $ scanl1 (+) a000073_list
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Magma
    [ n eq 1 select 0 else n eq 2 select 1 else n eq 3 select 2 else n eq 4 select 4 else 2*Self(n-1)-Self(n-4): n in [1..40] ]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A008937 := proc(n) option remember; if n <= 3 then 2^n else 2*procname(n-1)-procname(n-4) fi; end;
    a:= n-> (Matrix([[1,1,0,0], [1,0,1,0], [1,0,0,0], [1,0,0,1]])^n)[4,1]: seq(a(n), n=0..50); # Alois P. Heinz, Jul 24 2008
  • Mathematica
    CoefficientList[Series[x/(1-2x+x^4), {x, 0, 40}], x]
    Accumulate[LinearRecurrence[{1,1,1},{0,1,1},40]] (* Harvey P. Dale, Dec 04 2017 *)
    LinearRecurrence[{2, 0, 0, -1},{0, 1, 2, 4},40] (* Ray Chandler, Mar 01 2024 *)
  • PARI
    {a(n) = if( n<0, polcoeff( - x^3 / (1 - 2*x^3 + x^4) + x * O(x^-n), -n), polcoeff( x / (1 - 2*x + x^4) + x * O(x^n), n))}; /* Michael Somos, Aug 23 2014 */
    
  • PARI
    a(n) = sum(j=0, n\2, sum(k=0, j, binomial(n-2*j,k+1)*binomial(j,k)*2^k)); \\ Michel Marcus, Sep 08 2017
    
  • SageMath
    def A008937_list(prec):
        P = PowerSeriesRing(ZZ, 'x', prec)
        x = P.gen().O(prec)
        return (x/(1-2*x+x^4)).list()
    A008937_list(40) # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = A018921(n-2) = A027084(n+1) + 1.
a(n) = (A000073(n+2) + A000073(n+4) - 1)/2.
From Mario Catalani (mario.catalani(AT)unito.it), Aug 09 2002: (Start)
G.f.: x/((1-x)*(1-x-x^2-x^3)).
a(n) = 2*a(n-1) - a(n-4), a(0) = 0, a(1) = 1, a(2) = 2, a(3) = 4. (End)
a(n) = 1 + a(n-1) + a(n-2) + a(n-3). E.g., a(11) = 1 + 600 + 326 + 177 = 1104. - Philippe LALLOUET (philip.lallouet(AT)orange.fr), Oct 29 2007
a(n) = term (4,1) in the 4 X 4 matrix [1,1,0,0; 1,0,1,0; 1,0,0,0; 1,0,0,1]^n. - Alois P. Heinz, Jul 24 2008
a(n) = -A077908(-n-3). - Alois P. Heinz, Jul 24 2008
a(n) = (A000213(n+2) - 1) / 2. - Reinhard Zumkeller, Apr 07 2012
a(n) = Sum_{j=0..floor(n/2)} Sum_{k=0..j} binomial(n-2j,k+1) *binomial(j,k)*2^k. - Tony Foster III, Sep 08 2017
a(n) = Sum_{k=0..floor(n/2)} (n-2*k)*hypergeom([-k,-n+2*k+1], [2], 2). - Peter Luschny, Nov 09 2017
a(n) = 2^(n-1)*hypergeom([1-n/4, 1/4-n/4, 3/4-n/4, 1/2-n/4], [1-n/3, 1/3-n/3, 2/3-n/3], 16/27) for n > 0. - Peter Luschny, Aug 20 2020
a(n-1) = T(n) + T(n-3) + T(n-6) + ... + T(2+((n-2) mod 3)), for n >= 4, where T is A000073(n+1). - Jeffrey Shallit, Dec 24 2020

A141020 Pascal-like triangle with index of asymmetry y = 4 and index of obliqueness z = 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, 32, 16, 8, 4, 2, 1, 1, 63, 33, 16, 8, 4, 2, 1, 1, 124, 67, 33, 16, 8, 4, 2, 1, 1, 244, 136, 67, 33, 16, 8, 4, 2, 1, 1, 480, 276, 136, 67, 33, 16, 8, 4, 2, 1, 1, 944, 560, 276, 136, 67, 33, 16, 8, 4, 2, 1
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jul 11 2008

Keywords

Comments

The left column is set to 1. The four rightmost columns start with powers of 2:
T(n, 0) = T(n, n)=1; T(n, n-1)=2; T(n, n-2)=4; T(n, n-3)=8; T(n, n-4)=16.
Recurrence: T(n, k) = T(n-1, k) + T(n-2, k) + T(n-3, k) + T(n-4, k) + T(n-5, k) + T(n-5,k-1), k = 1..n-5.
From Petros Hadjicostas, Jun 14 2019: (Start)
In the attached photograph we see that the index of asymmetry is denoted by s (rather than y) and the index of obliqueness by e (rather than z).
The general recurrence is G(n+s+2, k) = G(n+1, k-e*s+e-1) + Sum_{1 <= m <= s+1} G(n+m, k-e*s+m*e-2*e) for n >= 0 with k = 1..(n+1) when e = 0 and k = (s+1)..(n+s+1) when e = 1. The initial conditions are G(n+x+1, n-e*n+e*x-e+1) = 2^x for x=0..s and n >= 0. There is one more initial condition, namely, G(n, e*n) = 1 for n >= 0.
For s = 0, we get Pascal's triangle A007318. For s = 1, we get A140998 (e = 0) and A140993 (e = 1). For s = 2, we get A140997 (e = 0) and A140994 (e = 1). For s = 3, we get A140996 (e = 0) and A140995 (e = 1). For s = 4, we have the current array (with e = 0) and array A141021 (with e = 1). In some of these arrays, the indices n and k are sometimes shifted.
(End)

Examples

			Pascal-like triangle with y = 4 and z = 0 begins as follows:
  1
  1   1
  1   2   1
  1   4   2   1
  1   8   4   2   1
  1  16   8   4   2  1
  1  32  16   8   4  2  1
  1  63  33  16   8  4  2  1
  1 124  67  33  16  8  4  2 1
  1 244 136  67  33 16  8  4 2 1
  1 480 276 136  67 33 16  8 4 2 1
  1 944 560 276 136 67 33 16 8 4 2 1
  ...
		

Crossrefs

Programs

  • Maple
    A141020 := proc(n,k) option remember ; if k<0 or k>n then 0 ; elif k=0 or k=n then 1 ; elif k=n-1 then 2 ; elif k=n-2 then 4 ; elif k=n-3 then 8 ; elif k=n-4 then 16 ; else procname(n-1,k) +procname(n-2,k)+procname(n-3,k)+procname(n-4,k) +procname(n-5,k)+procname(n-5,k-1) ; fi; end:
    for n from 0 to 20 do for k from 0 to n do printf("%d,",A141020(n,k)) ; od: od: # R. J. Mathar, Sep 19 2008
  • Mathematica
    T[n_, k_] := T[n, k] = Which[k < 0 || k > n, 0, k == 0 || k == n, 1, k == n-1, 2, k == n-2, 4, k == n-3, 8, k == n-4, 16, True, T[n-1, k] + T[n-2, k] + T[n-3, k] + T[n-4, k] + T[n-5, k] + T[n-5, k-1]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 18 2019, after R. J. Mathar *)

Formula

From Petros Hadjicostas, Jun 14 2019: (Start)
T(n, k) = A141021(n, n-k) for 0 <= k <= n.
Bivariate g.f.: Sum_{n,k >= 0} T(n, k)*x^n*y^k = (1 - x - x^2 - x^3 - x^4 - x^5 + y*x^2*(1 + x + x^2 + x^4)) / ((1 - x) * (1 - x*y) * (1 - x - x^2 - x^3 - x^4 - x^5 - x^5*y)).
Differentiating the bivariate w.r.t. y and setting y = 0, we get the g.f. of the column k = 1: x/((-1 + x)*(x^5 + x^4 + x^3 + x^2 + x - 1)). This is the g.f. of a shifted version of sequence A001949.
(End)

Extensions

Partially edited by N. J. A. Sloane, Jul 18 2008
Recurrence rewritten by R. J. Mathar, Sep 19 2008

A172119 Sum the k preceding elements in the same column and add 1 every time.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 4, 2, 1, 1, 5, 7, 4, 2, 1, 1, 6, 12, 8, 4, 2, 1, 1, 7, 20, 15, 8, 4, 2, 1, 1, 8, 33, 28, 16, 8, 4, 2, 1, 1, 9, 54, 52, 31, 16, 8, 4, 2, 1, 1, 10, 88, 96, 60, 32, 16, 8, 4, 2, 1, 1, 11, 143, 177, 116, 63, 32, 16, 8, 4, 2, 1, 1, 12, 232, 326, 224, 124, 64, 32, 16
Offset: 0

Views

Author

Mats Granvik, Jan 26 2010

Keywords

Comments

Columns are related to Fibonacci n-step numbers. Are there closed forms for the sequences in the columns?
We denote by a(n,k) the number which is in the (n+1)-th row and (k+1)-th-column. With help of the definition, we also have the recurrence relation: a(n+k+1, k) = 2*a(n+k, k) - a(n, k). We see on the main diagonal the numbers 1,2,4, 8, ..., which is clear from the formula for the general term d(n)=2^n. - Richard Choulet, Jan 31 2010
Most of the paper by Dunkel (1925) is a study of the columns of this table. - Petros Hadjicostas, Jun 14 2019

Examples

			Triangle begins:
n\k|....0....1....2....3....4....5....6....7....8....9...10
---|-------------------------------------------------------
0..|....1
1..|....1....1
2..|....1....2....1
3..|....1....3....2....1
4..|....1....4....4....2....1
5..|....1....5....7....4....2....1
6..|....1....6...12....8....4....2....1
7..|....1....7...20...15....8....4....2....1
8..|....1....8...33...28...16....8....4....2....1
9..|....1....9...54...52...31...16....8....4....2....1
10.|....1...10...88...96...60...32...16....8....4....2....1
		

Crossrefs

Cf. A000071 (col. 3), A008937 (col. 4), A107066 (col. 5), A001949 (col. 6), A172316 (col. 7), A172317 (col. 8), A172318 (col. 9), A172319 (col. 10), A172320 (col. 11), A144428.
Cf. (1-((-1)^T(n, k)))/2 = A051731, see formula by Hieronymus Fischer in A022003.

Programs

  • GAP
    T:= function(n,k)
        if k=0 and k=n then return 1;
        elif k<0 or k>n then return 0;
        else return 1 + Sum([1..k], j-> T(n-j,k));
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Jul 27 2019
  • Magma
    T:= func< n,k | (&+[(-1)^j*2^(n-k-(k+1)*j)*Binomial(n-k-k*j, n-k-(k+1)*j): j in [0..Floor((n-k)/(k+1))]]) >;
    [[T(n,k): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jul 27 2019
    
  • Maple
    for k from 0 to 20 do for n from 0 to 20 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od: seq(b(n),n=0..20):od; # Richard Choulet, Jan 31 2010
    A172119 := proc(n,k)
        option remember;
        if k = 0 then
            1;
        elif k > n then
            0;
        else
            1+add(procname(n-k+i,k),i=0..k-1) ;
        end if;
    end proc:
    seq(seq(A172119(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Sep 16 2017
  • Mathematica
    T[, 0] = 1; T[n, n_] = 1; T[n_, k_] /; k>n = 0; T[n_, k_] := T[n, k] = Sum[T[n-k+i, k], {i, 0, k-1}] + 1;
    Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten
    Table[Sum[(-1)^j*2^(n-k-(k+1)*j)*Binomial[n-k-k*j, n-k-(k+1)*j], {j, 0, Floor[(n-k)/(k+1)]}], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jul 27 2019 *)
  • PARI
    T(n,k) = if(k<0 || k>n, 0, k==1 && k==n, 1, 1 + sum(j=1,k, T(n-j,k)));
    for(n=1,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jul 27 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0 and k==n): return 1
        elif (k<0 or k>n): return 0
        else: return 1 + sum(T(n-j, k) for j in (1..k))
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 27 2019
    

Formula

T(n,0) = 1.
T(n,1) = n.
T(n,2) = A000071(n+1).
T(n,3) = A008937(n-2).
The general term in the n-th row and k-th column is given by: a(n, k) = Sum_{j=0..floor(n/(k+1))} ((-1)^j binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j)). For example: a(5,3) = binomial(5,5)*2^5 - binomial(2,1)*2^1 = 28. The generating function of the (k+1)-th column satisfies: psi(k)(z)=1/(1-2*z+z^(k+1)) (for k=0 we have the known result psi(0)(z)=1/(1-z)). - Richard Choulet, Jan 31 2010 [By saying "(k+1)-th column" the author actually means "k-th column" for k = 0, 1, 2, ... - Petros Hadjicostas, Jul 26 2019]

A209972 Number of binary words of length n avoiding the subword given by the binary expansion of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 4, 1, 1, 1, 2, 4, 5, 5, 1, 1, 1, 2, 4, 7, 8, 6, 1, 1, 1, 2, 4, 7, 12, 13, 7, 1, 1, 1, 2, 4, 7, 12, 20, 21, 8, 1, 1, 1, 2, 4, 7, 12, 21, 33, 34, 9, 1, 1, 1, 2, 4, 8, 13, 20, 37, 54, 55, 10, 1, 1, 1, 2, 4, 8, 15, 24, 33, 65, 88, 89, 11, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 16 2012

Keywords

Examples

			Square array begins:
  1,  1,  1,   1,   1,   1,   1,   1,   1, ...
  1,  1,  2,   2,   2,   2,   2,   2,   2, ...
  1,  1,  3,   3,   4,   4,   4,   4,   4, ...
  1,  1,  4,   5,   7,   7,   7,   7,   8, ...
  1,  1,  5,   8,  12,  12,  12,  13,  15, ...
  1,  1,  6,  13,  20,  21,  20,  24,  28, ...
  1,  1,  7,  21,  33,  37,  33,  44,  52, ...
  1,  1,  8,  34,  54,  65,  54,  81,  96, ...
  1,  1,  9,  55,  88, 114,  88, 149, 177, ...
		

Crossrefs

Columns give: 0, 1: A000012, 2: A001477(n+1), 3: A000045(n+2), 4, 6: A000071(n+3), 5: A005251(n+3), 7: A000073(n+3), 8, 12, 14: A008937(n+1), 9, 11, 13: A049864(n+2), 10: A118870, 15: A000078(n+4), 16, 20, 24, 26, 28, 30: A107066, 17, 19, 23, 25, 29: A210003, 18, 22: A209888, 21: A152718(n+3), 27: A210021, 31: A001591(n+5), 32: A001949(n+5), 33, 35, 37, 39, 41, 43, 47, 49, 53, 57, 61: A210031.
Main diagonal equals A234005 or column k=0 of A233940.

Programs

  • Mathematica
    A[n_, k_] := Module[{bb, cnt = 0}, Do[bb = PadLeft[IntegerDigits[j, 2], n]; If[SequencePosition[bb, IntegerDigits[k, 2], 1]=={}, cnt++], {j, 0, 2^n-1 }]; cnt];
    Table[A[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Nov 01 2021 *)

A126198 Triangle read by rows: T(n,k) (1 <= k <= n) = number of compositions of n into parts of size <= k.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 5, 7, 8, 1, 8, 13, 15, 16, 1, 13, 24, 29, 31, 32, 1, 21, 44, 56, 61, 63, 64, 1, 34, 81, 108, 120, 125, 127, 128, 1, 55, 149, 208, 236, 248, 253, 255, 256, 1, 89, 274, 401, 464, 492, 504, 509, 511, 512, 1, 144, 504, 773, 912, 976, 1004, 1016, 1021, 1023, 1024
Offset: 1

Views

Author

N. J. A. Sloane, Mar 09 2007

Keywords

Comments

Also has an interpretation as number of binary vectors of length n-1 in which the length of the longest run of 1's is <= k (see A048004). - N. J. A. Sloane, Apr 03 2011
Higher Order Fibonacci numbers: A126198(n,k) = Sum_{h=0..k} A048004(n,h); for example, A126198(7,3) = Sum_{h=0..3} A048004(7,h) or A126198(7,3) = 1 + 33 + 47 + 27 = 108, the 7th tetranacci number. A048004 row(7) produces A126198 row(7) list of 1,34,81,108,120,125,127,128 which are 1, the 7th Fibonacci, the 7th tribonacci, ... 7th octanacci numbers. - Richard Southern, Aug 04 2017

Examples

			Triangle begins:
  1;
  1,  2;
  1,  3,  4;
  1,  5,  7,  8;
  1,  8, 13, 15, 16;
  1, 13, 24, 29, 31, 32;
  1, 21, 44, 56, 61, 63, 64;
Could also be extended to a square array:
  1  1  1  1  1  1  1 ...
  1  2  2  2  2  2  2 ...
  1  3  4  4  4  4  4 ...
  1  5  7  8  8  8  8 ...
  1  8 13 15 16 16 16 ...
  1 13 24 29 31 32 32 ...
  1 21 44 56 61 63 64 ...
which when read by antidiagonals (downwards) gives A048887.
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 154-155.

Crossrefs

Rows are partial sums of rows of A048004. Cf. A048887, A092921 for other versions.
2nd column = Fibonacci numbers, next two columns are A000073, A000078; last three diagonals are 2^n, 2^n-1, 2^n-3.
Cf. A082267.

Programs

  • Maple
    A126198 := proc(n,k) coeftayl( x*(1-x^k)/(1-2*x+x^(k+1)),x=0,n); end: for n from 1 to 11 do for k from 1 to n do printf("%d, ",A126198(n,k)); od; od; # R. J. Mathar, Mar 09 2007
    # second Maple program:
    T:= proc(n, k) option remember;
          if n=0 or k=1 then 1
        else add(T(n-j, k), j=1..min(n, k))
          fi
        end:
    seq(seq(T(n, k), k=1..n), n=1..15);  # Alois P. Heinz, Oct 23 2011
  • Mathematica
    rows = 11; t[n_, k_] := Sum[ (-1)^i*2^(n-i*(k+1))*Binomial[ n-i*k, i], {i, 0, Floor[n/(k+1)]}] - Sum[ (-1)^i*2^((-i)*(k+1)+n-1)*Binomial[ n-i*k-1, i], {i, 0, Floor[(n-1)/(k+1)]}]; Flatten[ Table[ t[n, k], {n, 1, rows}, {k, 1, n}]](* Jean-François Alcover, Nov 17 2011, after Max Alekseyev *)

Formula

G.f. for column k: (x-x^(k+1))/(1-2*x+x^(k+1)). [Riordan]
T(n,3) = A008937(n) - A008937(n-3) for n>=3. T(n,4) = A107066(n-1) - A107066(n-5) for n>=5. T(n,5) = A001949(n+4) - A001949(n-1) for n>=5. - R. J. Mathar, Mar 09 2007
T(n,k) = A181695(n,k) - A181695(n-1,k). - Max Alekseyev, Nov 18 2010
Conjecture: Sum_{k=1..n} T(n,k) = A039671(n), n>0. - L. Edson Jeffery, Nov 29 2013

Extensions

More terms from R. J. Mathar, Mar 09 2007

A172316 7th column of the array A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 127, 252, 500, 992, 1968, 3904, 7744, 15361, 30470, 60440, 119888, 237808, 471712, 935680, 1855999, 3681528, 7302616, 14485344, 28732880, 56994048, 113052416, 224248833, 444816138, 882329660
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Examples

			a(3) = binomial(3,3)*2^3 = 8.
a(7) = binomial(7,7)*2^7 - binomial(1,0)*2^0 = 127.
		

Crossrefs

Partial sums of A001592.

Programs

  • Maple
    for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od; k:=6:taylor(1/(1-2*z+z^(k+1)),z=0,30);

Formula

G.f.: 1/(1 - 2*z + z^7).
Recurrence formula: a(n+7) = 2*a(n+6) - a(n).
a(n) = Sum_{j=0..floor(n/(k+1))} ((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j)) with k=6.

A172317 8th column of A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 255, 508, 1012, 2016, 4016, 8000, 15936, 31744, 63233, 125958, 250904, 499792, 995568, 1983136, 3950336, 7868928, 15674623, 31223288, 62195672, 123891552, 246787536, 491591936, 979233536
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Examples

			a(4) = binomial(4,4)*2^4 = 16.
a(9) = binomial(9,9)*2^9 - binomial(2,1)*2^1 = 512 - 4 = 508.
		

Crossrefs

Partial sums of A066178.

Programs

  • Maple
    k:=7:taylor(1/(1-2*z+z^(k+1)),z=0,30); for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od;

Formula

The generating function is f such that: f(z)=1/(1-2*z+z^8). Recurrence relation: a(n+8)=2*a(n+7)-a(n). General term: a(n) = Sum_{j=0..floor(n/(k+1))} ((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j)) with k=7.

A172318 9th column of the array A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 511, 1020, 2036, 4064, 8112, 16192, 32320, 64512, 128768, 257025, 513030, 1024024, 2043984, 4079856, 8143520, 16254720, 32444928, 64761088, 129265151, 258017272, 515010520, 1027977056
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Examples

			a(7)=C(7,7)*2^7=128. a(10)=C(10,10)*2^10-C(2,1)*2^1=1020.
		

Crossrefs

Partial sums of A079262.

Programs

  • Maple
    for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od; k:=8:taylor(1/(1-2*z+z^(k+1)),z=0,30);

Formula

G.f.: 1/(1-2*z+z^9).
a(n) = sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))) with k=8.
Recurrence relation: a(n+9) = 2*a(8) - a(n).

A172319 10th column of A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1023, 2044, 4084, 8160, 16304, 32576, 65088, 130048, 259840, 519168, 1037313, 2072582, 4141080, 8274000, 16531696, 33030816, 65996544, 131863040, 263466240, 526413312, 1051789311
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Crossrefs

Partial sums of A104144.

Programs

  • Maple
    for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od;
  • Mathematica
    LinearRecurrence[{2,0,0,0,0,0,0,0,0,-1},{1,2,4,8,16,32,64,128,256,512},40] (* Harvey P. Dale, Sep 22 2020 *)

Formula

G.f.: 1/(1-2*z+z^10).
a(n)=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))). a(n+10)=2*a(n+9)-a(n).

A018923 Define the generalized Pisot sequence T(a(0),a(1)) by: a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n). This is T(16,32).

Original entry on oeis.org

16, 32, 63, 124, 244, 480, 944, 1856, 3649, 7174, 14104, 27728, 54512, 107168, 210687, 414200, 814296, 1600864, 3147216, 6187264, 12163841, 23913482, 47012668, 92424472, 181701728, 357216192, 702268543, 1380623604, 2714234540, 5336044608, 10490387488
Offset: 0

Views

Author

Keywords

Comments

Not to be confused with the Pisot T(16,32) sequence, which is essentially A000079. - R. J. Mathar, Feb 13 2016

Crossrefs

Is this the same sequence as A001949?

Programs

  • Mathematica
    T[a_, b_, n_] := Block[{s = {a, b}, k}, Do[k = 2 Last@ s; While[k/s[[i - 1]] >= s[[i - 1]]/s[[i - 2]], k--]; AppendTo[s, k], {i, 3, n}]; s]; T[16, 32, 23] (* or *)
    a = {16, 32}; Do[AppendTo[a, Ceiling[a[[n - 1]]^2/a[[n - 2]]] - 1], {n, 3, 23}]; a (* Michael De Vlieger, Feb 15 2016 *)
    RecurrenceTable[{a[1] == 16, a[2] == 32, a[n] == Ceiling[a[n-1]^2/a[n-2] - 1]}, a, {n, 40}] (* Vincenzo Librandi, Feb 17 2016 *)
  • PARI
    T(a0, a1, maxn) = a=vector(maxn); a[1]=a0; a[2]=a1; for(n=3, maxn, a[n]=ceil(a[n-1]^2/a[n-2])-1); a
    T(16, 32, 30) \\ Colin Barker, Feb 16 2016

Formula

Empirical G.f.: -(8*x^5+4*x^4+2*x^3+x^2-16) / ((x-1)*(x^5+x^4+x^3+x^2+x-1)). - Colin Barker, Dec 21 2012
a(n+1) = ceiling(a(n)^2/a(n-1))-1 for n>0. - Bruno Berselli, Feb 15 2016
Showing 1-10 of 11 results. Next