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 31-40 of 44 results. Next

A085870 Array defined by T(i,1)=2^i-1, T(1,j)=2^j-1, T(i,j)=T(i-1,j)+T(i-1,j-1) read by antidiagonals.

Original entry on oeis.org

1, 3, 3, 7, 4, 7, 15, 7, 10, 15, 31, 14, 14, 22, 31, 63, 29, 21, 32, 46, 63, 125, 60, 35, 46, 68, 94, 125, 249, 123, 64, 67, 100, 140, 188, 249, 497, 248, 124, 102, 146, 208, 282, 374, 497, 993, 497, 247, 166, 213, 308, 422, 562, 746, 993, 1985, 994, 495, 290, 315, 454, 630, 844, 1120, 1490, 1985
Offset: 1

Views

Author

Benoit Cloitre, Aug 12 2003

Keywords

Crossrefs

Cf. A027649 (main diagonal).

A103457 a(n) = 3^n + 1 - 0^n.

Original entry on oeis.org

1, 4, 10, 28, 82, 244, 730, 2188, 6562, 19684, 59050, 177148, 531442, 1594324, 4782970, 14348908, 43046722, 129140164, 387420490, 1162261468, 3486784402, 10460353204, 31381059610, 94143178828, 282429536482, 847288609444
Offset: 0

Views

Author

Paul Barry, Feb 07 2005

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [3^n + 1: n in [1..30]]; // G. C. Greubel, Jun 22 2021
    
  • Mathematica
    Join[{1},LinearRecurrence[{4,-3},{4,10},30]] (* Harvey P. Dale, Mar 29 2015 *)
  • PARI
    my(x='x+O('x^50)); Vec((1-3*x^2)/((1-x)*(1-3*x))) \\ Altug Alkan, Dec 04 2015
    
  • Sage
    [1]+[3^n + 1 for n in (1..30)] # G. C. Greubel, Jun 22 2021

Formula

G.f.: (1-3*x^2)/((1-x)*(1-3*x)).
a(n) = Sum_{k=0..n} binomial(n, k)*0^(k(n-k))*3^k.
From R. J. Mathar, Aug 04 2008: (Start)
a(n) = A034472(n), n>0.
a(n) = A094388(n-1), n>1.
a(n+1) - a(n) = A110593(n+1). (End)
a(n) = 3*a(n-1) - 2, with a(1)=4. - Vincenzo Librandi, Dec 29 2010
From J. Conrad, Nov 25 2015: (Start)
For n>0, a(n) = 2 * (A011782(0) + A011782(n) + Sum_{x=1..n-1} Sum_{k=0..x-1}(binomial(x-1,k)*(A011782(k+1) + A011782(n-x+k)))).
Alternatively, for n>0, a(n) = A027649(n) - 2 * Sum_{x=1..n-1}Sum_{k=0..x-1}(binomial(x-1,k)*(A011782(k+1) + A011782(n-x+k))). (End)
E.g.f.: -1 + exp(x) + exp(3*x). - G. C. Greubel, Jun 22 2021

A260217 Number of base-3 n-digit pandigital numbers.

Original entry on oeis.org

0, 0, 4, 24, 100, 360, 1204, 3864, 12100, 37320, 114004, 346104, 1046500, 3155880, 9500404, 28566744, 85831300, 257756040, 773792404, 2322425784, 6969374500, 20912317800, 62745342004, 188252803224, 564791964100, 1694443001160, 5083463221204, 15250658099064
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 19 2015

Keywords

Comments

From Manfred Boergens, Aug 02 2023: (Start)
a(n+1) is the number of pairs (A,B) where A and B are nonempty subsets of {1,2,...,n} and one of these subsets is a proper subset of the other.
If "proper" is omitted, see A091344.
If empty subsets are included, see A027649 (all subsets) and A056182 (proper subsets). (End)

Examples

			a(3)=4 because, in base 3, there are four 3-digit pandigital numbers (11=102_3, 15=120_3, 19=201_3, and 21=210_3).
a(4)=24 because, in base 3, there are 24 4-digit pandigital numbers (1002_3, 1012_3, 1020_3, 1021_3, 1022_3, 1102_3, 1120_3, 1200_3, 1201_3, 1202_3, 1210_3, 1220_3, 2001_3, 2010_3, 2011_3, 2012_3, 2021_3, 2100_3, 2101_3, 2102_3, 2110_3, 2120_3, 2201_3, and 2210_3).
		

