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 52 results. Next

A324015 Number of nonempty subsets of {1, ..., n} containing no two cyclically successive elements.

Original entry on oeis.org

0, 1, 2, 3, 6, 10, 17, 28, 46, 75, 122, 198, 321, 520, 842, 1363, 2206, 3570, 5777, 9348, 15126, 24475, 39602, 64078, 103681, 167760, 271442, 439203, 710646, 1149850, 1860497, 3010348, 4870846, 7881195, 12752042, 20633238, 33385281, 54018520, 87403802
Offset: 0

Views

Author

Gus Wiseman, Feb 12 2019

Keywords

Comments

Cyclically successive means 1 succeeds n.
After a(1) = 1, same as A001610 shifted once to the right. Also, a(n) = A169985(n) - 1.

Examples

			The a(6) = 17 stable subsets:
  {1}, {2}, {3}, {4}, {5}, {6},
  {1,3}, {1,4}, {1,5}, {2,4}, {2,5}, {2,6}, {3,5}, {3,6}, {4,6},
  {1,3,5}, {2,4,6}.
		

Crossrefs

Programs

  • Mathematica
    stabsubs[g_]:=Select[Rest[Subsets[Union@@g]],Select[g,Function[ed,UnsameQ@@ed&&Complement[ed,#]=={}]]=={}&];
    Table[Length[stabsubs[Partition[Range[n],2,1,1]]],{n,0,10}]

Formula

For n <= 3, a(n) = n. Otherwise, a(n) = a(n - 1) + a(n - 2) + 1.

A157000 Triangle T(n,k) = (n/k)*binomial(n-k-1, k-1) read by rows.

Original entry on oeis.org

2, 3, 4, 2, 5, 5, 6, 9, 2, 7, 14, 7, 8, 20, 16, 2, 9, 27, 30, 9, 10, 35, 50, 25, 2, 11, 44, 77, 55, 11, 12, 54, 112, 105, 36, 2, 13, 65, 156, 182, 91, 13, 14, 77, 210, 294, 196, 49, 2, 15, 90, 275, 450, 378, 140, 15, 16, 104, 352, 660, 672, 336, 64, 2, 17, 119, 442, 935, 1122, 714, 204, 17
Offset: 2

Views

Author

Roger L. Bagula, Feb 20 2009

Keywords

Comments

Row sums are A001610(n-1).
Triangle A034807 (coefficients of Lucas polynomials) with the first column omitted. - Philippe Deléham, Mar 17 2013
T(n,k) is the number of ways to select k knights from a round table of n knights, no two adjacent. - Bert Seghers, Mar 02 2014

Examples

			The table starts in row n=2, column k=1 as:
   2;
   3;
   4,  2;
   5,  5;
   6,  9,   2;
   7, 14,   7;
   8, 20,  16,   2;
   9, 27,  30,   9;
  10, 35,  50,  25,  2;
  11, 44,  77,  55, 11;
  12, 54, 112, 105, 36, 2;
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 199

Crossrefs

Programs

  • Magma
    [[n*Binomial(n-k-1,k-1)/k: k in [1..Floor(n/2)]]: n in [2..20]]; // G. C. Greubel, Apr 25 2019
    
  • Mathematica
    Table[(n/k)*Binomial[n-k-1, k-1], {n,2,20}, {k,1,Floor[n/2]}]//Flatten (* modified by G. C. Greubel, Apr 25 2019 *)
  • PARI
    a(n,k)=n*binomial(n-k-1,k-1)/k; \\ Charles R Greathouse IV, Jul 10 2011
    
  • Sage
    [[n*binomial(n-k-1,k-1)/k for k in (1..floor(n/2))] for n in (2..20)] # G. C. Greubel, Apr 25 2019

Formula

T(n,k) = binomial(n-k,k) + binomial(n-k-1,k-1). - Bert Seghers, Mar 02 2014

Extensions

Offset 2, keyword:tabf, more terms by the Assoc. Eds. of the OEIS, Nov 01 2010

A259598 Number of representations of n as u(h) + v(k), where u = A000201 (lower Wythoff numbers), v = A001950 (upper Wythoff numbers), h>=1, k>=1.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 3, 1, 2, 4, 0, 4, 4, 1, 6, 2, 4, 7, 0, 8, 4, 4, 9, 1, 8, 8, 2, 11, 4, 7, 12, 0, 12, 9, 4, 14, 4, 10, 14, 1, 16, 8, 8, 17, 2, 15, 14, 4, 19, 7, 12, 20, 0, 21, 12, 9, 22, 4, 18, 19, 4, 24, 10, 14, 25, 1, 24, 18, 8, 27, 8, 19, 26, 2, 29, 15
Offset: 1

Views

Author

Clark Kimberling, Jul 22 2015

Keywords

Comments

Three conjectures. The numbers that are not a sum u(h) + v(k) are (1,2,4,7,12, ...) = A000071 = -1 + Fibonacci numbers. The numbers that have exactly one such representation are (3, 5, 9, 15, 25, 41, ...) = A001595. The numbers that have exactly two such representations are (6, 10, 17, 28, 46, ...) = A001610.

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; z = 500;
    u[n_] := u[n] = Floor[n*r]; v[n_] := v[n] = Floor[n*r^2];
    s[m_, n_] := s[m, n] = u[m] + v[n]; t = Table[s[m, n], {m, 1, z}, {n, 1, z}];
    w = Flatten[Table[Count[Flatten[t], n], {n, 1, z/5}]]  (* A259598 *)
  • PARI
    {a(n) = my(phi = (1 + sqrt(5))/2, WL=1, WU=1);
    WL = sum(m=1, floor(n/phi)+1, x^floor(m*phi) +x*O(x^n));
    WU = sum(m=1, floor(n/phi^2)+1, x^floor(m*phi^2) +x*O(x^n));
    polcoeff(WL*WU, n)}
    for(n=1, 120, print1(a(n), ", ")) \\ Paul D. Hanna, Dec 02 2017

Formula

G.f.: [Sum_{n>=1} x^floor(n*phi)] * [Sum_{n>=1} x^floor(n*phi^2)], where phi = (1+sqrt(5))/2. - Paul D. Hanna, Dec 02 2017
G.f.: [Sum_{n>=1} x^A000201(n)] * [Sum_{n>=1} x^A001950(n)], where A000201 and A001950 are the lower and upper Wythoff sequences, respectively. - Paul D. Hanna, Dec 02 2017

A306419 Number of set partitions of {1, ..., n} whose blocks are all singletons and pairs, not including {1, n} or {i, i + 1} for any i.

Original entry on oeis.org

1, 1, 1, 1, 4, 11, 32, 99, 326, 1123, 4064, 15291, 59924, 242945, 1019584, 4409233, 19648674, 89938705, 422744384, 2035739041, 10039057524, 50610247483, 260704414816, 1370387233859, 7346982653702, 40131663286851, 223238920709024, 1263531826402891, 7273434344119460
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Comments

Also the number of spanning subgraphs of the complement of an n-cycle, with no overlapping edges.
I.e., for n >= 3, also the number of matchings in the complement of the cycle graph C_n. - Eric W. Weisstein, Sep 02 2025

Examples

			The a(1) = 1 through a(5) = 11 set partitions:
  {{1}}  {{1}{2}}  {{1}{2}{3}}  {{13}{24}}      {{1}{24}{35}}
                                {{1}{24}{3}}    {{13}{24}{5}}
                                {{13}{2}{4}}    {{13}{25}{4}}
                                {{1}{2}{3}{4}}  {{14}{2}{35}}
                                                {{14}{25}{3}}
                                                {{1}{2}{35}{4}}
                                                {{1}{24}{3}{5}}
                                                {{1}{25}{3}{4}}
                                                {{13}{2}{4}{5}}
                                                {{14}{2}{3}{5}}
                                                {{1}{2}{3}{4}{5}}
		

Crossrefs

Cf. A000085, A000110, A000296, A001006, A001610, A003436 (no singletons), A034807, A170941 (linear case), A278990 (linear case with no singletons), A306417.

Programs

  • Mathematica
    stableSets[u_,Q_]:=If[Length[u]===0,{{}},With[{w=First[u]},Join[stableSets[DeleteCases[u,w],Q],Prepend[#,w]&/@stableSets[DeleteCases[u,r_/;r===w||Q[r,w]||Q[w,r]],Q]]]];
    Table[Length[stableSets[Complement[Subsets[Range[n],{2}],Sort/@Partition[Range[n],2,1,1]],Intersection[#1,#2]!={}&]],{n,0,10}]
    (* Second program: *)
    CompoundExpression[
      b[n_] := I^(1 - n) 2^((n - 1)/2) HypergeometricU[(1 - n)/2, 3/2, -1/2],
      Join[{1, 1, 1}, Table[Sum[(-1)^k b[n - 2 k] n (n - 1 - k)!/(k! (n - 2 k)!), {k, 0, n/2}], {n, 3, 20}]]
    ] (* Eric W. Weisstein, Sep 02 2025 *)
  • PARI
    \\ here b(n) is A000085(n)
    b(n) = {sum(k=0, n\2, n!/((n-2*k)!*2^k*k!))}
    a(n) = {if(n < 3, n >= 0, sum(k=0, n\2, (-1)^k*b(n-2*k)*n*(n-1-k)!/(k!*(n-2*k)!)))} \\ Andrew Howroyd, Aug 30 2019

Formula

a(n) = Sum_{k=0..floor(n/2)} (-1)^k*A034807(n, k)*A000085(n-2*k) for n > 2. - Andrew Howroyd, Aug 30 2019

Extensions

Terms a(16) and beyond from Andrew Howroyd, Aug 30 2019

A306437 Regular triangle read by rows where T(n,k) is the number of non-crossing set partitions of {1, ..., n} in which all blocks have size k.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 0, 0, 0, 1, 1, 5, 3, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 14, 0, 4, 0, 0, 0, 1, 1, 0, 12, 0, 0, 0, 0, 0, 1, 1, 42, 0, 0, 5, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 132, 55, 22, 0, 6, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 429, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 15 2019

Keywords

Examples

			Triangle begins:
  1
  1   1
  1   0   1
  1   2   0   1
  1   0   0   0   1
  1   5   3   0   0   1
  1   0   0   0   0   0   1
  1  14   0   4   0   0   0   1
  1   0  12   0   0   0   0   0   1
  1  42   0   0   5   0   0   0   0   1
  1   0   0   0   0   0   0   0   0   0   1
  1 132  55  22   0   6   0   0   0   0   0   1
Row 6 counts the following non-crossing set partitions (empty columns not shown):
  {{1}{2}{3}{4}{5}{6}}  {{12}{34}{56}}  {{123}{456}}  {{123456}}
                        {{12}{36}{45}}  {{126}{345}}
                        {{14}{23}{56}}  {{156}{234}}
                        {{16}{23}{45}}
                        {{16}{25}{34}}
		

Crossrefs

Row sums are A194560. Column k=2 is A126120. Trisection of column k=3 is A001764.

Programs

  • Maple
    T:= (n, k)-> `if`(irem(n, k)=0, binomial(n, n/k)/(n-n/k+1), 0):
    seq(seq(T(n,k), k=1..n), n=1..14);  # Alois P. Heinz, Feb 16 2019
  • Mathematica
    Table[Table[If[Divisible[n,d],d/n*Binomial[n,n/d-1],0],{d,n}],{n,15}]

Formula

If d|n, then T(n, d) = binomial(n, n/d)/(n - n/d + 1); otherwise T(n, k) = 0 [Theorem 1 of Kreweras].

A323949 Number of set partitions of {1, ..., n} with no block containing three distinct cyclically successive vertices.

Original entry on oeis.org

1, 1, 2, 4, 10, 36, 145, 631, 3015, 15563, 86144, 508311, 3180930, 21018999, 146111543, 1065040886, 8117566366, 64531949885, 533880211566, 4587373155544, 40865048111424, 376788283806743, 3590485953393739, 35312436594162173, 357995171351223109, 3736806713651177702
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Comments

Cyclically successive means 1 is a successor of n.

Examples

			The a(1) = 1 through a(4) = 10 set partitions:
  {{1}}  {{1,2}}    {{1},{2,3}}    {{1,2},{3,4}}
         {{1},{2}}  {{1,2},{3}}    {{1,3},{2,4}}
                    {{1,3},{2}}    {{1,4},{2,3}}
                    {{1},{2},{3}}  {{1},{2},{3,4}}
                                   {{1},{2,3},{4}}
                                   {{1,2},{3},{4}}
                                   {{1},{2,4},{3}}
                                   {{1,3},{2},{4}}
                                   {{1,4},{2},{3}}
                                   {{1},{2},{3},{4}}
		

Crossrefs

Programs

  • Mathematica
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],Select[Partition[Range[n],3,1,1],Function[ed,UnsameQ@@ed&&Complement[ed,#]=={}]]=={}&],Range[n]]],{n,8}]

Extensions

a(12)-a(25) from Alois P. Heinz, Feb 10 2019

A323955 Regular triangle read by rows where T(n, k) is the number of set partitions of {1, ..., n} with no block containing k cyclically successive vertices, n >= 1, 2 <= k <= n + 1.

Original entry on oeis.org

1, 1, 2, 1, 4, 5, 4, 10, 14, 15, 11, 36, 46, 51, 52, 41, 145, 184, 196, 202, 203, 162, 631, 806, 855, 869, 876, 877, 715, 3015, 3847, 4059, 4115, 4131, 4139, 4140, 3425, 15563, 19805, 20813, 21056, 21119, 21137, 21146, 21147, 17722, 86144, 109339, 114469
Offset: 1

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Comments

Cyclically successive means 1 is a successor of n.

Examples

			Triangle begins:
    1
    1    2
    1    4    5
    4   10   14   15
   11   36   46   51   52
   41  145  184  196  202  203
  162  631  806  855  869  876  877
  715 3015 3847 4059 4115 4131 4139 4140
Row 4 counts the following partitions:
  {{13}{24}}      {{12}{34}}      {{1}{234}}      {{1234}}
  {{1}{24}{3}}    {{13}{24}}      {{12}{34}}      {{1}{234}}
  {{13}{2}{4}}    {{14}{23}}      {{123}{4}}      {{12}{34}}
  {{1}{2}{3}{4}}  {{1}{2}{34}}    {{124}{3}}      {{123}{4}}
                  {{1}{23}{4}}    {{13}{24}}      {{124}{3}}
                  {{12}{3}{4}}    {{134}{2}}      {{13}{24}}
                  {{1}{24}{3}}    {{14}{23}}      {{134}{2}}
                  {{13}{2}{4}}    {{1}{2}{34}}    {{14}{23}}
                  {{14}{2}{3}}    {{1}{23}{4}}    {{1}{2}{34}}
                  {{1}{2}{3}{4}}  {{12}{3}{4}}    {{1}{23}{4}}
                                  {{1}{24}{3}}    {{12}{3}{4}}
                                  {{13}{2}{4}}    {{1}{24}{3}}
                                  {{14}{2}{3}}    {{13}{2}{4}}
                                  {{1}{2}{3}{4}}  {{14}{2}{3}}
                                                  {{1}{2}{3}{4}}
		

Crossrefs

First column (k = 2) is A000296. Second column (k = 3) is A323949. Rightmost terms are A000110. Second to rightmost terms are A058692.

Programs

  • Mathematica
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],Select[Partition[Range[n],k,1,1],Function[ed,UnsameQ@@ed&&Complement[ed,#]=={}]]=={}&],Range[n]]],{n,7},{k,2,n+1}]

A323956 Triangle read by rows: T(n, k) = 1 + n * (n - k) for 1 <= k <= n.

Original entry on oeis.org

1, 3, 1, 7, 4, 1, 13, 9, 5, 1, 21, 16, 11, 6, 1, 31, 25, 19, 13, 7, 1, 43, 36, 29, 22, 15, 8, 1, 57, 49, 41, 33, 25, 17, 9, 1, 73, 64, 55, 46, 37, 28, 19, 10, 1, 91, 81, 71, 61, 51, 41, 31, 21, 11, 1, 111, 100, 89, 78, 67, 56, 45, 34, 23, 12, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Examples

			Triangle begins:
  n\k:   1   2   3   4   5   6   7   8   9  10  11  12
  ====================================================
    1:   1
    2:   3   1
    3:   7   4   1
    4:  13   9   5   1
    5:  21  16  11   6   1
    6:  31  25  19  13   7   1
    7:  43  36  29  22  15   8   1
    8:  57  49  41  33  25  17   9   1
    9:  73  64  55  46  37  28  19  10   1
   10:  91  81  71  61  51  41  31  21  11   1
   11: 111 100  89  78  67  56  45  34  23  12   1
   12: 133 121 109  97  85  73  61  49  37  25  13   1
  etc.
		

Crossrefs

First column is A002061. Second column is A000290. Third column is A028387.

Programs

  • Magma
    [[1+n*(n-k): k in [1..n]]: n in [1..12]]; // G. C. Greubel, Apr 22 2019
    
  • Mathematica
    Table[1+n*(n-k),{n,12},{k,n}]//Flatten
  • PARI
    {T(n,k) = 1+n*(n-k)}; \\ G. C. Greubel, Apr 22 2019
    
  • Sage
    [[1+n*(n-k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Apr 22 2019

Formula

From Werner Schulte, Feb 12 2019: (Start)
G.f.: Sum_{n>0,k=1..n} T(n,k)*x^k*t^n = x*t*((1-t+2*t^2)*(1-x*t) + (1-t)*t)/((1-t)^3*(1-x*t)^2).
Row sums: Sum_{k=1..n} T(n,k) = A006000(n-1) for n > 0.
Recurrence: T(n,k) = T(n,k-1) - n for 1 < k <= n with initial values T(n,1) = n^2-n+1 for n > 0.
Recurrence: T(n,k) = T(n-1,k) + 2*n-k-1 for 1 <= k < n with initial values T(n,n) = 1 for n > 0.
(End)

A048162 Expansion of (1 - x + 3*x^3 - 2*x^4 - 3*x^5)/(1 - 2*x + x^3).

Original entry on oeis.org

1, 1, 2, 6, 9, 13, 20, 31, 49, 78, 125, 201, 324, 523, 845, 1366, 2209, 3573, 5780, 9351, 15129, 24478, 39605, 64081, 103684, 167763, 271445, 439206, 710649, 1149853, 1860500, 3010351, 4870849, 7881198, 12752045, 20633241, 33385284
Offset: 0

Views

Author

Keywords

Comments

Number of permutations of 1..n such that each position is fixed or moves to an adjacent position (with n considered adjacent to 1). For example, a(4) = 9 because there is the identity; 2 cyclic permutations; 4 swaps of one pair of adjacent entries; and 2 swaps of two pairs of adjacent entries. - Joshua Zucker, Nov 13 2003

References

  • Lehmer, D. H.; Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

3rd column of A008305.
Cf. A001610.

Programs

  • Mathematica
    CoefficientList[Series[(1-x+3x^3-2x^4-3x^5)/(1-2x+x^3),{x,0,40}],x] (* or *) Join[{1,1,2},#[[3]]+#[[1]]+2&/@Partition[Fibonacci[Range[2,50]],3,1]] (* Harvey P. Dale, Apr 06 2017 *)

Formula

For n>4, a(n) = a(n-1) + a(n-2) - 2. - Joshua Zucker, Nov 13 2003
a(n) = Fibonacci(n+1) + Fibonacci(n-1) + 2, for n>2. - Jessa Lee (jessal(AT)comcast.net), Nov 25 2003
For n > 2, a(n)=A001610(n-1) - 3. - Toby Gottfried, Apr 13 2013

Extensions

Second formula corrected by David Radcliffe, Jan 16 2011

A087050 Square root of the largest square >1 dividing the n-th nonsquarefree number.

Original entry on oeis.org

2, 2, 3, 2, 4, 3, 2, 2, 5, 3, 2, 4, 6, 2, 2, 3, 4, 7, 5, 2, 3, 2, 2, 3, 8, 2, 6, 5, 2, 4, 9, 2, 2, 3, 2, 4, 7, 3, 10, 2, 6, 4, 2, 3, 2, 11, 2, 5, 3, 8, 2, 3, 2, 2, 12, 7, 2, 5, 2, 3, 2, 4, 9, 2, 2, 13, 3, 2, 5, 4, 6, 2, 2, 3, 8, 14, 3, 10, 2, 3, 4, 2, 6, 2, 4, 15, 2, 2, 3, 2, 4, 11, 9, 2, 7, 2, 5, 6, 16, 2, 3
Offset: 1

Views

Author

Wolfdieter Lang, Sep 08 2003

Keywords

Examples

			n=10, A013929(10) = 27, a(10)^2 = 3^2 = 9. 27 = 9*3.
n=39, A013929(39) = 100, a(39)^2 = 10^2 = 100.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^Floor[e/2]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; s /@ Select[Range[300], !SquareFreeQ[#] &] (* Amiram Eldar, Feb 11 2021 *)
  • Python
    from math import isqrt, prod
    from sympy import mobius, factorint
    def A087050(n):
        def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return prod(p**(e>>1) for p, e in factorint(m).items() if e>1) # Chai Wah Wu, Jul 22 2024

Formula

a(n)^2 is the largest square factor (from A000290) of the nonsquarefree number A013929(n), n>=1.
a(n) = A000188(A013929(n)). - Amiram Eldar, Feb 11 2021
Sum_{k=1..n} a(k) ~ (n/(2*(zeta(2)-1))) * (log(n) + 3*gamma - 3 - 2*zeta'(2)/zeta(2) - log(1-1/zeta(2))), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 14 2024
Previous Showing 31-40 of 52 results. Next