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 21-30 of 49 results. Next

A293616 Array of generalized Eulerian number triangles read by ascending antidiagonals, with m >= 0, n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 3, 0, 0, 1, 6, 0, 1, 0, 1, 10, 0, 7, 1, 0, 1, 15, 0, 25, 4, 0, 0, 1, 21, 0, 65, 10, 0, 1, 0, 1, 28, 0, 140, 20, 0, 15, 4, 0, 1, 36, 0, 266, 35, 0, 90, 30, 1, 0, 1, 45, 0, 462, 56, 0, 350, 120, 5, 0, 0, 1, 55, 0, 750, 84, 0, 1050, 350, 15, 0, 1, 0
Offset: 0

Views

Author

Peter Luschny, Oct 14 2017

Keywords

Examples

			Array starts:
m\j| 0   1  2     3    4  5       6       7    8  9      10      11      12
---|----------------------------------------------------------------------------
m=0| 1,  0, 0,    0,   0, 0,      0,      0,   0, 0,      0,      0,      0, ...
m=1| 1,  1, 0,    1,   1, 0,      1,      4,   1, 0,      1,     11,     11, ...
m=2| 1,  3, 0,    7,   4, 0,     15,     30,   5, 0,     31,    146,     91, ...
m=3| 1,  6, 0,   25,  10, 0,     90,    120,  15, 0,    301,    896,    406, ...
m=4| 1, 10, 0,   65,  20, 0,    350,    350,  35, 0,   1701,   3696,   1316, ...
m=5| 1, 15, 0,  140,  35, 0,   1050,    840,  70, 0,   6951,  11886,   3486, ...
m=6| 1, 21, 0,  266,  56, 0,   2646,   1764, 126, 0,  22827,  32172,   8022, ...
m=7| 1, 28, 0,  462,  84, 0,   5880,   3360, 210, 0,  63987,  76692,  16632, ...
m=8| 1, 36, 0,  750, 120, 0,  11880,   5940, 330, 0, 159027, 165792,  31812, ...
m=9| 1, 45, 0, 1155, 165, 0,  22275,   9900, 495, 0, 359502, 331617,  57057, ...
   A000217, A001296,A000292,A001297,A027789,A000332,A001298,A293610,A293611, ...
.
m\j| ...    13  14      15       16       17      18      19 20
---|----------------------------------------------------------------
m=0| ...,    0, 0,       0,       0,       0,      0,      0, 0, ...  [A000007]
m=1| ...,    1, 0,       1,      26,      66,     26,      1, 0, ...  [A173018]
m=2| ...,    6, 0,      63,     588,     868,    238,      7, 0, ...  [A062253]
m=3| ...,   21, 0,     966,    5376,    5586,   1176,     28, 0, ...  [A062254]
m=4| ...,   56, 0,    7770,   30660,   24570,   4200,     84, 0, ...  [A062255]
m=5| ...,  126, 0,   42525,  129780,   84630,  12180,    210, 0, ...
m=6| ...,  252, 0,  179487,  446292,  245322,  30492,    462, 0, ...
m=7| ...,  462, 0,  627396, 1315776,  625086,  68376,    924, 0, ...
m=8| ...,  792, 0, 1899612, 3444012, 1440582, 140712,   1716, 0, ...
m=9| ..., 1287, 0, 5135130, 8198190, 3063060, 270270,   3003, 0, ...
          A000389, A112494, A293612, A293613,A293614,A000579.
.
The parameter m runs over the triangles and j indexes the triangles by reading them by rows. Let T(m, n) denote the row [T(m, n, k) for 0 <= k <= n] and T(m) denote the triangle [T(m, n) for n >= 0]. Then for instance T(2) is the triangle A062253, T(4, 2) is row 2 of A062255 (which is [65, 20, 0]) and T(4, 2, 1) = 20.
		

Crossrefs