Crossrefs

Programs

  • Magma
    [2*3^(n-1) - 2^(n+1) + 2: n in [1..30]]; // Vincenzo Librandi, Jul 20 2015
  • Mathematica
    Table[2 3^(n - 1) - 2^(n + 1) + 2, {n, 30}] (* Vincenzo Librandi, Jul 20 2015 *)

Formula

a(n) = 2*A028243(n) = 2*3^(n-1) - 2^(n+1) + 2.
a(n) = 4*A000392(n).
G.f.: 4*x^3/((1-x)*(1-2*x)*(1-3*x)).
E.g.f.: 2/3*((exp(x)-1)^3).

A372396 Triangle T(n,k) in which row n lists in increasing order the number of acyclic orientations of complete multipartite graphs K_lambda, where lambda is a partition of n; triangle T(n,k), n>=0, k = 1..A000041(n), read by rows.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 6, 1, 8, 14, 18, 24, 1, 16, 46, 54, 78, 96, 120, 1, 32, 146, 162, 230, 330, 384, 426, 504, 600, 720, 1, 64, 454, 486, 1066, 1374, 1536, 1902, 2286, 2616, 3000, 3216, 3720, 4320, 5040, 1, 128, 1394, 1458, 4718, 5658, 6144, 6902, 10554, 12090
Offset: 0

Views

Author

Alois P. Heinz, Apr 29 2024

Keywords

Comments

An acyclic orientation is an assignment of a direction to each edge such that no cycle in the graph is consistently oriented. Stanley showed that the number of acyclic orientations of a graph G is equal to the absolute value of the chromatic polynomial X_G(q) evaluated at q=-1.

Examples

			Triangle T(n,k) begins:
  1;
  1;
  1,  2;
  1,  4,   6;
  1,  8,  14,  18,  24;
  1, 16,  46,  54,  78,  96, 120;
  1, 32, 146, 162, 230, 330, 384, 426, 504, 600, 720;
  ...
		

Crossrefs

Columns k=1-3 give: A000012, A011782 (for n>=2), A027649(n-2) (for n>=4).
Row sums give A372395.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, add(
          expand(x*g(n-j))*binomial(n-1, j-1), j=1..n))
        end:
    h:= proc() option remember; local q, l, b; q, l, b:= -1, args,
          proc(n, j) option remember; `if`(j=1, mul(q-i, i=0..n-1)*
            (q-n)^l[1], add(b(n+m, j-1)*coeff(g(l[j]), x, m), m=0..l[j]))
          end; abs(b(0, nops(l)))
        end:
    b:= proc(n, i, l) `if`(n=0 or i=1, [h([l[], 1$n, 0])],
         [b(n-i, min(n-i, i), [l[], i])[], b(n, i-1, l)[]])
        end:
    T:= n-> sort(b(n$2, []))[]:
    seq(T(n), n=0..10);

Formula

T(n,A000041(n)) = A000142(n).
T(n,A000041(n)-1) = A001563(n-1) for n>=2.

A383621 a(n) is the minimum possible value of x_1 + x_2 + ... + x_n where x_1, x_2, ..., x_n are positive integers such that x_i does not divide x_j for any i != j.

Original entry on oeis.org

1, 5, 10, 17, 28, 41, 55, 72, 91, 111, 134, 159, 187, 216, 247, 282, 319, 360, 403, 447, 493, 540, 589, 641, 694, 749, 808, 869, 934, 1001, 1069, 1139, 1210, 1283, 1359, 1436, 1515, 1598, 1683, 1772, 1863, 1955, 2050, 2147, 2245, 2345, 2446, 2549, 2656, 2765, 2878
Offset: 1

Views

Author

Yifan Xie, May 10 2025

Keywords

Comments

The sequence is the solution to Problem 9 of 2022 Chinese Team Selection Test. - Yifan Xie, Jun 27 2025

Examples

			For n <= 6, the construction is given by the n smallest primes.
For n = 7, the numbers 4, 5, 6, 7, 9, 11, 13 are mutually indivisible and their sum is a(7) = 55.
		

Crossrefs

Cf. A027649.
Partial sums of A383622.

