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 101-109 of 109 results.

A227978 a(0)=1, a(1)=2; for n>1, a(n) = n*(2^n+4)/4.

Original entry on oeis.org

1, 2, 4, 9, 20, 45, 102, 231, 520, 1161, 2570, 5643, 12300, 26637, 57358, 122895, 262160, 557073, 1179666, 2490387, 5242900, 11010069, 23068694, 48234519, 100663320, 209715225, 436207642, 905969691, 1879048220, 3892314141, 8053063710, 16642998303
Offset: 0

Views

Author

Paul Curtz, Oct 07 2013

Keywords

Comments

The inverse binomial transform of A176328/A176591 (see Comments field in A228827) begins: 1, -2, 25/6, -9, 599/30, -45, 4285/42, -231, 15599/30, -1161, 169625/66, ... Consider these values without sign and the fractions rounded to the nearest integer, the sequence lists the resulting numbers.
Differences table of a(n):
1, 2, 4, 9, 20, 45, 102, 231, 520, 1161, ...
1, 2, 5, 11, 25, 57, 129, 289, 641, 1409, ... After 2: 2^m*(m+4)+1.
1, 3, 6, 14, 32, 72, 160, 352, 768, 1664, ... A078836 (after 3).
2, 3, 8, 18, 40, 88, 192, 416, 896, 1920, ... A129955.
1, 5, 10, 22, 48, 104, 224, 480, 1024, 2176, ... A079861 (after 5).
4, 5, 12, 26, 56, 120, 256, 544, 1152, 2432, ... After 5: 2^m*(m+12).
1, 7, 14, 30, 64, 136, 288, 608, 1280, 2688, ... After 7: 2^m*(m+14).
6, 7, 16, 34, 72, 152, 320, 672, 1408, 2944, ..., etc.
(n-1)*a(n)-n*a(n-1) = A001788(n-1) for n>1. [Bruno Berselli, Oct 11 2013]

Crossrefs

Programs

  • Magma
    [1,2] cat [n*(2^n+4)/4: n in [2..40]]; // Bruno Berselli, Oct 11 2013
    
  • Mathematica
    Join[{1, 2}, Table[n (2^n + 4)/4, {n, 2, 40}]] (* Bruno Berselli, Oct 11 2013 *)
  • PARI
    a(n) = if (n == 0, 1, if (n == 1, 2, n*(2^n+4)/4)); \\ Michel Marcus, Oct 11 2013

Formula

a(2n+2) = A229135(n+1); a(2n-1) = -A228767(n) for n>0.
a(n) = 6*a(n-1) -13*a(n-2) +12*a(n-3) -4*a(n-4) for n>5.
G.f.: (1-4*x+5*x^2-x^3-2*x^4+2*x^5)/((1-x)^2*(1-2*x)^2). - Colin Barker, Oct 09 2013

Extensions

More terms from Colin Barker, Oct 09 2013

A283260 Product of the products of elements of all the nonempty subsets of the sets of numbers from 1 to n.

Original entry on oeis.org

1, 4, 1296, 110075314176, 1848842588950364160000000000000000, 27204445973673520186989292010512474445356561349778469394841600000000000000000000000000000000
Offset: 1

Views

Author

Jaroslav Krizek, Mar 04 2017

Keywords

Comments

a(7) has 237 digits.

Examples

			Rows with nonempty subsets of the sets of numbers from 1 to n:
{1};
{1}, {2}, {1, 2};
{1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3};
...
Rows with the products of elements of these subsets:
1;
1, 2, 2;
1, 2, 3, 2, 3, 6, 6;
...
a(1) = (1), a(2) = (1*2*2) = 4, a(3) = (1*2*3*2*3*6*6) = 1296, ...
		

Crossrefs

Programs

Formula

a(n) = (n!)^(2^(n-1)).

A349706 Square array T(n,k) = Sum_{j=0..k} binomial(k,j) * j^n for n and k >= 0, read by ascending antidiagonals.

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 0, 1, 4, 8, 0, 1, 6, 12, 16, 0, 1, 10, 24, 32, 32, 0, 1, 18, 54, 80, 80, 64, 0, 1, 34, 132, 224, 240, 192, 128, 0, 1, 66, 342, 680, 800, 672, 448, 256, 0, 1, 130, 924, 2192, 2880, 2592, 1792, 1024, 512, 0, 1, 258, 2574, 7400, 11000, 10752, 7840, 4608, 2304, 1024
Offset: 0

Views

Author

Michel Marcus, Nov 26 2021

Keywords