A000217(n) = T(n, 1, 0), A001296(n) = T(n, 2, 0), A000292(n) = T(n, 2, 1),
A001297(n) = T(n, 3, 0), A027789(n) = T(n, 3, 1), A000332(n) = T(n, 3, 2),
A001298(n) = T(n, 4, 0), A293610(n) = T(n, 4, 1), A293611(n) = T(n, 4, 2),
A000389(n) = T(n, 4, 3), A112494(n) = T(n, 5, 0), A293612(n) = T(n, 5, 1),
A293613(n) = T(n, 5, 2), A293614(n) = T(n, 5, 3), A000579(n) = T(n, 5, 4),
A144969(n) = T(n, 6, 0), A000580(n) = T(n, 6, 5), A000295(n) = T(1, n, 1),
A000460(n) = T(1, n, 2), A000498(n) = T(1, n, 3), A000505(n) = T(1, n, 4),
A000514(n) = T(1, n, 5), A001243(n) = T(1, n, 6), A001244(n) = T(1, n, 7),
A126646(n) = T(2, n, 0), A007820(n) = T(n, n, 0).

Programs

  • Maple
    A293616 := proc(m, n, k) option remember:
    if m = 0 then m^n elif k < 0 or k > n then 0 elif n = 0 then 1 else
    (k+m)*A293616(m,n-1,k) + (n-k)*A293616(m,n-1,k-1) + A293616(m-1,n,k) fi end:
    for m in [$0..4] do for n in [$0..6] do print(seq(A293616(m, n, k), k=0..n)) od od;
    # Sample uses:
    A001298 := n -> A293616(n, 4, 0): A293614 := n -> A293616(n, 5, 3):
    # Flatten:
    a := proc(n) local w; w := proc(k) local t, s; t := 1; s := 1;
    while t <= k do s := s + 1; t := t + s od; [s - 1, s - t + k] end:
    seq(A293616(n - k, w(k)[1], w(k)[2]), k=0..n) end: seq(a(n), n = 0..11);
  • Mathematica
    GenEulerianRow[0, n_] := Table[If[n==0 && j==0,1,0], {j,0,n}];
    GenEulerianRow[m_, n_] := If[n==0,{1},Join[CoefficientList[x^(-m) (1 - x)^(n+m)
        PolyLog[-n-m, m, x] /. Log[1-x] -> 0, x], {0}]];
    (* Sample use: *)
    A173018Row[n_] := GenEulerianRow[1, n]; Table[A173018Row[n], {n, 0, 6}]

Formula

T(m, n, k) = (k + m)*T(m, n-1, k) + (n - k)*T(m, n-1, k-1) + T(m-1, n, k) with boundary conditions T(0, n, k) = 0^n; T(m, n, k) = 0 if k < 0 or k > n; and T(m, 0, k) = 0^k.
Let h(m, n) = x^(-m)*(1 - x)^(n + m)*PolyLog(-n - m, m, x) and p(m, n) the polynomial given by the expansion of h(m, n) after replacing log(1 - x) by 0. Then T(m, n, k) is the k-th coefficient of p(m, n) for 0 <= k < n.

