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.

Previous Showing 11-19 of 19 results.

A271034 T(n,k)=Number of nXnXn triangular 0..k arrays with some element less than a w, nw or ne neighbor exactly once.

Original entry on oeis.org

0, 0, 2, 0, 8, 10, 0, 20, 72, 34, 0, 40, 294, 450, 98, 0, 70, 896, 3114, 2420, 258, 0, 112, 2268, 15116, 29120, 12010, 642, 0, 168, 5040, 58036, 232432, 256020, 56754, 1538, 0, 240, 10164, 188034, 1402082, 3441072, 2173554, 259628, 3586, 0, 330, 19008, 535106
Offset: 1

Views

Author

R. H. Hardin, Mar 29 2016

Keywords

Comments

Table starts
....0.......0.........0...........0............0..............0...............0
....2.......8........20..........40...........70............112.............168
...10......72.......294.........896.........2268...........5040...........10164
...34.....450......3114.......15116........58036.........188034..........535106
...98....2420.....29120......232432......1402082........6872424........28658242
..258...12010....256020.....3441072.....33505396......255757328......1610555756
..642...56754...2173554....50108414....804566180.....9790184488.....95420380090
.1538..259628..18060096...724727082..19525545192...386105784866...5945425725202
.3586.1160936.147976270.10461499634.479803630966.15669594394610.387907415514308

Examples

			Some solutions for n=4 k=4
.....0........0........0........1........0........1........0........0
....0.0......0.3......1.0......2.3......0.0......1.1......0.2......0.0
...1.0.0....3.3.3....3.4.4....3.4.4....0.1.3....0.1.2....0.2.2....1.1.0
..1.1.1.1..4.4.3.4..4.4.4.4..3.3.4.4..2.4.3.3..2.3.4.4..0.0.2.3..4.4.4.4
		

Crossrefs

Column 1 is A036799(n-1).
Row 2 is A007290(n+2).

Formula

Empirical for column k:
k=1: a(n) = 5*a(n-1) -8*a(n-2) +4*a(n-3)
Empirical for row n:
n=2: a(n) = (1/3)*n^3 + n^2 + (2/3)*n
n=3: [polynomial of degree 6]
n=4: [polynomial of degree 10]
n=5: [polynomial of degree 15]
n=6: [polynomial of degree 21]

A036827 a(n) = 26 + 2^(n+1)*(-13 +9*n -3*n^2 +n^3).

Original entry on oeis.org

0, 2, 34, 250, 1274, 5274, 19098, 63002, 194074, 567322, 1591322, 4317210, 11395098, 29392922, 74350618, 184942618, 453378074, 1097334810, 2626158618, 6222250010, 14610858010, 34032582682, 78693531674, 180757725210, 412685959194
Offset: 0

Views

Author

Keywords

Examples

			a(3) = 2^0*0^3 + 2^1*1^3 + 2^2*2^3 + 2^3*3^3 = 250.
		

References

  • M. Petkovsek et al., A=B, Peters, 1996, p. 97.

Crossrefs

Cf. A059841 (p=0,q=-1), A130472 (p=1,q=-1), A089594 (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), this sequence (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).