Examples

			Square array begins:
  1 2  4   8   16    32
  0 1  4  12   32    80
  0 1  6  24   80   240
  0 1 10  54  224   800
  0 1 18 132  680  2880
  0 1 34 342 2192 11000
		

Crossrefs

Main diagonal gives A072034.
Cf. A209849.

Programs

  • Mathematica
    T[n_, k_] := Sum[Binomial[k, j] * If[j == n == 0, 1, j^n], {j, 0, k}]; Table[T[n - k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Nov 26 2021 *)
  • PARI
    T(n,k) = sum(j=0, k, binomial(k,j)*j^n);

A364688 Number of 8-cycles in the hypercube graph Q_n.

Original entry on oeis.org

0, 0, 0, 6, 696, 6720, 39840, 184800, 736512, 2644992, 8801280, 27624960, 82790400, 238977024, 668688384, 1822679040, 4858183680, 12700876800, 32647938048, 82682707968, 206650736640, 510425825280, 1247438438400, 3019527684096, 7245593051136, 17248655769600
Offset: 0

Views

Author

Eric W. Weisstein, Aug 02 2023

Keywords

Crossrefs

Cf. A001788 (4-cycles).
Cf. A290031 (6-cycles).

Programs

  • Mathematica
    Table[Length[FindCycle[HypercubeGraph[n], {8}, All]], {n, 0, 9}]
    Table[2^(n - 4) n (n - 1) (n - 2) (27 n - 79), {n, 0, 20}]
    Table[3 2^(n - 3) Binomial[n, 3] (27 n - 79), {n, 0, 20}]
    LinearRecurrence[{10, -40, 80, -80, 32}, {0, 0, 0, 6, 696}, 20]
    CoefficientList[Series[6 x^3 (1 + 106 x)/(1 - 2 x)^5, {x, 0, 20}], x]

Formula

a(n) = 2^(n - 4)*n*(n - 1)*(n - 2)*(27*n - 79).
a(n) = 10*a(n-1) - 40*a(n-2) + 80*a(n-3) - 80*a(n-4) + 32*a(n-5).
G.f.: -6*x^3*(1 + 106*x)/(-1 + 2*x)^5.

A372873 Triangle read by rows: T(n,k) is the number of flattened Catalan words of length n with exactly k runs of descents.

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 0, 0, 6, 8, 0, 0, 1, 24, 16, 0, 0, 0, 10, 80, 32, 0, 0, 0, 1, 60, 240, 64, 0, 0, 0, 0, 14, 280, 672, 128, 0, 0, 0, 0, 1, 112, 1120, 1792, 256, 0, 0, 0, 0, 0, 18, 672, 4032, 4608, 512, 0, 0, 0, 0, 0, 1, 180, 3360, 13440, 11520, 1024
Offset: 1

Views

Author

Stefano Spezia, May 15 2024

Keywords

Examples

			The triangle begins:
  1;
  0, 2;
  0, 1, 4;
  0, 0, 6,  8;
  0, 0, 1, 24, 16;
  0, 0, 0, 10, 80,  32;
  0, 0, 0,  1, 60, 240,   64;
  0, 0, 0,  0, 14, 280,  672,  128;
  0, 0, 0,  0,  1, 112, 1120, 1792, 256;
  ...
T(4,3) = 6 since there 6 flattened Catalan words of length 4 with 3 runs of descents: 0010, 0100, 0101, 0110, 0120, and 0121.
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=SeriesCoefficient[x*y*(1-2*x*y)/(1-4*x*y-x^2*y+4x^2*y^2),{x,0,n},{y,0,k}]; Table[T[n,k],{n,11},{k,n}]//Flatten (* or *)
    T[n_,k_]:=2^(2*k-n-1)*Binomial[n-1, 2*(n-k)]; Table[T[n,k],{n,11},{k,n}]//Flatten

Formula

G.f.: x*y*(1 - 2*x*y)/(1 - 4*x*y - x^2*y + 4*x^2*y^2).
T(n,k) = 2^(2*k-n-1)*binomial(n-1, 2*(n-k)).
T(n,n) = A000079(n-1).
T(n,n-1) = A001788(n-2).
T(n,1) = A000007(n-1).
T(n,2) = A033322(n-1).
Sum_{k>=0} T(n,k) = A007051(n-1).

A157933 Triangle T(i,j) such that Sum_{j=0..i} T(i,j)*x(i,j)/2^i = Sum_{k=0..i, j=0..k} x(k,j), if x(k-1,j) = (x(k,j) + x(k,j+1))/2.

Original entry on oeis.org

1, 3, 3, 7, 10, 7, 15, 25, 25, 15, 31, 56, 66, 56, 31, 63, 119, 154, 154, 119, 63, 127, 246, 337, 372, 337, 246, 127, 255, 501, 711, 837, 837, 711, 501, 255, 511, 1012, 1468, 1804, 1930, 1804, 1468, 1012, 511, 1023, 2035, 2992, 3784, 4246, 4246, 3784, 2992, 2035, 1023
Offset: 0

Views

Author

M. F. Hasler, Mar 16 2009

Keywords

Comments

Rows and columns are numbered starting with 0. Consider a pyramid (triangle) where each element is the mean value of the two elements below. Then the sum of all elements is expressed as linear combination of the elements at the base. This sequence gives the coefficients times the necessary power of 2.

Examples

			To get the 3rd row of the triangle, consider the pyramid
    f
   d e
  a b c
where d=(a+b)/2, e=(b+c)/2, f=(d+e)/2. Then a+b+c+d+e+f=(7a+10b+7c)/2^2, which yields the row (7,10,7).
Triangle begins:
   1,
   3,   3;
   7,  10,   7;
  15,  25,  25,  15;
  31,  56,  66,  56,  31;
  63, 119, 154, 154, 119, 63;
  ...
		

Crossrefs

Row sums give A001788(n+1).
T(2n,n) gives A033504.

Formula

The first and last term in the (i+1)-th row is T(i,0) = 2^(i+1)-1.
The second and penultimate term is T(i,1) = T(i,0) + T(i-1,1).
G.f.: 1/((1-2*x)*(1-2*x*y)*(1-x-x*y)). - Yu-Sheng Chang, Sep 20 2023

A181372 Square array read by antidiagonals: a(p,n) is the number of inversions in all p-ary words of length n on {0,1,2,...,p-1} (p>=2, n>=2).

Original entry on oeis.org

1, 3, 6, 6, 27, 24, 10, 72, 162, 80, 15, 150, 576, 810, 240, 21, 270, 1500, 3840, 3645, 672, 28, 441, 3240, 12500, 23040, 15309, 1792, 36, 672, 6174, 32400, 93750, 129024, 61236, 4608, 45, 972, 10752, 72030, 291600, 656250, 688128, 236196, 11520
Offset: 2

Views

Author

Emeric Deutsch, Oct 31 2010

Keywords

Comments

a(2,n)=A001788(n-1).
a(3,n)=A129530(n).
a(4,n)=A129532(n).

Examples

			a(2,3)=6 because the words 010, 100, 101, 110 have 1, 2, 1, 2 inversions, respectively, while 000, 001, 011 and 111 have none.
a(3,2)=3 because each of the words 10, 20, 21 has 1 inversion, while 00, 01, 02, 11, 12, 22 have none.
Square array starts:
1,6,24,80,240, ...;
3,27,162,810,3645, ... ;
6,72,576, 3840,23040, ... ;
10,150,1500,12500, 93750,...;
		

Crossrefs

Programs

  • Maple
    a := proc (p, n) options operator, arrow: (1/4)*n*(n-1)*(p-1)*p^(n-1) end proc: for p from 2 to 8 do seq(a(p, n), n = 2 .. 8) end do; # yields the first seven rows and seven columns of the square array

Formula

a(p,n)=n(n-1)(p-1)p^{n-1}/4.

A276985 Triangle read by rows: T(n,k) = number of k-dimensional elements in an n-dimensional cross-polytope, n>=1, 0<=k

Original entry on oeis.org

2, 4, 4, 6, 12, 8, 8, 24, 32, 16, 10, 40, 80, 80, 32, 12, 60, 160, 240, 192, 64, 14, 84, 280, 560, 672, 448, 128, 16, 112, 448, 1120, 1792, 1792, 1024, 256, 18, 144, 672, 2016, 4032, 5376, 4608, 2304, 512, 20, 180, 960, 3360, 8064, 13440, 15360, 11520, 5120
Offset: 1

Views

Author

Felix Fröhlich, Sep 24 2016

Keywords

Comments

It appears that this is 2*A193862 (but with a different offset) and that the sum of terms of the n-th row is A024023(n) = 3^n - 1. - Michel Marcus, Sep 29 2016

Examples

			T(4, 1..4) = 8, 24, 32, 16, because the 16-cell has 8 0-faces (vertices), 24 1-faces (edges), 32 2-faces (faces) and 16 3-faces (cells).
Triangle starts
2
4, 4
6, 12, 8
8, 24, 32, 16
10, 40, 80, 80, 32
12, 60, 160, 240, 192, 64
14, 84, 280, 560, 672, 448, 128
16, 112, 448, 1120, 1792, 1792, 1024, 256
18, 144, 672, 2016, 4032, 5376, 4608, 2304, 512
20, 180, 960, 3360, 8064, 13440, 15360, 11520, 5120, 1024
		

References

  • H. S. M. Coxeter, Regular Polytopes, Third Edition, Dover Publications, 1973, ISBN 9780486141589.

Crossrefs

Cf. A038207 (hypercube), A135278 (simplex).
Rows: A005843(n), A046092(n), A130809(n+2), A130810(n+3).
Columns: A000079(n), A001787(n), A001788(n), A001789(n+3).

Programs

  • Mathematica
    Table[2^(k + 1) Binomial[n, k + 1], {n, 10}, {k, 0, n - 1}] // Flatten (* Michael De Vlieger, Sep 25 2016 *)
  • PARI
    T(n, k) = 2^(k+1)*binomial(n, k+1)
    trianglerows(n) = for(x=1, n, for(y=0, x-1, print1(T(x, y), ", ")); print(""))
    trianglerows(10) \\ print initial 10 rows of triangle

Formula

T(n,k) = 2^(k+1) * binomial(n, k+1) (cf. Coxeter, 1973, formula 7.22).
T(n,k) = A182059(n,k) = A013609(n,k) . - R. J. Mathar, May 03 2017
G.f.: 2*x/((1 - x)*(1 - x - 2*x*y)). - Stefano Spezia, Jul 17 2025

A381457 Integers encoding the recursive structure of a bitonic sorter network of n elements in their binary expansion.

Original entry on oeis.org

0, 2, 5, 2762, 22325, 175338, 1405781, 187796017958058, 12026023042822997, 768764969792360106, 49208135664973067605, 3148398007269257431722, 201504853864147844281685, 12895366188400224861219498, 825310989999256684769531221
Offset: 1

Views

Author

Darío Clavijo, Mar 13 2025

Keywords

Comments

These integers represent the control logic or network topology of a bitonic sorter, a parallel sorting algorithm. For n = 2^k, their binary expansions mirror the sorter's recursive, fractal-like stages: each level splits into two smaller sorters (n/2), followed by a merging step. This creates a self-similar pattern where the binary bits 'track' the hierarchical stages of the algorithm.
A bitonic sorting network for n = 2^k elements requires (n/2)*(log_2(n))*(log_2(n) + 1) comparators (Batcher, 1968). This sequence extends the construction to arbitrary n by padding to the next power of 2 and pruning redundant comparators. The validity of this generalization as a sorting network remains conjectural; proofs are sought.
a(n) is constructed in most significant bit to less significant bit order.
Also, for n=2^k the comparator network has n columns and A000217(k) rows and a(n) has A001788(n) bits set which is exactly half of the bit size of a(n).
The parity of a(n) is the same parity of n for n > 1.
For n >= 4, a(n) is composed of repeating patterns of bits, take for instance a(11) = 10101010101_11001100110_10101010101_11110000111_11001100110_10101010101_2 = 49208135664973067605. This shows the self-similarity pattern.

Examples

			 n | k  | i                   | Comparator network (1 = \ and 0 = /). | a(n)
---+----+---------------------+---------------------------------------+----------------
 2 | 2  | 10                  | \/                                    | 2
---+----+---------------------+---------------------------------------+----------------
 4 | 2  | 1010                | \/ \/                                 | 2762
   | 4  | 1100                | \   /                                 |
   | 4  | 1010                | \/ \/                                 |
---+----+---------------------+---------------------------------------+----------------
 8 | 2  | 1010 1010           | \/ \/ \/ \/                           | 187796017958058
   | 4  | 1100 1100           | \   / \   /                           |
   | 4  | 1010 1010           | \/ \/ \/ \/                           |
   | 8  | 1111 0000           | \         /                           |
   | 8  | 1100 1100           | \   / \   /                           |
   | 8  | 1010 1010           | \/ \/ \/ \/
For n = 5 the network is similar to the network for n = 4 plus a column of ones, which is also a network contained in the network for n = 8.
 5 | 2  | 1010 1              | \/ \/ \                               | 22325
   | 4  | 1100 1              | \   / \                               |
   | 4  | 1010 1              | \/ \/ \                               |
		

Crossrefs

Programs

  • Python
    def a(n):
        e, k = 0, 2
        while k <= n:
            j = k >> 1
            while j > 0:
                for i in range(n):
                    e = (e << 1) | ((i & j) == 0)
                j >>= 1
            k <<= 1
        return e
    print([a(n) for n in range(1,16)])
Previous Showing 101-109 of 109 results.