A341694 Square array T(n, k) read by antidiagonals upwards, n, k > 0: T(n, k) = A227736(n, k) for k = 1..A005811(n), and T(n, k) = T(n, k - A005811(n)) + ... + T(n, k-1) for k > A005811(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 3, 1, 1, 1, 3, 2, 5, 1, 3, 2, 1, 4, 2, 8, 1, 3, 3, 3, 3, 7, 2, 13, 1, 1, 1, 3, 5, 5, 11, 2, 21, 1, 1, 2, 4, 3, 8, 9, 18, 2, 34, 1, 2, 1, 1, 5, 3, 13, 17, 29, 2, 55, 1, 2, 1, 1, 4, 9, 3, 21, 31, 47, 2, 89, 1
Offset: 1

Views

Author

Rémy Sigrist, Feb 17 2021

Keywords

Comments

This table contains all Fibonacci sequences of order m > 0 with positive terms:
- order 1 corresponds to constant sequences (n in A126646),
- order 2 corresponds to Fibonacci-like sequences (n in A043569),
- order 3 corresponds to tribonacci-like sequences (n in A043570),
- order 4 corresponds to tetranacci-like sequences (n in A043571).
For any n > 0, the row A341746(n) corresponds to the n-th row from which the first term has been removed.

Examples

			Array T(n, k) begins:
  n\k|  1  2  3  4  5   6   7   8   9   10   11   12   13    14
  ---+---------------------------------------------------------
    1|  1  1  1  1  1   1   1   1   1    1    1    1    1     1 --> A000012
    2|  1  1  2  3  5   8  13  21  34   55   89  144  233   377 --> A000045
    3|  2  2  2  2  2   2   2   2   2    2    2    2    2     2 --> A007395
    4|  2  1  3  4  7  11  18  29  47   76  123  199  322   521 --> A000032
    5|  1  1  1  3  5   9  17  31  57  105  193  355  653  1201 --> A000213
    6|  1  2  3  5  8  13  21  34  55   89  144  233  377   610 --> A000045
    7|  3  3  3  3  3   3   3   3   3    3    3    3    3     3 --> A010701
    8|  3  1  4  5  9  14  23  37  60   97  157  254  411   665 --> A104449
    9|  1  2  1  4  7  12  23  42  77  142  261  480  883  1624 --> A275778
   10|  1  1  1  1  4   7  13  25  49   94  181  349  673  1297 --> A000288
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(A341746(n), k) = T(n, k+1).
T(n, 1) = A136480(n).

A354582 Number of distinct contiguous constant subsequences (or partial runs) in the k-th composition in standard order.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 2, 3, 4, 1, 2, 2, 3, 2, 3, 2, 4, 2, 2, 3, 3, 3, 3, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 2, 3, 5, 2, 2, 3, 3, 3, 3, 2, 4, 3, 3, 4, 3, 4, 4, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 2, 3, 4, 5, 2, 3, 2, 4, 3, 4, 3
Offset: 0

Views

Author

Gus Wiseman, Jun 13 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			Composition number 981 in standard order is (1,1,1,2,2,2,1), with partial runs (1), (2), (1,1), (2,2), (1,1,1), (2,2,2), so a(981) = 6.
As a triangle:
  1
  1 2
  1 2 2 3
  1 2 2 3 2 2 3 4
  1 2 2 3 2 3 2 4 2 2 3 3 3 3 4 5
  1 2 2 3 2 3 3 4 2 3 3 4 3 2 3 5 2 2 3 3 3 3 2 4 3 3 4 3 4 4 5 6
		

Crossrefs

The version for partitions is A001222, full A001221.
If we allow any constant subsequence we get A063787.
If we allow any contiguous subsequence we get A124771.
Positions of first appearances are A126646.
The version for binary indices is A330036, full A005811.
If we allow any subsequence we get A334299.
The full version is A351014, firsts A351015.
The version for run-sums of partitions is A353861, full A353835.
Counting distinct sums of partial runs gives A354907, full A353849.
A066099 lists all compositions in standard order.
A124767 counts runs in standard compositions.
A238279 and A333755 count compositions by number of runs.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions, rows ranked by A353847.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    pre[y_]:=NestWhileList[Most,y,Length[#]>1&];
    Table[Length[Union[Join@@pre/@Split[stc[n]]]],{n,0,100}]

A363398 Triangle read by rows. T(n, k) = [x^k] P(n, x), where P(n, x) = Sum_{k=0..n} 2^(n - k) * Sum_{j=0..k} (x^j * binomial(k, j) * (2*j + 1)^n), (secant case).

Original entry on oeis.org

1, 3, 3, 7, 36, 25, 15, 297, 625, 343, 31, 2106, 10000, 14406, 6561, 63, 13851, 131250, 369754, 413343, 161051, 127, 87480, 1546875, 7529536, 15411789, 14172488, 4826809, 255, 540189, 17109375, 134237509, 444816117, 721025327, 564736653, 170859375
Offset: 0

Views

Author

Peter Luschny, May 31 2023

Keywords

Comments

Here we give an inclusion-exclusion representation of 2^n*Euler(n) (see A122045 and A002436), in A363399 we give such a representation for 2^n*Euler(n, 1) = A155585(n), and in A363400 one for the combined sequences.

Examples

			The triangle T(n, k) starts:
  [0]   1;
  [1]   3,      3;
  [2]   7,     36,       25;
  [3]  15,    297,      625,       343;
  [4]  31,   2106,    10000,     14406,      6561;
  [5]  63,  13851,   131250,    369754,    413343,    161051;
  [6] 127,  87480,  1546875,   7529536,  15411789,  14172488,   4826809;
  [7] 255, 540189, 17109375, 134237509, 444816117, 721025327, 564736653, 170859375;
		

Crossrefs

Cf. A122045 (alternating row sums), A363396 (row sums), A126646 (column 0), A085527 (main diagonal), A141475 (central terms).
Cf. A363399 (tangent case), A363400 (combined case).

Programs

  • Maple
    P := (n, x) -> add(add(x^j*binomial(k, j)*(2*j + 1)^n, j=0..k)*2^(n-k), k=0..n):
    T := (n, k) -> coeff(P(n, x), x, k): seq(seq(T(n, k), k = 0..n), n = 0..7);
  • Mathematica
    (* From Detlef Meya, Oct 04 2023: (Start) *)
    T[n_, k_] := (2*k+1)^n*(2^(n+1) - Sum[Binomial[n+1, j], {j,0,k}]);
    (* Or: *)
    T[n_, k_] := (2*k+1)^n*Binomial[n+1, k+1]*Hypergeometric2F1[1, k-n, k+2, -1];
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* End *)

Formula

Sum_{k=0..n} (-1)^k*T(n, k) = 2^n*Euler(n) = 4^n*Euler(n, 1/2).
(Sum_{k=0..n} (-1)^k*T(n, k)) / 2^n = Euler(n) = 2^n*Euler(n, 1/2) = A122045(n).
Sum_{k=0..2*n} (-1)^k*T(2*n, k) = 4^n*Euler(2*n) = 16^n*Euler(2*n, 1/2) = (-1)^n*A002436(n).
From Detlef Meya, Oct 04 2023: (Start)
T(n, k) = (2*k + 1)^n * binomial(n+1, k+1) * hypergeom([1, k-n], [k+2], -1).
T(n, k) = (2*k + 1)^n * (2^(n + 1) - Sum_{j=0..k} binomial(n+1, j)). (End)

A363399 Triangle read by rows. T(n, k) = [x^k] P(n, x), where P(n, x) = Sum_{k=0..n} 2^(n - k) * Sum_{j=0..k} (x^j * binomial(k, j) * (j + 1)^n), (tangent case).

Original entry on oeis.org

1, 3, 2, 7, 16, 9, 15, 88, 135, 64, 31, 416, 1296, 1536, 625, 63, 1824, 10206, 22528, 21875, 7776, 127, 7680, 72171, 262144, 453125, 373248, 117649, 255, 31616, 478953, 2670592, 7265625, 10357632, 7411887, 2097152, 511, 128512, 3057426, 25034752, 100000000, 218350080, 265180846, 167772160, 43046721
Offset: 0

Views

Author

Peter Luschny, May 31 2023

Keywords

Comments

Here we give an inclusion-exclusion representation of 2^n*Euler(n, 1) = A155585(n), in A363398 we give such a representation for 2^n*Euler(n), and in A363400 one for the combined sequences.

Examples

			The triangle T(n, k) begins:
  [0]   1;
  [1]   3,     2;
  [2]   7,    16,      9;
  [3]  15,    88,    135,      64;
  [4]  31,   416,   1296,    1536,     625;
  [5]  63,  1824,  10206,   22528,   21875,     7776;
  [6] 127,  7680,  72171,  262144,  453125,   373248,  117649;
  [7] 255, 31616, 478953, 2670592, 7265625, 10357632, 7411887, 2097152;
		

Crossrefs

Cf. A155585 (alternating row sums), A363397 (row sums), A126646 (column 0), A000169 (main diagonal), A163395 (central terms), A084623.
Cf. A363398 (secant case), A363400 (combined case).

Programs

  • Maple
    P := (n, x) -> add(add(x^j*binomial(k, j)*(j + 1)^n, j=0..k)*2^(n - k), k = 0..n):
    T := (n, k) -> coeff(P(n, x), x, k): seq(seq(T(n, k), k = 0..n), n = 0..8);
  • Mathematica
    (* From  Detlef Meya, Oct 04 2023: (Start) *)
    T[n_, k_] := (k+1)^n*(2^(n+1)-Sum[Binomial[n+1, j], {j, 0, k}]);
    (* Or *)
    T[n_, k_] := (k+1)^n*Binomial[n+1, k+1]*Hypergeometric2F1[1, k-n, k+2, -1];
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* End *)

Formula

Sum_{k=0..n} (-1)^k * T(n, k) = 2^n*Euler(n, 1) = (-2)^n*Euler(n, 0) = A155585(n).
From Detlef Meya, Oct 04 2023: (Start)
T(n, k) = (k + 1)^n*binomial(n + 1, k + 1)*hypergeom([1, k - n], [k + 2], -1).
T(n, k) = (k + 1)^n * (2^(n + 1) - add(binomial(n + 1, j), j=0..k)). (End)

A363400 Triangle read by rows. T(n, k) = [x^k] P(n, x), where P(n, x) = Sum_{k=0..n} 2^(n - k) * Sum_{j=0..k} (x^j * binomial(k, j) * ((2 - (n mod 2)) * j + 1)^n).

Original entry on oeis.org

1, 3, 2, 7, 36, 25, 15, 88, 135, 64, 31, 2106, 10000, 14406, 6561, 63, 1824, 10206, 22528, 21875, 7776, 127, 87480, 1546875, 7529536, 15411789, 14172488, 4826809, 255, 31616, 478953, 2670592, 7265625, 10357632, 7411887, 2097152
Offset: 0

Views

Author

Peter Luschny, May 31 2023

Keywords

Comments

In A363398 we give an inclusion-exclusion representation for 2^n*Euler(n), and in A363399 we give such a representation of 2^n*Euler(n, 1) = A155585(n). Here the two representations are combined into one of A000111.

Examples

			Triangle T(n, k) starts:
[0]   1;
[1]   3,     2;
[2]   7,    36,      25;
[3]  15,    88,     135,      64;
[4]  31,  2106,   10000,   14406,     6561;
[5]  63,  1824,   10206,   22528,    21875,     7776;
[6] 127, 87480, 1546875, 7529536, 15411789, 14172488, 4826809;
[7] 255, 31616,  478953, 2670592,  7265625, 10357632, 7411887, 2097152;
		

Crossrefs

Cf. A126646 (column 0), A363401 (row sums), A000111, A059222, A002436.
Cf. A363398 (secant case), A363399 (tangent case).

Programs

  • Maple
    P := (n, x) -> add(add(x^j * binomial(k, j) * ((2 - irem(n, 2)) * j + 1)^n,
    j = 0..k) * 2^(n - k), k = 0..n): T := (n, k) -> coeff(P(n, x), x, k):
    seq(seq(T(n, k), k = 0..n), n = 0..8);
  • Mathematica
    From Detlef Meya, Oct 04 2023: (Start)
    T[n_, k_] := (2^(n+1)-Binomial[n+1, n-k+1]*Hypergeometric2F1[1, -k, n-k+2, -1])*(2*k+1-k*Mod[n, 2])^n;
    (* Or: *)
    T[n_, k_] := (2*k+1-k*Mod[n, 2])^(n-1)*Sum[Binomial[n+1, j], {j, 0, n-k}]*(2*k+1-k*Mod[n, 2]);
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* End *)

