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-20 of 20 results.

A212323 a(n) = 3^n - Fibonacci(n).

Original entry on oeis.org

1, 2, 8, 25, 78, 238, 721, 2174, 6540, 19649, 58994, 177058, 531297, 1594090, 4782592, 14348297, 43045734, 129138566, 387417905, 1162257286, 3486777636, 10460342257, 31381041898, 94143150170, 282429490113, 847288534418, 2541865706936, 7625597288569
Offset: 0

Views

Author

Bruno Berselli, May 09 2012

Keywords

Crossrefs

Programs

  • Magma
    [3^n-Fibonacci(n): n in [0..27]];
  • Mathematica
    Table[3^n - Fibonacci[n], {n, 0, 27}]
    LinearRecurrence[{4,-2,-3},{1,2,8},30] (* Harvey P. Dale, Dec 08 2023 *)
  • PARI
    for(n=0, 27, print1(3^n-fibonacci(n)", "));
    

Formula

G.f.: (1 - 2*x + 2*x^2)/((1 - 3*x)*(1 - x - x^2)).

A335712 The sum of the sizes of the minimal fixed points over all compositions of n.

Original entry on oeis.org

1, 1, 2, 6, 12, 27, 54, 115, 237, 486, 997, 2030, 4122, 8350, 16881, 34054, 68609, 138052, 277500, 557328, 1118546, 2243589, 4498004, 9014053, 18058159, 36166338, 72415886, 144970116, 290170091, 580721926, 1162077483, 2325206168, 4652155420, 9307199819
Offset: 1

Views

Author

Margaret Archibald, Jun 18 2020

Keywords

Examples

			Example: For n=3 the a(3)=2 values are the first 1s in 111 and 12 (the other compositions 21 and 3 do not have any fixed points).
		

References

  • M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.

Crossrefs

Programs

  • PARI
    my(N=44,x='x+O('x^N)); Vec( sum(j=1, N, prod(i=1, j-1, (x/(1-x)-x^i) ) *j*x^j * (1-x)/(1-2*x) ) ) \\ Joerg Arndt, Jun 18 2020

Formula

G.f.: Sum_{j>=1} (Product_{i=1..j-1} (x/(1-x)-x^i)) j x^j (1-x)/(1-2x).

Extensions

a(21)-a(34) from Alois P. Heinz, Jun 18 2020

A228078 a(n) = 2^n - Fibonacci(n) - 1.

Original entry on oeis.org

0, 0, 2, 5, 12, 26, 55, 114, 234, 477, 968, 1958, 3951, 7958, 16006, 32157, 64548, 129474, 259559, 520106, 1041810, 2086205, 4176592, 8359950, 16730847, 33479406, 66987470, 134021309, 268117644, 536356682, 1072909783, 2146137378, 4292788986, 8586410013
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 15 2013

Keywords

Comments

a(n+1) = sum of n-th row of the triangle in A228074.

Programs

  • Haskell
    a228078 = subtract 1 . a099036
    
  • Magma
    [2^n - Fibonacci(n) - 1: n in [0..40]]; // Vincenzo Librandi, Aug 16 2013
    
  • Mathematica
    Table[(2^n - Fibonacci[n] - 1), {n, 0, 40}] (* Vincenzo Librandi, Aug 16 2013 *)
  • PARI
    concat([0,0], Vec(x^2*(3*x-2)/((x-1)*(2*x-1)*(x^2+x-1)) + O(x^100))) \\ Colin Barker, Mar 20 2015

Formula

a(n) = A000079(n) - A000045(n) - 1 = A000225(n) - A000045(n) = A000079(n) - A001611(n) = A099036(n) - 1.
From Colin Barker, Mar 20 2015: (Start)
a(n) = 4*a(n-1)-4*a(n-2)-a(n-3)+2*a(n-4) for n>3.
G.f.: x^2*(3*x-2) / ((x-1)*(2*x-1)*(x^2+x-1)). (End)
a(n) = (-1+2^n+(((1-sqrt(5))/2)^n-((1+sqrt(5))/2)^n)/sqrt(5)). - Colin Barker, Nov 02 2016

A335714 The sum of the sizes (positions) of fixed points over all compositions of n.

Original entry on oeis.org

1, 1, 4, 8, 19, 41, 89, 189, 398, 830, 1719, 3539, 7251, 14797, 30096, 61044, 123531, 249501, 503117, 1013165, 2037986, 4095546, 8223919, 16502823, 33097639, 66349021, 132954724, 266337584, 533388643, 1067965265, 2137907009, 4279099869, 8563658486, 17136379382
Offset: 1