Programs

  • PARI
    A027649(n) = 2*3^n-2^n;
    A383622(nn) = {my(v=[]); for(n=0, logint(nn,3), d = A027649(n); m = floor(nn/d); for(i=0, floor(m/6), if(6*i+1 <= m, v=concat(v, d*(6*i+1))); if(6*i+5 <= m, v=concat(v, d*(6*i+5))))); v=vecsort(v); v};
    lista(nn) = {u = A383622(3*nn); my(v=vector(nn)); s=0; for(n=1, nn, s = s + u[n]; v[n] = s); v};

Formula

a(n) ~ c*n^2, where c = (3/2)*(Sum_{k=0..oo} 1/A027649(k))^(-1) = 1.108410...

A383622 First differences of A383621.

Original entry on oeis.org

1, 4, 5, 7, 11, 13, 14, 17, 19, 20, 23, 25, 28, 29, 31, 35, 37, 41, 43, 44, 46, 47, 49, 52, 53, 55, 59, 61, 65, 67, 68, 70, 71, 73, 76, 77, 79, 83, 85, 89, 91, 92, 95, 97, 98, 100, 101, 103, 107, 109, 113, 115, 116, 119, 121, 124, 125, 127, 131, 133, 137, 139, 140, 143
Offset: 1

Views

Author

Yifan Xie, May 10 2025

Keywords

Comments

The multiplication table T(i,j) = A027649(i) * A007310(j) for i >= 0 and j >= 1, sorted in ascending order. There are repeating terms: 322 appears twice.

Crossrefs

Programs

  • PARI
    A027649(n) = 2*3^n-2^n;
    upto(nn) = {v=[]; for(n=0, logint(nn,3), d = A027649(n); m = floor(nn/d); for(i=0, floor(m/6), if(6*i+1 <= m, v=concat(v, d*(6*i+1))); if(6*i+5 <= m, v=concat(v, d*(6*i+5))))); v=vecsort(v); v};

Formula

a(n) ~ c*n, where c = 3*(Sum_{k=0..oo} 1/A027649(k))^(-1) = 2.216821...

A095698 Number of permutations of {1,2,3,...,n} where, for 1 < i <= n, the i-th number has maximized sum of the i-1 absolute differences from all previous numbers of the permutation.

Original entry on oeis.org

1, 2, 4, 6, 14, 18, 46, 54, 146, 162, 454, 486, 1394, 1458, 4246, 4374, 12866, 13122, 38854, 39366, 117074, 118098, 352246, 354294, 1058786, 1062882, 3180454, 3188646, 9549554, 9565938, 28665046, 28697814, 86027906, 86093442, 258149254
Offset: 1

Views

Author

Rick L. Shepherd, Jul 06 2004

Keywords

Comments

Another variant of A095236: Here each phone after the first selected (which can still be any) is chosen such that the total distance in the normal sense from the chosen phone to all previously-chosen phones in the row is maximized. (Equivalently, the average distance is maximized.) Another space- or privacy-conscious selection strategy. Are there any applications of this sequence to phyllotaxy? Gregarious (or eavesdropping) strategy: If, instead, the total (average) distance is minimized, the sequence generated is 1,2,4,8,16,32,64,128,256,512,..., apparently the nonnegative powers of 2.
In the gregarious case (suggested by the above comment), the permutations that result are exactly those that avoid the permutation patterns 132 and 312. See link to Art of Problem Solving Forums for proof of formula below. - Joel B. Lewis, May 16 2009
Taking every other term gives A008776 (even-indexed terms) and A027649 (odd-indexed terms). - Joel B. Lewis, May 16 2009
With Lewis's formulas, the addition of the g.f.s for a(2*n) and a(2*n+1) yields the conjectures below: 2*x/(-3*x^2+1) - (-x^2+1)/(-6*x^4+5*x^2-1) = (-4*x^3-x^2+2*x+1)/(6*x^4-5*x^2+1). - Georg Fischer, Nov 19 2022

Examples

			a(4)=6 as these six permutations of {1,2,3,4} are counted (as in A095236(4)): (1,4,2,3), (1,4,3,2), (2,4,1,3), (3,1,4,2), (4,1,2,3) and (4,1,3,2).