Formula

T(n, k) = A363399(n, k) for 0 <= k <= n if n is odd otherwise A363398(n, k).
(Sum_{k=0..n} (-1)^k * T(n, k)) / h(n) = A000111(n), where h(n) = (-1)^binomial(n, 2) * 2^(n * iseven(n)), see A059222.
From Detlef Meya, Oct 04 2023: (Start)
T(n, k) = (2*k + 1 - k*(n mod 2))^(n - 1)*add(binomial(n + 1, j), j = 0..n - k)*(2*k + 1 - k*(n mod 2)).
T(n, k) = (2^(n + 1) - binomial(n + 1, n - k + 1)*hypergeom([1, -k], [n - k + 2], -1))*(2*k + 1 - k*(n mod 2))^n. (End)

A063016 a(n) is the product of Catalan(n) and (2^(n+1) - 1).

Original entry on oeis.org

1, 3, 14, 75, 434, 2646, 16764, 109395, 730730, 4973826, 34381412, 240728670, 1703826292, 12170930700, 87633375480, 635351667075, 4634365164570, 33985474184970, 250419761106900, 1853107999454250, 13765951702923420, 102618937160787060, 767411273728449480
Offset: 0

Views

Author

Olivier Gérard, Jul 04 2001

Keywords

Comments