Programs

  • Haskell
    a036827 n = 2^(n+1) * (n^3 - 3*n^2 + 9*n - 13) + 26
    -- Reinhard Zumkeller, May 24 2012
    
  • Magma
    [2*(13 + 2^n*(-13 +9*n -3*n^2 +n^3)): n in [0..35]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A036827:= n-> 2*(13 + 2^n*(-13 +9*n -3*n^2 +n^3)); seq(A026827(n), n=0..30); # G. C. Greubel, Mar 31 2021
  • Mathematica
    Table[26 +2^(n+1)(-13 +9n -3n^2 +n^3), {n, 0, 30}] (* or *) LinearRecurrence[ {9, -32, 56, -48, 16}, {0, 2, 34, 250, 1274}, 31] (* Harvey P. Dale, Dec 15 2011 *)
  • PARI
    a(n)=26+2^(n+1)*(-13+9*n-3*n^2+n^3) \\ Charles R Greathouse IV, Oct 07 2015
    
  • Sage
    [2*(13 + 2^n*(-13 +9*n -3*n^2 +n^3)) for n in (0..35)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = Sum_{k=0..n} 2^k*k^3. - Benoit Cloitre, Jun 11 2003
G.f.: 2*x*(1 +8*x +4*x^2)/((1-x)*(1-2*x)^4). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 26 2009
a(n) = 9*a(n-1) -32*a(n-2) +56*a(n-3) -48*a(n-4) +16*a(n-5) for n>4 with a(0)=0, a(1)=2, a(2)=34, a(3)=250, a(4)=1274. - Harvey P. Dale, Dec 15 2011
a(n) = Sum_{k=0..n} Sum_{i=0..n} k^3 * C(k,i). - Wesley Ivan Hurt, Sep 21 2017
E.g.f.: 2 (13*exp(x) + (-13 +14*x +8*x^3)*exp(2*x)). - G. C. Greubel, Mar 31 2021

A296354 Official position where binary expansion of n starts in the list of binary numbers in the binary Champernowne sequence A076478.

Original entry on oeis.org

0, 1, 6, 8, 22, 25, 28, 31, 66, 70, 74, 78, 82, 86, 90, 94, 178, 183, 188, 193, 198, 203, 208, 213, 218, 223, 228, 233, 238, 243, 248, 253, 450, 456, 462, 468, 474, 480, 486, 492, 498, 504, 510, 516, 522, 528, 534, 540, 546, 552, 558, 564, 570, 576, 582, 588
Offset: 0

Views

Author

N. J. A. Sloane, Dec 14 2017

Keywords

Comments

a(n) is the official position where the binary expansion of n appears. The binary expansion of n may also appear earlier, by accident, see A296355 and A296356.

Examples

			Here is the list A076478 broken up to show the successive binary numbers (the indexing starts at 0):
0,
1,
0,0,
0,1,
1,0,
1,1,
0,0,0,
0,0,1,
0,1,0,
0,1,1,
1,0,0,
1,0,1,
...
2 = 1,0 starts at position 6, so a(2) = 6.
4 = 1,0,0 starts at position 22, so a(4) = 22.
		

Crossrefs

Programs

  • PARI
    a(n) = my (w=#binary(n)); return (2 + 2^w*(w-2) + w*n) \\ Rémy Sigrist, Dec 15 2017

Formula

a(n) = A036799(A029837(n + 1) - 1) + A029837(n + 1) * n. - Rémy Sigrist, Dec 15 2017

Extensions

More terms from Rémy Sigrist, Dec 15 2017

A076688 a(n) = 2^(2^n-n-2).

Original entry on oeis.org

1, 8, 1024, 33554432, 72057594037927936, 664613997892457936451903530140172288, 113078212145816597093331040047546785012958969400039613319782796882727665664
Offset: 2

Views

Author

Benoit Cloitre, Oct 25 2002

Keywords

Comments

Integer values of 1/(2-Sum_{i=1..m} i/2^i).
The next term a(9) has 151 digits, and is too large to include in data. - Bernard Schott, Aug 27 2020

Crossrefs

Cf. A036799.
Subsequence of A289585.

Programs

  • Maple
    Data := [seq(2^(2^n-n-2),  n = 2..8)]; \\ Bernard Schott, Aug 26 2020
  • Mathematica
    Table[2^(2^n - n - 2), {n, 2, 8}] (* Amiram Eldar, Aug 27 2020 *)

A277914 a(n) is the number of zeros minus the number of ones among the first n terms of A076478.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Nov 03 2016

Keywords

Comments

A036799 gives the positions of zeros in this sequence.
Between two zeros, the graph of the sequence looks like a Takagi (or blancmange) curve.

Crossrefs

Programs

  • Mathematica
    Join[{0},Flatten[Array[Accumulate[Flatten[Tuples[{1,-1},#]]]&,5]]] (* Paolo Xausa, Dec 08 2023 *)

Formula

a(n) = Sum_{i=0..n-1} (-1)^A076478(i) for any n>=0.

A286778 Sum of the common path length over all 2-tuples of nodes in a complete binary tree of height n.

Original entry on oeis.org

0, 2, 22, 142, 734, 3390, 14718, 61694, 253438, 1029118, 4151294, 16683006, 66904062, 267993086, 1072791550, 4292935678, 17175543806, 68710301694, 274858508286, 1099470733310, 4397960527870, 17592005689342, 70368366690302, 281474188181502, 1125898262675454, 4503596204818430, 18014391395942398
Offset: 0

Views

Author

F. Skerman, Jul 05 2017

Keywords

Comments

Let the height of the binary tree be one less than the number of rows; i.e., a complete binary tree of height 2 has one root node, its two descends and four leaf nodes. Any node u has a unique path to the root of the binary tree. Let h(u,v) be the length of the intersection of these paths for nodes u and v. Then a(n) is defined to be the sum of h(u,v) over all ordered 2-tuples of nodes in a binary tree of height n.
Also the sum over all 2-tuples of nodes of the depth of their last common ancestor in the tree. Defined in this way and denoted Q(T) in the Janson link.
Let z(v) be the number of nodes in the subtree rooted at node v (so if u is the root z(u) is the number of nodes in the tree). Then a(n) is also the sum of squares of the z(v) over all non-root nodes v in the tree.

Examples

			A complete binary tree of height two consists of one root node (at depth 0), two children of the root (at depth 1) and four leaf nodes (at depth 2). Notice the common path length of node u with itself, h(u,u), is simply the depth of u.
The only 2-tuples to have common path length two is a leaf with itself (4 such tuples). Each child of the root with itself has common path length one (2 such tuples), as does each leaf with its sibling (4 such tuples) and each leaf with its parent (8 such tuples). All other 2-tuples have only the root as a common ancestor. Hence a(2) = 2*4 + 1*(2 + 4 + 8) + 0 = 22.
		

Crossrefs

Cf. A036799 (total path length of a binary tree of height n).

Programs

  • Maple
    seq( 4*2^(2*n) - (4*n+2)*2^n - 2, n=0..30); # Robert Israel, Jul 05 2017
  • Mathematica
    LinearRecurrence[{9,-28,36,-16},{0,2,22,142},40] (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    a(n) = sum(d=1, n, 2^d*(2^(n+1-d)-1)^2); \\ Michel Marcus, Jul 05 2017
    
  • PARI
    concat(0, Vec(2*x*(1 + 2*x) / ((1 - x)*(1 - 2*x)^2*(1 - 4*x)) + O(x^30))) \\ Colin Barker, Jul 05 2017
  • Sage
    [sum(2^d*(2^(n+1-d)-1)^2 for d in range(1,n+1)) for n in range(20)]
    

Formula

a(n) = Sum_{d=1..n} 2^d*(2^(n+1-d)-1)^2.
From Robert Israel, Jul 05 2017: (Start)
a(n) = 4*2^(2*n) - (4*n+2)*2^n - 2.
G.f.: 2*x*(2*x+1)/((4*x-1)*(x-1)*(2*x-1)^2).
E.g.f.: 4*exp(4*x)-(8*x+2)*exp(2*x)-2*exp(x).
(End)
a(n) = 9*a(n-1) - 28*a(n-2) + 36*a(n-3) - 16*a(n-4) for n>3. - Colin Barker, Jul 05 2017
a(n)-a(n-1) = A050488(n)*2^n . - R. J. Mathar, Aug 26 2025

A368479 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where T(n,k) = Sum_{j=0..n} 2^j * j^k.

Original entry on oeis.org

1, 0, 3, 0, 2, 7, 0, 2, 10, 15, 0, 2, 18, 34, 31, 0, 2, 34, 90, 98, 63, 0, 2, 66, 250, 346, 258, 127, 0, 2, 130, 714, 1274, 1146, 642, 255, 0, 2, 258, 2074, 4810, 5274, 3450, 1538, 511, 0, 2, 514, 6090, 18458, 24810, 19098, 9722, 3586, 1023
Offset: 0

Views

Author

Seiichi Manyama, Dec 26 2023

Keywords

Examples

			Square array begins:
    1,   0,    0,     0,      0,      0,       0, ...
    3,   2,    2,     2,      2,      2,       2, ...
    7,  10,   18,    34,     66,    130,     258, ...
   15,  34,   90,   250,    714,   2074,    6090, ...
   31,  98,  346,  1274,   4810,  18458,   71626, ...
   63, 258, 1146,  5274,  24810, 118458,  571626, ...
  127, 642, 3450, 19098, 107754, 616122, 3557610, ...
		

Crossrefs

Columns k=0..3 give A126646, A036799, A036800, A036827.
Main diagonal gives A368466.

Programs

  • PARI
    T(n, k) = sum(j=0, n, 2^j*j^k);

Formula

G.f. of column k: 2*x*A_k(2*x)/((1-x) * (1-2*x)^(k+1)), where A_n(x) are the Eulerian polynomials for k > 0.

A141901 Triangle T(n, k) = Sum_{j=0..n-k-1} binomial(n, j+k+1) - 2^(n-k) with T(n, 0) = 1, read by rows.

Original entry on oeis.org

1, 1, -1, 1, -1, -1, 1, 0, -1, -1, 1, 3, 1, -1, -1, 1, 10, 8, 2, -1, -1, 1, 25, 26, 14, 3, -1, -1, 1, 56, 67, 48, 21, 4, -1, -1, 1, 119, 155, 131, 77, 29, 5, -1, -1, 1, 246, 338, 318, 224, 114, 38, 6, -1, -1, 1, 501, 712, 720, 574, 354, 160, 48, 7, -1, -1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 13 2008

Keywords

Examples

			Triangle begins as:
  1;
  1,  -1;
  1,  -1,  -1;
  1,   0,  -1,  -1;
  1,   3,   1,  -1,  -1;
  1,  10,   8,   2,  -1,  -1;
  1,  25,  26,  14,   3,  -1,  -1;
  1,  56,  67,  48,  21,   4,  -1, -1;
  1, 119, 155, 131,  77,  29,   5, -1, -1;
  1, 246, 338, 318, 224, 114,  38,  6, -1, -1;
  1, 501, 712, 720, 574, 354, 160, 48,  7, -1, -1;
		

Crossrefs

Programs

  • Magma
    T:= func< n,k | k eq 0 select 1 else (&+[Binomial(n, j+k+1): j in [0..n]]) - 2^(n-k)>;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 29 2021
    
  • Mathematica
    (* First program *)
    T[n_, k_]:= If[k==0, 1, Binomial[n,k+1]*Hypergeometric2F1[1, 1+k-n, 2+k, -1] - 2^(n-k)];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, Mar 29 2021 *)
    (* Second program *)
    T[n_, k_]:= If[k==0, 1, Sum[Binomial[n, j+k+1], {j, 0, n-k-1}] - 2^(n-k)];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 29 2021 *)
  • SageMath
    @CachedFunction
    def T(n,k):
        if k==0: return 1
        else: return sum( binomial(n, j+k+1) for j in (0..n-k-1) ) - 2^(n-k)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 29 2021

Formula

T(n, k) = binomial(n, k+1)*Hypergeometric2F1([1, 1+k-n], [2+k], -1) - 2^(n-k) with T(n, 0) = 1.
From G. C. Greubel, Mar 29 2021: (Start)
T(n, k) = Sum_{j=0..n-k-1} binomial(n, j+k+1) - 2^(n-k) with T(n, 0) = 1.
Sum_{k=0..n} T(n, k) = 2^(n-1)*(n-4) + 3 = A036799(n-3) - A000225(n-1). (End)

Extensions

Edited by G. C. Greubel, Mar 29 2021

A167203 Number of Young tableaux with n cells and k inversions.

Original entry on oeis.org

1, 2, 4, 8, 2, 16, 10, 32, 34, 5, 5, 64, 98, 35, 35, 128, 258, 154, 154, 14, 42, 14
Offset: 1

Views

Author

Alford Arnold, Nov 07 2009

Keywords

Comments

The sequence of rowsums is A000085, and the sequence of number of terms in each row is A002865.

Examples

			The irregular triangle begins
..1
..2
..4
..8...2
.16..10
.32..34...5...5
.64..98..35..35
128.258.154.154..14..42..14
etc.
		

Crossrefs

Cf. A000041, A002865, A000079 (rowsum of A007318), A036799 (rowsum of A059797), A117506.
Previous Showing 11-19 of 19 results.