In particular, (2,4,3,1) and (3,1,2,4), counted in A095236(4), are not counted here.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(-4*x^3-x^2+2*x+1)/(6*x^4-5*x^2+1), {x,0,34}], x] (* Georg Fischer, Nov 19 2022 *)

Formula

a(1) = 1; Conjectured: For k >= 1, a(2k) = a(2k-1) + 2^(k-1) and a(2k+1) = 2*a(2k-1) + a(2k) (needs proof or a reference).
a(2n) = 2 * 3^(n - 1) for n >= 1. a(2n + 1) = 2 * 3^n - 2^n for n >= 0. - Joel B. Lewis, May 16 2009
Conjecture: a(n) = 5*a(n-2) - 6*a(n-4); g.f.: x*(1+2*x-x^2-4*x^3)/((1-2*x^2)*(1-3*x^2)). - Colin Barker, Jul 27 2012
Conjecture: a(n) = 2^(((-1)^n + 2*n - 5)/4)*((-1)^n-1) - 2*3^(((-1)^n + 2*n - 5)/4)*((-1)^n-2). - Luce ETIENNE, Dec 20 2014

Extensions

More terms from Joel B. Lewis, May 16 2009

A210381 Triangle by rows, derived from the beheaded Pascal's triangle, A074909.

Original entry on oeis.org

1, 0, 2, 0, 1, 3, 0, 1, 3, 4, 0, 1, 4, 6, 5, 0, 1, 5, 10, 10, 6, 0, 1, 6, 15, 20, 15, 7, 0, 1, 7, 21, 35, 35, 21, 8, 0, 1, 8, 28, 56, 70, 56, 28, 9, 0, 1, 9, 36, 84, 126, 126, 84, 36, 10, 0, 1, 10, 45, 120, 210, 252, 210, 120, 45, 11
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Mar 20 2012

Keywords

Comments

Row sums of the triangle = 2^n.
Let the triangle = an infinite lower triangular matrix, M. Then M * The Bernoulli numbers, A027641/A027642 as a vector V = [1, -1, 0, 0, 0,...]. M * the Bernoulli sequence variant starting [1, 1/2, 1/6,...] = [1, 1, 1,...]. M * 2^n: [1, 2, 4, 8,...] = A027649. M * 3^n = A255463; while M * [1, 2, 3,...] = A047859, and M * A027649 = A027650.
Row sums of powers of the triangle generate the Poly-Bernoulli number sequences shown in the array of A099594. - Gary W. Adamson, Mar 21 2012
Triangle T(n,k) given by (0, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 25 2012

Examples

			{1},
{0, 2},
{0, 1, 3},
{0, 1, 3, 4},
{0, 1, 4, 6, 5},
{0, 1, 5, 10, 10, 6},
{0, 1, 6, 15, 20, 15, 7},
{0, 1, 7, 21, 35, 35, 21, 8},
{0, 1, 8, 28, 56, 70, 56, 28, 9},
{0, 1, 9, 36, 84, 126, 126, 84, 36, 10},
{0, 1, 10, 45, 120, 210, 252, 210, 120, 45, 11}
...
		

References

  • Konrad Knopp, Elements of the Theory of Functions, Dover, 1952,pp 117-118.

Crossrefs

Programs

  • Mathematica
    t2[n_, m_] = If[m - 1 <= n, Binomial[n, m - 1], 0];
    O2 = Table[Table[If[n == m, t2[n, m] + 1, t2[n, m]], {m, 0, n}], {n, 0, 10}];
    Flatten[O2]

Formula

Partial differences of the beheaded Pascal's triangle A074909 starting from the top, by columns.
G.f.: (1-x)/(1-x-2*y*x+y*x^2+y^2*x^2). - Philippe Deléham, Mar 25 2012
T(n,k) = T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-1) - T(n-2,k-2), T(0,0) = T(2,1) = 1, T(1,0) = T(2,0) = 0, T(1,1) = 2, T(2,2) = 3 and T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Mar 25 2012

A212362 Triangle by rows, binomial transform of the beheaded Pascal's triangle A074909.

Original entry on oeis.org

1, 2, 2, 4, 7, 3, 8, 19, 15, 4, 16, 47, 52, 26, 5, 32, 111, 155, 110, 40, 6, 64, 255, 426, 385, 200, 57, 7, 128, 575, 1113, 1211, 805, 329, 77, 8, 256, 1279, 2808, 3556, 2856, 1498, 504, 100, 9, 512, 2815, 6903, 9948, 9324, 5922, 2562, 732, 126, 10
Offset: 0

