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.

Showing 1-10 of 59 results. Next

A003242 Number of compositions of n such that no two adjacent parts are equal (these are sometimes called Carlitz compositions).

Original entry on oeis.org

1, 1, 1, 3, 4, 7, 14, 23, 39, 71, 124, 214, 378, 661, 1152, 2024, 3542, 6189, 10843, 18978, 33202, 58130, 101742, 178045, 311648, 545470, 954658, 1670919, 2924536, 5118559, 8958772, 15680073, 27443763, 48033284, 84069952, 147142465, 257534928, 450748483, 788918212
Offset: 0

Views

Author

E. Rodney Canfield

Keywords

Examples

			From _Joerg Arndt_, Oct 27 2012:  (Start)
The 23 such compositions of n=7 are
[ 1]  1 2 1 2 1
[ 2]  1 2 1 3
[ 3]  1 2 3 1
[ 4]  1 2 4
[ 5]  1 3 1 2
[ 6]  1 3 2 1
[ 7]  1 4 2
[ 8]  1 5 1
[ 9]  1 6
[10]  2 1 3 1
[11]  2 1 4
[12]  2 3 2
[13]  2 4 1
[14]  2 5
[15]  3 1 2 1
[16]  3 1 3
[17]  3 4
[18]  4 1 2
[19]  4 2 1
[20]  4 3
[21]  5 2
[22]  6 1
[23]  7
(End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 191.

Crossrefs

Row sums of A232396, A241701.
Cf. A241902.
Column k=1 of A261960.
Cf. A048272.
Compositions with adjacent parts coprime are A167606.
The complement is counted by A261983.

Programs

Formula

a(n) = Sum_{k=1..n} A048272(k)*a(n-k), n>1, a(0)=1. - Vladeta Jovovic, Feb 05 2002
G.f.: 1/(1 - Sum_{k>0} x^k/(1+x^k)).
a(n) ~ c r^n where c is approximately 0.456387 and r is approximately 1.750243. (Formula from Knopfmacher and Prodinger reference.) - Franklin T. Adams-Watters, May 27 2010. With better precision: r = 1.7502412917183090312497386246398158787782058181381590561316586... (see A241902), c = 0.4563634740588133495321001859298593318027266156100046548066205... - Vaclav Kotesovec, Apr 30 2014
G.f. is the special case p=2 of 1/(1 - Sum_{k>0} (z^k/(1-z^k) - p*z^(k*p)/(1-z^(k*p)))), see A129922. - Joerg Arndt, Apr 28 2013
G.f.: 1/(1 - x * (d/dx) log(Product_{k>=1} (1 + x^k)^(1/k))). - Ilya Gutkovskiy, Oct 18 2018
Moebius transform of A329738. - Gus Wiseman, Nov 27 2019
For n>=2, a(n) = A128695(n) - A091616(n). - Vaclav Kotesovec, Jul 07 2020

Extensions

More terms from David W. Wilson

A000740 Number of 2n-bead balanced binary necklaces of fundamental period 2n, equivalent to reversed complement; also Dirichlet convolution of b_n=2^(n-1) with mu(n); also number of components of Mandelbrot set corresponding to Julia sets with an attractive n-cycle.

Original entry on oeis.org

1, 1, 3, 6, 15, 27, 63, 120, 252, 495, 1023, 2010, 4095, 8127, 16365, 32640, 65535, 130788, 262143, 523770, 1048509, 2096127, 4194303, 8386440, 16777200, 33550335, 67108608, 134209530, 268435455, 536854005, 1073741823, 2147450880
Offset: 1

Views

Author

Keywords

Comments

Also number of compositions of n into relatively prime parts (that is, the gcd of all the parts is 1). Also number of subsets of {1,2,..,n} containing n and consisting of relatively prime numbers. - Vladeta Jovovic, Aug 13 2003
Also number of perfect parity patterns that have exactly n columns (see A118141). - Don Knuth, May 11 2006
a(n) is odd if and only if n is squarefree (Tim Keller). - Emeric Deutsch, Apr 27 2007
a(n) is a multiple of 3 for all n>=3 (see Problem 11161 link). - Emeric Deutsch, Aug 13 2008
Row sums of triangle A143424. - Gary W. Adamson, Aug 14 2008
a(n) is the number of monic irreducible polynomials with nonzero constant coefficient in GF(2)[x] of degree n. - Michel Marcus, Oct 30 2016
a(n) is the number of aperiodic compositions of n, the number of compositions of n with relatively prime parts, and the number of compositions of n with relatively prime run-lengths. - Gus Wiseman, Dec 21 2017

Examples

			For n=4, there are 6 compositions of n into coprime parts: <3,1>, <2,1,1>, <1,3>, <1,2,1>, <1,1,2>, and <1,1,1,1>.
From _Gus Wiseman_, Dec 19 2017: (Start)
The a(6) = 27 aperiodic compositions are:
  (11112), (11121), (11211), (12111), (21111),
  (1113), (1122), (1131), (1221), (1311), (2112), (2211), (3111),
  (114), (123), (132), (141), (213), (231), (312), (321), (411),
  (15), (24), (42), (51),
  (6).
The a(6) = 27 compositions into relatively prime parts are:
  (111111),
  (11112), (11121), (11211), (12111), (21111),
  (1113), (1122), (1131), (1212), (1221), (1311), (2112), (2121), (2211), (3111),
  (114), (123), (132), (141), (213), (231), (312), (321), (411),
  (15), (51).
The a(6) = 27 compositions with relatively prime run-lengths are:
  (11112), (11121), (11211), (12111), (21111),
  (1113), (1131), (1212), (1221), (1311), (2112), (2121), (3111),
  (114), (123), (132), (141), (213), (231), (312), (321), (411),
  (15), (24), (42), (51),
  (6).
(End)
		

References

  • H. O. Peitgen and P. H. Richter, The Beauty of Fractals, Springer-Verlag; contribution by A. Douady, p. 165.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equals A027375/2.
See A056278 for a variant.
First differences of A085945.
Column k=2 of A143325.
Row sums of A101391.

Programs

  • Maple
    with(numtheory): a[1]:=1: a[2]:=1: for n from 3 to 32 do div:=divisors(n): a[n]:=2^(n-1)-sum(a[n/div[j]],j=2..tau(n)) od: seq(a[n],n=1..32); # Emeric Deutsch, Apr 27 2007
    with(numtheory); A000740:=n-> add(mobius(n/d)*2^(d-1), d in divisors(n)); # N. J. A. Sloane, Oct 18 2012
  • Mathematica
    a[n_] := Sum[ MoebiusMu[n/d]*2^(d - 1), {d, Divisors[n]}]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Feb 03 2012, after PARI *)
  • PARI
    a(n) = sumdiv(n,d,moebius(n/d)*2^(d-1))
    
  • Python
    from sympy import mobius, divisors
    def a(n): return sum([mobius(n // d) * 2**(d - 1) for d in divisors(n)])
    [a(n) for n in range(1, 101)]  # Indranil Ghosh, Jun 28 2017

Formula

a(n) = Sum_{d|n} mu(n/d)*2^(d-1), Mobius transform of A011782. Furthermore, Sum_{d|n} a(d) = 2^(n-1).
a(n) = A027375(n)/2 = A038199(n)/2.
a(n) = Sum_{k=0..n} A051168(n,k)*k. - Max Alekseyev, Apr 09 2013
Recurrence relation: a(n) = 2^(n-1) - Sum_{d|n,d>1} a(n/d). (Lafayette College Problem Group; see the Maple program and Iglesias eq (6)). - Emeric Deutsch, Apr 27 2007
G.f.: Sum_{k>=1} mu(k)*x^k/(1 - 2*x^k). - Ilya Gutkovskiy, Oct 24 2018
G.f. satisfies Sum_{n>=1} A( (x/(1 + 2*x))^n ) = x. - Paul D. Hanna, Apr 02 2025

Extensions

Connection with Mandelbrot set discovered by Warren D. Smith and proved by Robert Munafo, Feb 06 2000
Ambiguous term a(0) removed by Max Alekseyev, Jan 02 2012

A006498 a(n) = a(n-1) + a(n-3) + a(n-4), a(0) = a(1) = a(2) = 1, a(3) = 2.

Original entry on oeis.org

1, 1, 1, 2, 4, 6, 9, 15, 25, 40, 64, 104, 169, 273, 441, 714, 1156, 1870, 3025, 4895, 7921, 12816, 20736, 33552, 54289, 87841, 142129, 229970, 372100, 602070, 974169, 1576239, 2550409, 4126648, 6677056, 10803704, 17480761, 28284465, 45765225, 74049690, 119814916
Offset: 0

Views

Author

Keywords

Comments

Number of compositions of n into 1's, 3's and 4's. - Len Smiley, May 08 2001
The sum of any two alternating terms (terms separated by one term) produces a number from the Fibonacci sequence. (e.g. 4+9=13, 9+25=34, 6+15=21, etc.) Taking square roots starting from the first term and every other term after, we get the Fibonacci sequence. - Sreyas Srinivasan (sreyas_srinivasan(AT)hotmail.com), May 02 2002
(1 + x + 2*x^2 + x^3)/(1 - x - x^3 - x^4) = 1 + 2*x + 4*x^2 + 6*x^3 + 9*x^4 + 15*x^5 + 25*x^6 + 40*x^7 + ... is the g.f. for the number of binary strings of length where neither 101 nor 111 occur. [Lozansky and Rousseau] Or, equivalently, where neither 000 nor 010 occur.
Equivalently, a(n+2) is the number of length-n binary strings with no two set bits with distance 2; see fxtbook link. - Joerg Arndt, Jul 10 2011
a(n) is the number of words written with the letters "a" and "b", with the following restriction: any "a" must be followed by at least two letters, the second of which is a "b". - Bruno Petazzoni (bpetazzoni(AT)ac-creteil.fr), Oct 31 2005. [This is also equivalent to the previous two conditions.]
Let a(0) = 1, then a(n) = partial products of Product_{n>2} (F(n)/F(n-1))^2 = 1*1*2*2*(3/2)*(3/2)*(5/3)*(5/3)*(8/5)*(8/5)*.... E.g., a(7) = 15 = 1*1*1*2*2*(3/2)*(3/2)*(5/3). - Gary W. Adamson, Dec 13 2009
Number of permutations satisfying -k <= p(i) - i <= r and p(i)-i not in I, i=1..n, with k=1, r=3, I={1}. - Vladimir Baltic, Mar 07 2012
The 2-dimensional version, which counts sets of pairs no two of which are separated by graph-distance 2, is A273461. - Gus Wiseman, Nov 27 2019
a(n+1) is the number of multus bitstrings of length n with no runs of 4 ones. - Steven Finch, Mar 25 2020

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 4*x^4 + 6*x^5 + 9*x^6 + 15*x^7 + 25*x^8 + 40*x^9 + ...
From _Gus Wiseman_, Nov 27 2019: (Start)
The a(2) = 1 through a(7) = 15 subsets with no two elements differing by 2:
  {}  {}   {}     {}     {}     {}
      {1}  {1}    {1}    {1}    {1}
           {2}    {2}    {2}    {2}
           {1,2}  {3}    {3}    {3}
                  {1,2}  {4}    {4}
                  {2,3}  {1,2}  {5}
                         {1,4}  {1,2}
                         {2,3}  {1,4}
                         {3,4}  {1,5}
                                {2,3}
                                {2,5}
                                {3,4}
                                {4,5}
                                {1,2,5}
                                {1,4,5}
(End)
		

References

  • E. Lozansky and C. Rousseau, Winning Solutions, Springer, 1996; see pp. 157 and 172.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A060945 (for 1's, 2's and 4's). Essentially the same as A074677.
Diagonal sums of number triangle A059259.
Numbers whose binary expansion has no subsequence (1,0,1) are A048716.

Programs

  • Haskell
    a006498 n = a006498_list !! n
    a006498_list = 1 : 1 : 1 : 2 : zipWith (+) (drop 3 a006498_list)
       (zipWith (+) (tail a006498_list) a006498_list)
    -- Reinhard Zumkeller, Apr 07 2012
  • Magma
    [ n eq 1 select 1 else n eq 2 select 1 else n eq 3 select 1 else n eq 4 select 2 else Self(n-1)+Self(n-3)+ Self(n-4): n in [1..40] ]; // Vincenzo Librandi, Aug 20 2011
    
  • Mathematica
    LinearRecurrence[{1,0,1,1},{1,1,1,2},50] (* Harvey P. Dale, Jul 13 2011 *)
    Table[Fibonacci[Floor[n/2] + 2]^Mod[n, 2]*Fibonacci[Floor[n/2] + 1]^(2 - Mod[n, 2]), {n, 0, 40}] (* David Nacin, Feb 29 2012 *)
    a[ n_] := Fibonacci[ Quotient[ n+2, 2]] Fibonacci[ Quotient[ n+3, 2]] (* Michael Somos, Jan 19 2014 *)
    Table[Length[Select[Subsets[Range[n]],!MatchQ[#,{_,x_,_,y_,_}/;x+2==y]&]],{n,10}] (* Gus Wiseman, Nov 27 2019 *)
  • PARI
    {a(n) = fibonacci( (n+2)\2 ) * fibonacci( (n+3)\2 )} /* Michael Somos, Mar 10 2004 */
    
  • PARI
    Vec(1/(1-x-x^3-x^4)+O(x^66))
    
  • Python
    def a(n, adict={0:1, 1:1, 2:1, 3:2}):
        if n in adict:
            return adict[n]
        adict[n]=a(n-1)+a(n-3)+a(n-4)
        return adict[n] # David Nacin, Mar 07 2012
    

Formula

G.f.: 1 / ((1 + x^2) * (1 - x - x^2)); a(2*n) = F(n+1)^2, a(2*n - 1) = F(n+1)*F(n). a(n) = a(-4-n) * (-1)^n. - Michael Somos, Mar 10 2004
The g.f. -(1+z+2*z^2+z^3)/((z^2+z-1)*(1+z^2)) for the truncated version 1, 2, 4, 6, 9, 15, 25, 40, ... was given in the Simon Plouffe thesis of 1992. [edited by R. J. Mathar, May 13 2008]
From Vladeta Jovovic, May 03 2002: (Start)
a(n) = round((-(1/5)*sqrt(5) - 1/5)*(-2*1/(-sqrt(5)+1))^n/(-sqrt(5)+1) + ((1/5)*sqrt(5) - 1/5)*(-2*1/( sqrt(5)+1))^n/(sqrt(5)+1)).
G.f.: 1/(1-x-x^2)/(1+x^2). (End)
a(n) = (-i)^n*Sum{k=0..n} U(n-2k, i/2) where i^2=-1. - Paul Barry, Nov 15 2003
a(n) = Sum_{k=0..floor(n/2)} (-1)^k*F(n-2k+1). - Paul Barry, Oct 12 2007
F(floor(n/2) + 2)^(n mod 2)*F(floor(n/2) + 1)^(2 - (n mod 2)) where F(n) is the n-th Fibonacci number. - David Nacin, Feb 29 2012
a(2*n - 1) = A001654(n), a(2*n) = A007598(n+1). - Michael Somos, Mar 10 2004
a(n+1)*a(n+3) = a(n)*a(n+2) + a(n+1)*a(n+2) for all n in Z. - Michael Somos, Jan 19 2014
a(n) = round(1/(1/F(n+2) + 2/F(n+3))), where F(n) = A000045, and 0.5 is rounded to 1. - Richard R. Forberg, Aug 04 2014
5*a(n) = (-1)^floor(n/2)*A000034(n+1) + A000032(n+2). - R. J. Mathar, Sep 16 2017
a(n) = Sum_{j=0..floor(n/3)} Sum_{k=0..j} binomial(n-3j,k)*binomial(j,k)*2^k. - Tony Foster III, Sep 18 2017
E.g.f.: (2*cos(x) + sin(x) + exp(x/2)*(3*cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2)))/5. - Stefano Spezia, Mar 12 2024

A261983 Number of compositions of n such that at least two adjacent parts are equal.

Original entry on oeis.org

0, 0, 1, 1, 4, 9, 18, 41, 89, 185, 388, 810, 1670, 3435, 7040, 14360, 29226, 59347, 120229, 243166, 491086, 990446, 1995410, 4016259, 8076960, 16231746, 32599774, 65437945, 131293192, 263316897, 527912140, 1058061751, 2120039885, 4246934012, 8505864640
Offset: 0

Views

Author

Alois P. Heinz, Sep 07 2015

Keywords

Examples

			a(5) = 9: 311, 113, 221, 122, 2111, 1211, 1121, 1112, 11111.
From _Gus Wiseman_, Jul 07 2020: (Start)
The a(2) = 1 through a(6) = 18 compositions:
  (1,1)  (1,1,1)  (2,2)      (1,1,3)      (3,3)
                  (1,1,2)    (1,2,2)      (1,1,4)
                  (2,1,1)    (2,2,1)      (2,2,2)
                  (1,1,1,1)  (3,1,1)      (4,1,1)
                             (1,1,1,2)    (1,1,1,3)
                             (1,1,2,1)    (1,1,2,2)
                             (1,2,1,1)    (1,1,3,1)
                             (2,1,1,1)    (1,2,2,1)
                             (1,1,1,1,1)  (1,3,1,1)
                                          (2,1,1,2)
                                          (2,2,1,1)
                                          (3,1,1,1)
                                          (1,1,1,1,2)
                                          (1,1,1,2,1)
                                          (1,1,2,1,1)
                                          (1,2,1,1,1)
                                          (2,1,1,1,1)
                                          (1,1,1,1,1,1)
(End)
		

Crossrefs

Column k=1 of A261981.
The complement A003242 counts anti-runs.
Sum of positive-indexed terms of row n of A106356.
Row sums of A131044.
The (1,1,1) matching case is A335464.
Strict compositions are A032020.
Compositions with adjacent parts coprime are A167606.
Compositions with equal parts contiguous are A274174.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 0, add(
          `if`(i=j, ceil(2^(n-j-1)), b(n-j, j)), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..40);
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],MatchQ[#,{_,x_,x_,_}]&]],{n,0,10}] (* Gus Wiseman, Jul 06 2020 *)
    b[n_, i_] := b[n, i] = If[n == 0, 0, Sum[If[i == j, Ceiling[2^(n-j-1)], b[n-j, j]], {j, 1, n}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 20 2023, after Alois P. Heinz's Maple code *)

Formula

a(n) ~ 2^(n-1). - Vaclav Kotesovec, Sep 08 2015
a(n) = A011782(n) - A003242(n). - Emeric Deutsch, Jul 03 2020

A342098 Number of (necessarily strict) integer partitions of n with all adjacent parts having quotients > 2.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 23, 25, 26, 28, 31, 33, 35, 38, 40, 42, 45, 48, 51, 55, 58, 61, 65, 68, 72, 77, 81, 85, 90, 94, 98, 104, 109, 114, 121, 127, 132, 139, 146
Offset: 1

Views

Author

Gus Wiseman, Mar 04 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise less than its negated first-differences.

Examples

			The a(1) = 1 through a(16) = 8 partitions (A..G = 10..16):
  1  2  3  4   5   6   7   8   9   A   B    C    D    E    F    G
           31  41  51  52  62  72  73  83   93   94   A4   B4   B5
                       61  71  81  82  92   A2   A3   B3   C3   C4
                                   91  A1   B1   B2   C2   D2   D3
                                       731  831  C1   D1   E1   E2
                                                 931  941  A41  F1
                                                      A31  B31  B41
                                                                C31
		

Crossrefs

The version allowing equality is A000929.
The case of equality (all adjacent parts having quotient 2) is A154402.
The multiplicative version is A342083.
The version with all quotients <= 2 is A342094 (strict: A342095).
The version with all quotients < 2 is A342096 (strict: A342097).
A000009 counts strict partitions.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Thread[Differences[-#]>Rest[#]]&]],{n,30}]

A342094 Number of integer partitions of n with no adjacent parts having quotient > 2.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 13, 16, 21, 27, 37, 44, 59, 75, 94, 117, 153, 186, 238, 296, 369, 458, 573, 701, 870, 1068, 1312, 1601, 1964, 2384, 2907, 3523, 4270, 5159, 6235, 7491, 9021, 10819, 12964, 15494, 18517, 22049, 26260, 31195, 37020, 43851, 51906, 61290
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise greater than or equal to its negated first-differences.

Examples

			The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (211)   (221)    (42)      (322)      (53)
                    (1111)  (2111)   (222)     (421)      (332)
                            (11111)  (321)     (2221)     (422)
                                     (2211)    (3211)     (2222)
                                     (21111)   (22111)    (3221)
                                     (111111)  (211111)   (4211)
                                               (1111111)  (22211)
                                                          (32111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The version with no adjacent parts having quotient < 2 is A000929.
The case of equality (all adjacent parts having quotient 2) is A154402.
A strong multiplicative version is A342083 or A342084.
The multiplicative version is A342085, with reciprocal version A337135.
The strict case is A342095.
The version with all adjacent parts having quotient < 2 is A342096, with strict case A342097.
The version with all adjacent parts having quotient > 2 is A342098.
The Heinz numbers of these partitions are listed by A342191.
A000009 counts strict partitions.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.
A038548 counts inferior (or superior) divisors, listed by A161906.
A161908 lists superior prime divisors.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Thread[Differences[-#]<=Rest[#]]&]],{n,30}]

A342096 Number of integer partitions of n with no adjacent parts having quotient >= 2.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 6, 6, 8, 9, 11, 13, 17, 19, 24, 29, 35, 42, 51, 61, 75, 90, 108, 130, 158, 189, 227, 272, 325, 389, 464, 553, 659, 782, 929, 1102, 1306, 1545, 1824, 2153, 2538, 2989, 3514, 4127, 4842, 5673, 6642, 7766, 9068, 10583, 12335, 14361, 16705
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise greater than its negated first-differences.

Examples

			The a(1) = 1 through a(10) = 8 partitions:
  1  2   3    4     5      6       7        8         9          A
     11  111  22    32     33      43       44        54         55
              1111  11111  222     322      53        333        64
                           111111  1111111  332       432        433
                                            2222      3222       532
                                            11111111  111111111  3322
                                                                 22222
                                                                 1111111111
		

Crossrefs

The case of equality (all adjacent parts having quotient 2) is A154402.
The multiplicative version is A342083 or A342084.
The version allowing quotients of 2 exactly is A342094.
The strict case allowing quotients of 2 exactly is A342095.
The strict case is A342097.
The reciprocal version is A342098.
A000009 counts strict partitions.
A000929 counts partitions with no adjacent parts having quotient < 2.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Thread[Differences[-#]
    				

A342097 Number of strict integer partitions of n with no adjacent parts having quotient >= 2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 3, 3, 3, 3, 4, 6, 6, 7, 8, 8, 9, 11, 13, 15, 18, 20, 24, 25, 29, 32, 39, 42, 48, 54, 63, 72, 81, 89, 102, 116, 132, 147, 165, 187, 210, 238, 264, 296, 329, 371, 414, 465, 516, 580, 644, 722, 803, 897, 994, 1108, 1229, 1367, 1512, 1678
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise greater than its negated first-differences.

Examples

			The a(1) = 1 through a(16) = 7 partitions (A..G = 10..16):
  1  2  3  4  5   6  7   8   9    A    B   C    D    E     F     G
              32     43  53  54   64   65  75   76   86    87    97
                             432  532  74  543  85   95    96    A6
                                                643  653   654   754
                                                     743   753   853
                                                     5432  6432  6532
                                                                 7432
		

Crossrefs

The case of equality (all adjacent parts having quotient 2) is A154402.
The multiplicative version is A342083 or A342084.
The non-strict version allowing quotients of 2 exactly is A342094.
The version allowing quotients of 2 exactly is A342095.
The non-strict version is A342096.
The reciprocal version is A342098.
A000009 counts strict partitions.
A000929 counts partitions with no adjacent parts having quotient < 2.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&And@@Thread[Differences[-#]
    				

A342095 Number of strict integer partitions of n with no adjacent parts having quotient > 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 3, 2, 4, 4, 6, 7, 6, 8, 10, 9, 13, 16, 17, 20, 25, 26, 29, 36, 40, 45, 55, 61, 69, 81, 90, 103, 119, 132, 154, 176, 196, 225, 254, 282, 323, 364, 403, 458, 519, 582, 655, 735, 822, 922, 1035, 1153, 1290, 1441, 1600, 1788, 1997, 2217, 2468
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise greater than or equal to its negated first-differences.

Examples

			The a(1) = 1 through a(15) = 10 partitions (A..F = 10..15):
  1  2  3   4  5   6    7    8   9    A     B     C     D     E     F
        21     32  42   43   53  54   64    65    75    76    86    87
                   321  421      63   532   74    84    85    95    96
                                 432  4321  542   543   643   653   A5
                                            632   642   742   743   654
                                            5321  5421  6421  842   753
                                                  6321        5432  843
                                                              7421  6432
                                                                    8421
                                                                    54321
		

Crossrefs

The reciprocal version (no adjacent parts having quotient < 2) is A000929.
The case of equality (all adjacent parts having quotient 2) is A154402.
The multiplicative version is A342085 or A337135.
The non-strict version is A342094.
The non-strict version without quotients of 2 exactly is A342096.
The version without quotients of 2 exactly is A342097.
A000009 counts strict partitions.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&And@@Thread[Differences[-#]<=Rest[#]]&]],{n,30}]

A069916 Number of log-concave compositions (ordered partitions) of n.

Original entry on oeis.org

1, 1, 2, 4, 6, 9, 14, 20, 26, 36, 47, 60, 80, 102, 127, 159, 194, 236, 291, 355, 425, 514, 611, 718, 856, 1009, 1182, 1381, 1605, 1861, 2156, 2496, 2873, 3299, 3778, 4301, 4902, 5574, 6325, 7176, 8116, 9152, 10317, 11610, 13028, 14611, 16354, 18259, 20365
Offset: 0

Views

Author

Pontus von Brömssen, Apr 24 2002

Keywords

Comments

These are compositions with weakly decreasing first quotients, where the first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3). - Gus Wiseman, Mar 16 2021

Examples

			Out of the 8 compositions of 4, only 2+1+1 and 1+1+2 are not log-concave, so a(4)=6.
From _Gus Wiseman_, Mar 15 2021: (Start)
The a(1) = 1 through a(6) = 14 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (13)    (14)     (15)
             (21)   (22)    (23)     (24)
             (111)  (31)    (32)     (33)
                    (121)   (41)     (42)
                    (1111)  (122)    (51)
                            (131)    (123)
                            (221)    (132)
                            (11111)  (141)
                                     (222)
                                     (231)
                                     (321)
                                     (1221)
                                     (111111)
(End)
		

Crossrefs

The version for differences instead of quotients is A070211.
A000005 counts constant compositions.
A000009 counts strictly increasing (or strictly decreasing) compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A001055 counts factorizations.
A002843 counts compositions with adjacent parts x <= 2y.
A003238 counts chains of divisors summing to n-1, with strict case A122651.
A003242 counts anti-run compositions.
A074206 counts ordered factorizations.
A167865 counts strict chains of divisors summing to n.

Programs

  • Mathematica
    (* This program is not suitable for computing a large number of terms *)
    compos[n_] := Permutations /@ IntegerPartitions[n] // Flatten[#, 1]&;
    logConcaveQ[p_] := And @@ Table[p[[i]]^2 >= p[[i-1]]*p[[i+1]], {i, 2, Length[p]-1}]; a[n_] := Count[compos[n], p_?logConcaveQ]; Table[an = a[n]; Print["a(", n, ") = ", an]; a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 29 2016 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],GreaterEqual@@Divide@@@Reverse/@Partition[#,2,1]&]],{n,0,15}] (* Gus Wiseman, Mar 15 2021 *)
  • Sage
    def A069916(n) : return sum(all(p[i]^2 >= p[i-1] * p[i+1] for i in range(1, len(p)-1)) for p in Compositions(n)) # Eric M. Schmidt, Sep 29 2013
Showing 1-10 of 59 results. Next