From Michael Wallner, Nov 03 2021: (Start)
a(n) is also the number of n X 2 Young tableaux with (possibly) vertical walls. The entries in cells that are separated by such a wall do not have to obey any order constraints. See Banderier, Wallner 2021 and Banderier et al. 2018.
a(n) is also the number of binary trees with n vertices and marked leaves, where at least 1 leaf has to be marked. Banderier, Wallner 2021 give a bijection to n X 2 Young tableaux with vertical walls. (End)

Crossrefs

Programs

  • Mathematica
    Table[CatalanNumber[n]*(2^(n+1)-1),{n,0,20}] (* Harvey P. Dale, Oct 20 2014 *)
  • PARI
    a(n) = (2^(n + 1) - 1)*binomial(2*n, n)/(n + 1); \\ Harry J. Smith, Aug 16 2009
    
  • Sage
    def A063016(n) :
        return (8^(n+1)-4^(n+1))*factorial(n-1/2)/(4*sqrt(pi)*factorial(n+1))
    [A063016(i) for i in (0..20)] # Peter Luschny, Jul 24 2012

Formula

a(n) = Catalan(n)*(2^(n+1) - 1) = A000108(n) * A126646(n).
D-finite with recurrence: a(n) = 2*(2*n-1)*(3*n*a(n-1)-4*(2*n-3)*a(n-2))/((n+1)*n). - Georg Fischer, Jun 06 2021
G.f.: A(x) = (sqrt(1-4*x) - sqrt(1-8*x))/(2*x).
G.f.: G(0)/(2*x) where G(k) = 1 - 2^k/(1 - 2*x*(2*k-1)/(2*x*(2*k-1) - 2^k*(k+1)/G(k+1))); (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Jul 24 2012
From Peter Bala, Aug 17 2021: (Start)
a(n) = Sum_{k = 0..n} A046521(n,k)*Catalan(k).
G.f.: A(x) = 1/sqrt(1 - 4*x)*c(x/(1 - 4*x)), where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. Inversely, c(x) = 1/sqrt(1 + 4*x)*A(x/(1 + 4*x)).
Series reversion of x*A(x) = x*(1 - 3*x + 4*x^2*c(-2*x^2)). (End)

Extensions

Initial term 0 removed by Harry J. Smith, Aug 16 2009

A126718 a(n) is the number of nonnegative integers k less than 10^n such that the decimal representation of k lacks the digits 1,2,3, at least one of digits 4,5, at least one of digits 6,7 and at least one of digits 8,9.

Original entry on oeis.org

7, 43, 235, 1171, 5467, 24403, 105595, 447091, 1864027, 7686163, 31440955, 127865011, 517788187, 2090186323, 8417944315, 33843570931, 135890057947, 545108340883, 2185079263675, 8754257900851, 35058860433307, 140360940805843, 561820285607035
Offset: 1

Views

Author

Aleksandar M. Janjic and Milan Janjic, Feb 13 2007

Keywords

Crossrefs

Programs

  • Magma
    [8*4^n-12*3^n+6*2^n-1: n in [1..30]]; // Vincenzo Librandi, May 31 2011
    
  • Maple
    a:=n->8*4^n-12*3^n+6*2^n-1;
  • Mathematica
    LinearRecurrence[{10,-35,50,-24},{7, 43, 235, 1171},23] (* James C. McMahon, Dec 27 2024 *)
  • PARI
    Vec(-x*(24*x^3-50*x^2+27*x-7) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)) + O(x^100)) \\ Colin Barker, Feb 22 2015