Views

Author

Gary W. Adamson, Jun 29 2012

Keywords

Comments

Row sums of the triangle inverse = A027641/A027642, the Bernoulli numbers; (1, -1/2, 1/6, 0, -1/30,...)

Examples

			First few rows of the triangle are:
    1;
    2,    2;
    4,    7,    3;
    8,   19,   15,    4
   16,   47,   52,   26,    5;
   32,  111,  155,  110,   40,    6;
   64,  255,  426,  385,  200,   57,   7;
  128,  575, 1113, 1211,  805,  329,  77,   8;
  256, 1279, 2808, 3556, 2856, 1498, 504, 100, 9;
  ...
		

Crossrefs

Cf. A074909, A027641/A027642, A027649 (row sums), A006589 (2nd column), A106515.

Programs

  • Magma
    A074909:= func< n,k | k lt 0 or k gt n select 0 else Binomial(n+1, k) >;
    A212362:= func< n,k | (&+[ Binomial(n,j)*A074909(j, k) : j in [0..n]]) >;
    [A212362(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 05 2021
    
  • Maple
    A212362 := proc(n,k)
            add( binomial(n,i)*A074909(i,k),i=0..n) ;
    end proc: # R. J. Mathar, Aug 03 2015
  • Mathematica
    T[n_, k_]= 2^(n-k)*Binomial[n+1, k] + (2^(n-k) -1)*Binomial[n, k-1];
    Table[T[n, k] , {n,0,12}, {k,0,n}] //Flatten (* G. C. Greubel, Aug 05 2021 *)
  • Sage
    def T(n, k): return 2^(n-k)*binomial(n+1, k) + (2^(n-k) - 1)*binomial(n, k-1)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Aug 05 2021

Formula

Binomial transform of the beheaded Pascal's triangle (A074909) as a matrix. (The beheaded Pascal matrix deletes the rightmost border of 1's.)
From G. C. Greubel, Aug 05 2021: (Start)
T(n, k) = Sum_{j=0..n} binomial(n, j)*binomial(j+1, k) - binomial(n, k-1), with T(n, 0) = 2^n.
T(n, k) = 2^(n-k)*binomial(n+1, k) + (2^(n-k) - 1)*binomial(n, k-1).
Sum_{k=0..n} T(n, k) = A027649(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A106515(n). (End)

Extensions

a(22) corrected by G. C. Greubel, Aug 05 2021

A163824 Number of permutations of length n in the 2x2 double-chevron permutation grid class.

Original entry on oeis.org

1, 1, 2, 6, 24, 106, 470, 2038, 8624, 35754, 145902, 588358, 2351910, 9341814, 36936146, 145567966, 572415344, 2247578314, 8816986046, 34570684966, 135522530174, 531285354214, 2083180354466, 8170672802686, 32059325714054, 125845764142006, 494223989283650
Offset: 0

Views

Author

David Bevan, Jun 27 2012

Keywords

Comments

The double-chevron grid class is the monotone grid class of permutations Grid((1,1),(-1,-1)).

Examples

			a(5) = 106 because the following 14 permutations can't be gridded (and hence are in the basis of the permutation class): 12543, 13254, 14253, 15243, 15423, 25413, 31254, 35412, 41253, 51243, 51423, 52413, 53412, 54123.
		

Programs

  • Mathematica
    CoefficientList[Series[1/Sqrt[1-4x]-(x(1-x))/((1-2x)(1-3x)),{x,0,30}],x] (* Harvey P. Dale, Jun 09 2016 *)

Formula

O.g.f: 1/sqrt(1-4*x) - x*(1-x)/((1-2*x)*(1-3*x)).
a(n) = A000984(n) - A027649(n-1).
Conjecture: n*(n^2-6*n+11)*a(n) +(-9*n^3+56*n^2-119*n+60)*a(n-1) +2*(13*n^3-83*n^2+193*n-150)*a(n-2) -12*(2*n-5)*(n^2-4*n+6)*a(n-3) =0 . - R. J. Mathar, Jul 24 2012
Previous Showing 31-40 of 44 results. Next