Views

Author

Margaret Archibald, Jun 18 2020

Keywords

Examples

			For n=3 the a(3)=4 values are the first 1 in the composition 111 and both values in the composition 12 (the compositions 21 and 3 have no fixed points).
		

References

  • M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.

Crossrefs

Programs

  • PARI
    Vec((x*(1-x)^3)/((1-2*x)*(1-x-x^2)^2) + O(x^40)) \\ Michel Marcus, Jun 18 2020

Formula

G.f.: x*(1-x)^3/((1-2*x)*(1-x-x^2)^2).

Extensions

More terms from Michel Marcus, Jun 18 2020

A125104 Triangle read by rows counting compositions (ordered partitions) by minimal part size.

Original entry on oeis.org

1, 1, 1, 1, 0, 3, 1, 0, 1, 6, 1, 0, 0, 2, 13, 1, 0, 0, 1, 3, 27, 1, 0, 0, 0, 2, 5, 56, 1, 0, 0, 0, 1, 2, 9, 115, 1, 0, 0, 0, 0, 2, 3, 15, 235, 1, 0, 0, 0, 0, 1, 2, 5, 25, 478, 1, 0, 0, 0, 0, 0, 2, 2, 8, 42, 969, 1, 0, 0, 0, 0, 0, 1, 2, 3, 12, 70, 1959, 1, 0, 0, 0, 0, 0, 0, 2, 2, 5, 18, 116, 3952, 1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 8, 27, 192, 7959, 1, 0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 11, 41, 317, 16007
Offset: 0

Views

Author

Alford Arnold, Nov 28 2006, corrected Nov 28 2006

Keywords

Comments

The diagonals of this array can be generated from Table A099238 as follows: A000079 - A000045 = [1, 2, 4, 8, 16, 32, ...] - [0, 1, 1, 2, 3, 5, ...] = [1, 1, 3, 6, 13, 27, ...] = A099036, A000045 - A000930, A000930 - A003269, A003269 - A003520, etc.

Examples

			Row 4 of the array is (1, 0, 1, 6) because there are six compositions with minimum part of size one: 1111, 31, 13, 211, 121, 112; one of size two: 22; none of size three; and 1 of size four: 4.
Triangle (after 45-degree counterclockwise rotation) begins:
1 1 3 6 13 27 56 115 235 478 969 1959 3952 7959
.1 0 1 2 3 5 9 15 25 42 70 116 192
..1 0 0 1 2 2 3 5 8 12 18 27
...1 0 0 0 1 2 2 2 3 5 8
....1 0 0 0 0 1 2 2 2 2
.....1 0 0 0 0 0 1 2 2
......1 0 0 0 0 0 0 1
.......1 0 0 0 0 0 0
........1 0 0 0 0 0
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Dec 21 2006
More terms from Vladeta Jovovic, Jul 10 2007

A131350 2*A007318 - A049310 as infinite lower triangular matrices.

Original entry on oeis.org

1, 2, 1, 1, 4, 1, 2, 4, 6, 1, 1, 8, 9, 8, 1, 2, 7, 20, 16, 10, 1, 1, 12, 24, 40, 25, 12, 1, 2, 10, 42, 60, 70, 36, 14, 1, 1, 16, 46, 112, 125, 112, 49, 16, 1, 2, 13, 72, 148, 252, 231, 168, 64, 18, 1
Offset: 0

Views

Author

Gary W. Adamson, Jul 02 2007

Keywords

Comments

Row sums = A099036 starting (1, 3, 6, 13, 27, 56, 115,...).

Examples

			First few rows of the triangle are:
1;
2, 1;
1, 4, 1;
2, 4, 6, 1;
1, 8, 9, 8, 1;
2, 7, 20, 16, 10, 1;
1, 12, 24, 40, 25, 12, 1;
...
		

Crossrefs

A354267 A Fibonacci-Pascal triangle read by rows: T(n, n) = 1, T(n, n-1) = n - 1, T(n, 0) = T(n-1, 1) and T(n, k) = T(n-1, k-1) + T(n-1, k) for 0 < k < n-1.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 3, 4, 3, 1, 3, 5, 7, 7, 4, 1, 5, 8, 12, 14, 11, 5, 1, 8, 13, 20, 26, 25, 16, 6, 1, 13, 21, 33, 46, 51, 41, 22, 7, 1, 21, 34, 54, 79, 97, 92, 63, 29, 8, 1, 34, 55, 88, 133, 176, 189, 155, 92, 37, 9, 1, 55, 89, 143, 221, 309, 365, 344, 247, 129, 46, 10, 1
Offset: 0