Formula

a(n) = 8*4^n - 12*3^n + 6*2^n - 1.
a(n) = 10*a(n-1) - 35*a(n-2) + 50*a(n-3) - 24*a(n-4). - Colin Barker, Feb 22 2015
G.f.: -x*(24*x^3 - 50*x^2 + 27*x - 7) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)). - Colin Barker, Feb 22 2015

A295077 a(n) = 2*n*(n-1) + 2^n - 1.

Original entry on oeis.org

0, 1, 7, 19, 39, 71, 123, 211, 367, 655, 1203, 2267, 4359, 8503, 16747, 33187, 66015, 131615, 262755, 524971, 1049335, 2097991, 4195227, 8389619, 16778319, 33555631, 67110163, 134219131, 268436967, 536872535, 1073743563, 2147485507
Offset: 0

Views

Author

Keywords

Comments

We have a(0) = 0, and for n > 0, a(n) is a subsequence of A131098 where the indices are given by the partial sums of A288382.
For n > 0, a(n) gives the number of words of length n over the alphabet A = {a,b,c,d} such that: a word containing 'c' does not contain 'b' or 'd'; a word cannot be fully written with 'a'; a word contains letters from {b,d} if and only if it contains exactly a unique couple of letters from {b,d}. Thus a(1) = 1 where the corresponding word is "c" since 'c' is the only letter allowed to be written alone.
Primes in the sequence are 7, 19, 71, 211, 367, 2267, 16747, 524971, ... which are of the form 4*k + 3 (A002145).
The second difference of this sequence is A140504.