Views

Author

Peter Luschny, May 31 2022

Keywords

Examples

			[0]  1;
[1]  0,  1;
[2]  1,  1,  1;
[3]  1,  2,  2,  1;
[4]  2,  3,  4,  3,  1;
[5]  3,  5,  7,  7,  4,  1;
[6]  5,  8, 12, 14, 11,  5,  1;
[7]  8, 13, 20, 26, 25, 16,  6,  1;
[8] 13, 21, 33, 46, 51, 41, 22,  7, 1;
[9] 21, 34, 54, 79, 97, 92, 63, 29, 8, 1;
		

Crossrefs

Cf. A212804 (first column, which is also row 0 of A352744), A099036 (row sums), A228074 (subtriangle), A000045 (Fibonacci), A371870 (central terms).

Programs

  • Maple
    T := proc(n, k) option remember;
    if n = k then 1 elif k = n-1 then n-1 elif k = 0 then T(n-1, 1) else
    T(n-1, k) + T(n-1, k-1) fi end: seq(seq(T(n, k), k = 0..n), n = 0..11);
  • Mathematica
    T[n_, k_] := Which[n == k, 1, k == n-1, n-1, k == 0, T[n-1, 1], True, T[n-1, k] + T[n-1, k-1]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 29 2023 *)
  • Python
    from functools import cache
    @cache
    def A354267row(n):
        if n == 0: return [1]
        if n == 1: return [0, 1]
        row = A354267row(n - 1) + [1]
        s = row[1]
        for k in range(n-1, 0, -1):
            row[k] += row[k - 1]
        row[0] = s
        return row
    for n in range(10): print(A354267row(n))

Formula

T(n, 0) = Fibonacci(n - 1).

A357459 The total number of fixed points among all partitions of n, when parts are written in nondecreasing order.

Original entry on oeis.org

0, 1, 1, 3, 4, 7, 10, 17, 22, 34, 46, 66, 88, 123, 160, 218, 283, 375, 482, 630, 799, 1030, 1299, 1651, 2066, 2602, 3230, 4032, 4976, 6157, 7554, 9288, 11326, 13837, 16793, 20393, 24632, 29763, 35783, 43031, 51527, 61683, 73577, 87729, 104252, 123834, 146664
Offset: 0

Views

Author

Jeremy Lovejoy, Sep 29 2022

Keywords

Comments

For instance, the partition (1,3,3,3,5) = (y(1),y(2),y(3),y(4),y(5)) has 3 fixed points, since y(i) = i for i=1,3,5.

Examples

			The 7 partitions of 5 are (1,1,1,1,1), (1,1,1,2), (1,2,2), (1,1,3), (1,4), (2,3), and (5), containing 1, 1, 2, 2, 1, 0, and 0 fixed points, respectively, and so a(5) = 1+1+2+2+1+0+0=7.
		

Crossrefs

Cf. A001522 (parts decreasing), A099036.

Formula

G.f.: (Product_{k>=1}(1/(1-q^k)))*Sum_{n>=1}q^(2*n-1)*Product_{k=n..2*n-2}(1-q^k).

A130711 Number of compositions of n such that the smallest part divides every part.

Original entry on oeis.org

1, 2, 4, 8, 14, 32, 57, 123, 239, 493, 970, 1997, 3953, 8017, 16024, 32281, 64550, 129742, 259561, 520606, 1041871, 2087177, 4176594, 8362063, 16730862, 33483361, 66987710, 134029333, 268117646, 536373213, 1072909785, 2146169660
Offset: 1

Views

Author

Vladeta Jovovic, Jul 01 2007

Keywords

Examples

			a(5)=14 because among the 16 compositions of 5 only 2+3 and 3+2 do not qualify; the others, except for the composition 5, have at least one component equal to 1.
		

Crossrefs

Cf. A083710.

Programs

  • Maple
    G:=sum(x^n*(1-x^n)^2/((1-2*x^n)*(1-x^n-x^(2*n))), n=1..50); Gser:=series(G, x =0,40): seq(coeff(Gser,x,n),n=1..33); # Emeric Deutsch, Sep 08 2007

Formula

Inverse Moebius transform of A099036.
G.f.: Sum_{n>0} x^n*(1-x^n)^2/((1-2*x^n)*(1-x^n-x^(2*n))).

Extensions

More terms from Emeric Deutsch, Sep 08 2007

A317023 Square array A(n,k), n >= 0, k >= 0, read by ascending antidiagonals, where the sequence of row n is the expansion of (1-x^(n+1))/((1-x)^(n+1)).

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 3, 2, 0, 1, 4, 6, 2, 0, 1, 5, 10, 9, 2, 0, 1, 6, 15, 20, 12, 2, 0, 1, 7, 21, 35, 34, 15, 2, 0, 1, 8, 28, 56, 70, 52, 18, 2, 0, 1, 9, 36, 84, 126, 125, 74, 21, 2, 0, 1, 10, 45, 120, 210, 252, 205, 100, 24, 2, 0, 1, 11, 55, 165, 330, 462, 461, 315, 130, 27, 2, 0, 1, 12, 66
Offset: 0

Views

Author

Werner Schulte, Jul 19 2018

Keywords

Comments

Conjecture: alternating row sums of the triangle give A106510 for n >= 0.

Examples

			The square array A(n,k) begins:
  n\k |  0  1  2   3    4    5    6     7     8     9     10
  ====+=====================================================
   0  |  1  0  0   0    0    0    0     0     0     0      0
   1  |  1  2  2   2    2    2    2     2     2     2      2
   2  |  1  3  6   9   12   15   18    21    24    27     30
   3  |  1  4 10  20   34   52   74   100   130   164    202
   4  |  1  5 15  35   70  125  205   315   460   645    875
   5  |  1  6 21  56  126  252  461   786  1266  1946   2877
   6  |  1  7 28  84  210  462  924  1715  2996  4977   7924
   7  |  1  8 36 120  330  792 1716  3432  6434 11432  19412
   8  |  1  9 45 165  495 1287 3003  6435 12870 24309  43749
   9  |  1 10 55 220  715 2002 5005 11440 24310 48620  92377
  10  |  1 11 66 286 1001 3003 8008 19448 43758 92378 184756
  etc.
The triangle T(n,k) begins:
  n\k |  0  1  2   3   4   5   6   7   8   9 10 11 12
  ====+==============================================
   0  |  1
   1  |  1  0
   2  |  1  2  0
   3  |  1  3  2   0
   4  |  1  4  6   2   0
   5  |  1  5 10   9   2   0
   6  |  1  6 15  20  12   2   0
   7  |  1  7 21  35  34  15   2   0
   8  |  1  8 28  56  70  52  18   2   0
   9  |  1  9 36  84 126 125  74  21   2   0
  10  |  1 10 45 120 210 252 205 100  24   2  0
  11  |  1 11 55 165 330 462 461 315 130  27  2  0
  12  |  1 12 66 220 495 792 924 786 460 164 30  2  0
  etc.
		

Crossrefs

Row sums of the triangle give A099036 for n >= 0.
Cf. A000984 (main diagonal), A000012 (column 0), A087156 (column 1).
In the square array; row 0..12 are: A000007, A040000, A008486, A005893, A008487, A008488, A008489, A008490, A008491, A008492, A008493, A008494, A008495.
A173265 is based on the same square array, but is read by descending antidiagonals with special treatment of column 0.

Programs

  • GAP
    nmax:=15;; A:=List([0..nmax],n->List([0..nmax],k->Binomial(n+k,k)-Binomial(k-1,k-1-n)));;   b:=List([2..nmax],n->OrderedPartitions(n,2));;
    a:=Flat(List([1..Length(b)],i->List([1..Length(b[i])],j->A[b[i][j][2]][b[i][j][1]]))); # Muniru A Asiru, Jul 20 2018
    
  • Mathematica
    Table[SeriesCoefficient[(1 - x^(# + 1))/((1 - x)^(# + 1)), {x, 0, k}] &[n - k], {n, 0, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 20 2018 *)
  • PARI
    T(n,k) = binomial(n+k,k) - binomial(k-1,k-1-n); \\ Michel Marcus, Aug 07 2018

Formula

A(n,k) = binomial(n+k,k) - binomial(k-1,k-1-n) for n >= 0 and k >= 0 with binomial(i,j) = 0 if i < j or j < 0.
G.f.: Sum_{k>=0,n>=0} A(n,k)*x^k*y^n = ((1-x)^2)/((1-x-y)*(1-x-x*y)).
Seen as a triangle T(n,k) = A(n-k,k) = binomial(n,k)-binomial(k-1,2*k-1-n) for 0 <= k <= n with binomial(i,j) = 0 if i < j or j < 0.
Mirror image of the triangle equals A173265 except column 0.
Previous Showing 11-20 of 20 results.