Examples

			a(4) = 39. The corresponding words are aabb, aabd, aadb, aadd, abab, abad, abba, abda, adab, adad, adba, adda, aaac, aaca, aacc, acaa, acac, acca, accc, baab, baad, baba, bada, bbaa, bdaa, caaa, caac, caca, cacc, ccaa, ccac, ccca, cccc, daab, daad, daba, dada, dbaa, ddaa.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics: A Foundation for Computer Science, Addison-Wesley, 1994.

Crossrefs

Programs

  • Magma
    [2*n*(n-1)+2^n-1 : n in [0..40]]; // Wesley Ivan Hurt, Nov 26 2017
  • Maple
    A295077:=n->2*n*(n-1)+2^n-1; seq(A295077(n), n=0..70);
  • Mathematica
    Table[2 n (n - 1) + 2^n - 1, {n, 0, 70}]
  • PARI
    a(n) = 2*n*(n-1) + 2^n - 1; \\ Michel Marcus, Nov 14 2017
    

Formula

G.f.: (x + 2*x^2 - 7*x^3)/((1 - x)^3*(1 - 2*x)).
a(0)=0, a(1)=1, a(2)=7, a(3)=19; for n>3, a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4).
a(n) = 2*A131924(n-1) - 1 for n>0, a(0)=0.
a(n) = a(n-1) + A000079(n-1) + A008586(n-1) for n>0, a(0)=0.
a(n) = A126646(n-1) + A046092(n-1) for n>0, a(0)=0.
a(n+1) - 2*a(n) + a(n-1) = A140504(n-1) for n>0, a(0)=0.
E.g.f.: exp(2*x) - (1 - 2*x^2)*exp(x). - G. C. Greubel, Oct 17 2018

A319074 a(n) is the sum of the first n nonnegative powers of the n-th prime.

Original entry on oeis.org

1, 4, 31, 400, 16105, 402234, 25646167, 943531280, 81870575521, 15025258332150, 846949229880161, 182859777940000980, 23127577557875340733, 1759175174860440565844, 262246703278703657363377, 74543635579202247026882160, 21930887362370823132822661921, 2279217547342466764922495586798
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2018

Keywords

Examples

			For n = 4 the 4th prime is 7 and the sum of the first four nonnegative powers of 7 is 7^0 + 7^1 + 7^2 + 7^3 = 1 + 7 + 49 + 343 = 400, so a(4) = 400.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, prime(n)^k); \\ Michel Marcus, Sep 13 2018

Formula

a(n) = Sum_{k=0..n-1} A000040(n)^k.
a(n) = Sum_{k=0..n-1} A319075(k,n).
a(n) = (A000040(n)^n - 1)/(A000040(n) - 1).
a(n) = (A062457(n) - 1)/A006093(n).
a(n) = A069459(n)/A006093(n).
a(n) = A000203(A000040(n)^(n-1)).
a(n) = A000203(A093360(n)).
Previous Showing 21-30 of 49 results. Next