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

A079559 Number of partitions of n into distinct parts of the form 2^j-1, j=1,2,....

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1
Offset: 0

Views

Author

Vladeta Jovovic, Jan 25 2003

Keywords

Comments

Differences of the Meta-Fibonacci sequence for s=0. - Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca)
Fixed point of morphism 0-->0, 1-->110 - Joerg Arndt, Jun 07 2007
A006697(k) gives number of distinct subwords of length k, conjectured to be equal to A094913(k)+1. - M. F. Hasler, Dec 19 2007
Characteristic function for the range of A005187: a(A055938(n))=0; a(A005187(n))=1; if a(m)=1 then either a(m-1)=1 or a(m+1)=1. - Reinhard Zumkeller, Mar 18 2009
The number of zeros between successive pairs of ones in this sequence is A007814. - Franklin T. Adams-Watters, Oct 05 2011
Length of n-th run = abs(A088705) + 1. - Reinhard Zumkeller, Dec 11 2011

Examples

			a(11)=1 because we have [7,3,1].
G.f. = 1 + x + x^3 + x^4 + x^7 + x^8 + x^10 + x^11 + x^15 + x^16 + x^18 + ...
From _Omar E. Pol_, Nov 30 2009: (Start)
The sequence, displayed as irregular triangle, in which rows length are powers of 2, begins:
1;
1,0;
1,1,0,0;
1,1,0,1,1,0,0,0;
1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0;
1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,0;
1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,0,0;
(End)
		

Crossrefs

Programs

  • Haskell
    a079559 = p $ tail a000225_list where
       p _      0 = 1
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
    -- Reinhard Zumkeller, Dec 11 2011
    
  • Haskell
    a079559_list = 1 : f [1] where
       f xs = ys ++ f ys where ys = init xs ++ [1] ++ tail xs ++ [0]
    -- Reinhard Zumkeller, May 05 2015
    
  • Maple
    g:=product(1+x^(2^n-1),n=1..15): gser:=series(g,x=0,110): seq(coeff(gser,x,n),n=0..104); # Emeric Deutsch, Apr 06 2006
    d := n -> if n=1 then 1 else A046699(n)-A046699(n-1) fi; # Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca)
  • Mathematica
    row[1] = {1}; row[2] = {1, 0}; row[n_] := row[n] = row[n-1] /. 1 -> Sequence[1, 1, 0]; Table[row[n], {n, 1, 7}] // Flatten (* Jean-François Alcover, Jul 30 2012, after Omar E. Pol *)
    CoefficientList[ Series[ Product[1 + x^(2^n - 1), {n, 6}], {x, 0, 104}], x] (* or *)
    Nest[ Flatten[# /. {0 -> {0}, 1 -> {1, 1, 0}}] &, {1}, 6] (* Robert G. Wilson v, Sep 08 2014 *)
  • PARI
    w="1,";for(i=1,5,print1(w=concat([w,w,"0,"])))
    
  • PARI
    A079559(n,w=[1])=until(n<#w=concat([w,w,[0]]),);w[n+1] \\ M. F. Hasler, Dec 19 2007
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=1, #binary(n+1), 1 + x^(2^k-1), 1 + x * O(x^n)), n))} /* Michael Somos, Aug 03 2009 */
    
  • Python
    def a053644(n): return 0 if n==0 else 2**(len(bin(n)[2:]) - 1)
    def a043545(n):
        x=bin(n)[2:]
        return int(max(x)) - int(min(x))
    l=[1]
    for n in range(1, 101): l+=[a043545(n + 1)*l[n + 1 - a053644(n + 1)], ]
    print(l) # Indranil Ghosh, Jun 11 2017

Formula

G.f.: Product_{n>=1} (1 + x^(2^n-1)).
a(n) = 1 if n=0, otherwise A043545(n+1)*a(n+1-A053644(n+1)). - Reinhard Zumkeller, Aug 19 2006
a(n) = p(n,1) with p(n,k) = p(n-k,2*k+1) + p(n,2*k+1) if k <= n, otherwise 0^n. - Reinhard Zumkeller, Mar 18 2009
Euler transform is sequence A111113 sequence offset -1. - Michael Somos, Aug 03 2009
G.f.: Product_{k>0} (1 - x^k)^-A111113(k+1). - Michael Somos, Aug 03 2009
a(n) = A108918(n+1) mod 2. - Joerg Arndt, Apr 06 2011
a(n) = A000035(A153000(n)), n >= 1. - Omar E. Pol, Nov 29 2009, Aug 06 2013

Extensions

Edited by M. F. Hasler, Jan 03 2008

A154402 Inverse Moebius transform of Fredholm-Rueppel sequence, cf. A036987.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 2, 1, 3, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 3, 1, 2, 4, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 2, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 3, 2, 1, 3, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 4
Offset: 1

Views

Author

Vladeta Jovovic, Jan 08 2009

Keywords

Comments

Number of ways to write n as a sum a_1 + ... + a_k where the a_i are positive integers and a_i = 2 * a_{i-1}, cf. A000929.
Number of divisors of n of the form 2^k - 1 (A000225) for k >= 1. - Jeffrey Shallit, Jan 23 2017

Crossrefs

Cf. also A305436.

Programs

  • Maple
    N:= 200: # to get a(1)..a(N)
    A:= Vector(N):
    for k from 1 do
       t:= 2^k-1;
       if t > N then break fi;
       R:= [seq(i,i=t..N,t)];
       A[R]:= map(`+`,A[R],1)
    od:
    convert(A,list); # Robert Israel, Jan 23 2017
  • Mathematica
    Table[DivisorSum[n, 1 &, IntegerQ@ Log2[# + 1] &], {n, 105}] (* Michael De Vlieger, Jun 11 2018 *)
  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A036987(n) = A209229(1+n);
    A154402(n) = sumdiv(n,d,A036987(d)); \\ Antti Karttunen, Jun 11 2018
    
  • PARI
    A154402(n) = { my(m=1,s=0); while(m<=n, s += !(n%m); m += (m+1)); (s); }; \\ Antti Karttunen, May 12 2022

Formula

G.f.: Sum_{k>0} x^(2^k-1)/(1-x^(2^k-1)).
From Antti Karttunen, Jun 11 2018: (Start)
a(n) = Sum_{d|n} A036987(d).
a(n) = A305426(n) + A036987(n). (End)
a(n) = A147645(n) + A353786(n). - Antti Karttunen, May 12 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A065442 = 1.606695... . - Amiram Eldar, Dec 31 2023

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[-#]
    				

A001752 Expansion of 1/((1+x)*(1-x)^5).

Original entry on oeis.org

1, 4, 11, 24, 46, 80, 130, 200, 295, 420, 581, 784, 1036, 1344, 1716, 2160, 2685, 3300, 4015, 4840, 5786, 6864, 8086, 9464, 11011, 12740, 14665, 16800, 19160, 21760, 24616, 27744, 31161, 34884, 38931, 43320, 48070, 53200, 58730, 64680, 71071, 77924, 85261
Offset: 0

Views

Author

Keywords

Comments

Define a unit column of a binary matrix to be a column with only one 1. a(n) = number of 3 X n binary matrices with 1 unit column up to row and column permutations (if offset is 1). - Vladeta Jovovic, Sep 09 2000
Generally, number of 3 X n binary matrices with k=0,1,2,... unit columns, up to row and column permutations, is the coefficient of x^k in 1/6*(Z(S_n; 5 + 3*x,5 + 3*x^2, ...) + 3*Z(S_n; 3 + x,5 + 3*x^2,3 + x^3,5 + 3*x^4, ...) + 2*Z(S_n; 2,2,5 + 3*x^3,2,2,5 + 3*x^6, ...)), where Z(S_n; x_1,x_2,...,x_n) is the cycle index of symmetric group S_n of degree n.
First differences of a(n) give number of minimal 3-covers of an unlabeled n-set that cover 4 points of that set uniquely (if offset is 4).
Transform of tetrahedral numbers, binomial(n+3,3), under the Riordan array (1/(1-x^2), x). - Paul Barry, Apr 16 2005
Equals triangle A152205 as an infinite lower triangular matrix * [1, 2, 3, ...]. - Gary W. Adamson, Feb 14 2010
With a leading zero, number of all possible octahedra of any size, formed when intersecting a regular tetrahedron by planes parallel to its sides and dividing its edges into n equal parts. - V.J. Pohjola, Sep 13 2012
With 2 leading zeros and offset 1, the sequence becomes 0,0,1,4,11,... for n=1,2,3,... Call this b(n). Consider the partitions of n into two parts (p,q) with p <= q. Then b(n) is the total volume of the family of rectangular prisms with dimensions p, |q - p| and |q - p|. - Wesley Ivan Hurt, Apr 14 2018
Conjecture: For n > 2, a(n-3) is the absolute value of the coefficient of the term [x^(n-2)] in the characteristic polynomial of an n X n square matrix M(n) defined as the n-th principal submatrix of the array A010751 whose general element is given by M[i,j] = floor((j - i + 1)/2). - Stefano Spezia, Jan 12 2022
Consider the following drawing of the complete graph on n vertices K_n: Vertices 1, 2, ..., n are on a straight line. Any pair of nonconsecutive vertices (i, j) with i < j is connected by a semicircle that goes above the line if i is odd, and below if i is even. With four leading zeros and offset 1, a(n) gives the number of edge crossings of the aforementioned drawing of K_n. - Carlo Francisco E. Adajar, Mar 17 2022

Examples

			There are 4 binary 3 X 2 matrices with 1 unit column up to row and column permutations:
  [0 0] [0 0] [0 1] [0 1]
  [0 0] [0 1] [0 1] [0 1]
  [0 1] [1 1] [1 0] [1 1].
For n=5, the numbers of the octahedra, starting from the smallest size, are Te(5)=35, Te(3)=10, and Te(1)=1, the sum being 46. Te denotes the tetrahedral number A000292. - _V.J. Pohjola_, Sep 13 2012
		

References

  • T. A. Saaty, The Minimum Number of Intersections in Complete Graphs, Proc. Natl. Acad. Sci. USA., 52 (1964), 688-690.

Crossrefs

Cf. A001753 (partial sums), A002623 (first differences), A158454 (signed column k=2), A169792 (binomial transform).

Programs

  • Magma
    [Floor(((n+3)^2-1)*((n+3)^2-3)/48): n in [0..40]]; // Vincenzo Librandi, Aug 15 2011
  • Maple
    A001752:=n->(3*(-1)^n+93+168*n+100*n^2+24*n^3+2*n^4)/96:
    seq(A001752(n), n=0..50); # Wesley Ivan Hurt, Apr 01 2015
  • Mathematica
    a = {1, 4}; Do[AppendTo[a, a[[n - 2]] + (n*(n + 1)*(n + 2))/6], {n, 3, 10}]; a
    (* Number of octahedra *) nnn = 100; Teo[n_] := (n - 1) n (n + 1)/6
    Table[Sum[Teo[n - nn], {nn, 0, n - 1, 2}], {n, 1, nnn}]
    (* V.J. Pohjola, Sep 13 2012 *)
    LinearRecurrence[{4,-5,0,5,-4,1},{1,4,11,24,46,80},50] (* Harvey P. Dale, Feb 07 2019 *)
  • PARI
    a(n)=if(n<0,0,((n+3)^2-1)*((n+3)^2-3)/48-if(n%2,1/16))
    
  • PARI
    a(n)=(n^4+12*n^3+50*n^2+84*n+46)\/48 \\ Charles R Greathouse IV, Sep 13 2012
    

Formula

a(n) = floor(((n+3)^2 - 1)*((n+3)^2 - 3)/48).
G.f.: 1/((1+x)*(1-x)^5).
a(n) - 2*a(n-1) + a(n-2) = A002620(n+2).
a(n) + a(n-1) = A000332(n+4).
a(n) - a(n-2) = A000292(n+1).
a(n) = Sum_{k=0..n} (-1)^(n-k)*C(k+4, 4). - Paul Barry, Jul 01 2003
a(n) = (3*(-1)^n + 93 + 168*n + 100*n^2 + 24*n^3 + 2*n^4)/96. - Cecilia Rossiter (cecilia(AT)noticingnumbers.net), Dec 14 2004
From Paul Barry, Apr 16 2005: (Start)
a(n) = Sum_{k=0..floor(n/2)} binomial(n-2k+3, 3).
a(n) = Sum_{k=0..n} binomial(k+3, 3)*(1-(-1)^(n+k-1))/2. (End)
a(n) = A108561(n+5,n) for n > 0. - Reinhard Zumkeller, Jun 10 2005
From Wesley Ivan Hurt, Apr 01 2015: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 5*(n-4) - 4*a(n-5) + a(n-6).
a(n) = Sum_{i=0..n+3} (n+3-i) * floor(i^2/2)/2. (End)
Boas-Buck recurrence: a(n) = (1/n)*Sum_{p=0..n-1} (5 + (-1)^(n-p))*a(p), n >= 1, a(0) = 1. See the Boas-Buck comment in A158454 (here for the unsigned column k = 2 with offset 0). - Wolfdieter Lang, Aug 10 2017
Convolution of A000217 and A004526. - R. J. Mathar, Mar 29 2018
E.g.f.: ((48 + 147*x + 93*x^2 + 18*x^3 + x^4)*cosh(x) + (45 + 147*x + 93*x^2 + 18*x^3 + x^4)*sinh(x))/48. - Stefano Spezia, Jan 12 2022

Extensions

Formulae corrected by Bruno Berselli, Sep 13 2012

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}]

A045690 Number of binary words of length n (beginning with 0) whose autocorrelation function is the indicator of a singleton.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 37, 74, 142, 284, 558, 1116, 2212, 4424, 8811, 17622, 35170, 70340, 140538, 281076, 561868, 1123736, 2246914, 4493828, 8986540, 17973080, 35943948, 71887896, 143771368, 287542736, 575076661, 1150153322, 2300289022, 4600578044, 9201120918
Offset: 1

Views

Author

Torsten.Sillke(AT)uni-bielefeld.de

Keywords

Comments

The number of binary strings sharing the same autocorrelations.
Appears to be row sums of A155092, beginning from a(2). - Mats Granvik, Jan 20 2009
The number of binary words of length n (beginning with 0) which do not start with an even palindrome (i.e. which are not of the form ss*t where s is a (nonempty) word, s* is its reverse, and t is any (possibly empty) word). - Mamuka Jibladze, Sep 30 2014
From Gus Wiseman, Mar 08 2021: (Start)
This sequence counts each of the following essentially equivalent things:
1. Sets of distinct positive integers with maximum n in which all adjacent elements have quotients > 1/2. For example, the a(1) = 1 through a(6) = 10 sets are:
{1} {2} {3} {4} {5} {6}
{2,3} {3,4} {3,5} {4,6}
{2,3,4} {4,5} {5,6}
{2,3,5} {3,4,6}
{3,4,5} {3,5,6}
{2,3,4,5} {4,5,6}
{2,3,4,6}
{2,3,5,6}
{3,4,5,6}
{2,3,4,5,6}
2. For n > 1, sets of distinct positive integers with maximum n - 1 whose first-differences are term-wise less than their decapitation (remove the maximum). For example, the set q = {2,4,5} has first-differences (2,1), which are not less than (2,4), so q is not counted under a(5). On the other hand, r = {2,3,5,6} has first-differences {1,2,1}, which are less than {2,3,5}, so r is counted under a(6).
3. Compositions of n where each part after the first is less than the sum of all preceding parts. For example, the a(1) = 1 through a(6) = 10 compositions are:
(1) (2) (3) (4) (5) (6)
(21) (31) (41) (51)
(211) (32) (42)
(311) (411)
(212) (321)
(2111) (312)
(3111)
(2121)
(2112)
(21111)
(End)

Crossrefs

Cf. A002083, A005434. A003000 = 2*a(n) for n > 0.
Different from, but easily confused with, A007148 and A093371.
The version with quotients <= 1/2 is A018819.
The version with quotients < 1/2 is A040039.
Multiplicative versions are A337135, A342083, A342084, A342085.
A000045 counts sets containing n with all differences > 2.
A000929 counts partitions with no adjacent parts having quotient < 2.
A342094 counts partitions with no adjacent parts having quotient > 2.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1/2,
           2*a(n-1)-`if`(n::odd, 0, a(n/2)))
        end:
    seq(a(n), n=1..40);  # Alois P. Heinz, Jun 24 2021
  • Mathematica
    a[1] = 1; a[n_] := a[n] = If[EvenQ[n], 2*a[n-1] - a[n/2], 2*a[n-1]]; Array[a, 40] (* Jean-François Alcover, Jul 17 2015 *)
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Min@@Divide@@@Partition[#,2,1]>1/2&]],{n,8}] (* Gus Wiseman, Mar 08 2021 *)
  • PARI
    a(n)=if(n<2,n>0,2*a(n-1)-(1-n%2)*a(n\2))

Formula

a(2n) = 2*a(2n-1) - a(n) for n >= 1; a(2n+1) = 2*a(2n) for n >= 1.
a(n) = A342085(2^n). - Gus Wiseman, Mar 08 2021

Extensions

More terms from James Sellers.
Additional comments from Michael Somos, Jun 09 2000

A040039 First differences of A033485; also A033485 with terms repeated.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 5, 7, 7, 10, 10, 13, 13, 18, 18, 23, 23, 30, 30, 37, 37, 47, 47, 57, 57, 70, 70, 83, 83, 101, 101, 119, 119, 142, 142, 165, 165, 195, 195, 225, 225, 262, 262, 299, 299, 346, 346, 393, 393, 450, 450, 507, 507, 577, 577, 647, 647, 730, 730, 813, 813, 914, 914, 1015, 1015, 1134, 1134, 1253, 1253, 1395, 1395
Offset: 0

Views

Author

Keywords

Comments

Apparently a(n) = number of partitions (p_1, p_2, ..., p_k) of n+1, with p_1 >= p_2 >= ... >= p_k, such that for each i, p_i > p_{i+1}+...+p_k. - John McKay (mac(AT)mathstat.concordia.ca), Mar 06 2009
Comment from John McKay confirmed in paper by Bessenrodt, Olsson, and Sellers. Such partitions are called "strongly decreasing" partitions in the paper, see the function s(n) therein.
Also the number of unlabeled binary rooted trees with 2*n + 3 nodes in which the two branches directly under any given non-leaf node are either equal or at least one of them is a leaf. - Gus Wiseman, Oct 08 2018
From Gus Wiseman, Apr 06 2021: (Start)
This sequence counts both of the following essentially equivalent things:
1. Sets of distinct positive integers with maximum n + 1 in which all adjacent elements have quotients < 1/2. For example, the a(0) = 1 through a(8) = 7 subsets are:
{1} {2} {3} {4} {5} {6} {7} {8} {9}
{1,3} {1,4} {1,5} {1,6} {1,7} {1,8} {1,9}
{2,5} {2,6} {2,7} {2,8} {2,9}
{3,7} {3,8} {3,9}
{1,3,7} {1,3,8} {4,9}
{1,3,9}
{1,4,9}
2. Sets of distinct positive integers with maximum n + 1 whose first differences are term-wise greater than their decapitation (remove the maximum). For example, the set q = {1,4,9} has first differences (3,5), which are greater than (1,4), so q is counted under a(8). On the other hand, r = {1,5,9} has first differences (4,4), which are not greater than (1,5), so r is not counted under a(8).
Also the number of partitions of n + 1 into powers of 2 covering an initial interval of powers of 2. For example, the a(0) = 1 through a(8) = 7 partitions are:
1 11 21 211 221 2211 421 4211 4221
111 1111 2111 21111 2221 22211 22221
11111 111111 22111 221111 42111
211111 2111111 222111
1111111 11111111 2211111
21111111
111111111
(End)

Examples

			From _Joerg Arndt_, Dec 17 2012: (Start)
The a(19-1)=30 strongly decreasing partitions of 19 are (in lexicographic order)
[ 1]    [ 10 5 3 1 ]
[ 2]    [ 10 5 4 ]
[ 3]    [ 10 6 2 1 ]
[ 4]    [ 10 6 3 ]
[ 5]    [ 10 7 2 ]
[ 6]    [ 10 8 1 ]
[ 7]    [ 10 9 ]
[ 8]    [ 11 5 2 1 ]
[ 9]    [ 11 5 3 ]
[10]    [ 11 6 2 ]
[11]    [ 11 7 1 ]
[12]    [ 11 8 ]
[13]    [ 12 4 2 1 ]
[14]    [ 12 4 3 ]
[15]    [ 12 5 2 ]
[16]    [ 12 6 1 ]
[17]    [ 12 7 ]
[18]    [ 13 4 2 ]
[19]    [ 13 5 1 ]
[20]    [ 13 6 ]
[21]    [ 14 3 2 ]
[22]    [ 14 4 1 ]
[23]    [ 14 5 ]
[24]    [ 15 3 1 ]
[25]    [ 15 4 ]
[26]    [ 16 2 1 ]
[27]    [ 16 3 ]
[28]    [ 17 2 ]
[29]    [ 18 1 ]
[30]    [ 19 ]
The a(20-1)=30 strongly decreasing partitions of 20 are obtained by adding 1 to the first part in each partition in the list.
(End)
From _Gus Wiseman_, Oct 08 2018: (Start)
The a(-1) = 1 through a(4) = 3 semichiral binary rooted trees:
  o  (oo)  (o(oo))  ((oo)(oo))  (o((oo)(oo)))  ((o(oo))(o(oo)))
                    (o(o(oo)))  (o(o(o(oo))))  (o(o((oo)(oo))))
                                               (o(o(o(o(oo)))))
(End)
		

Crossrefs

Cf. A000123.
The equal case is A001511.
The reflected version is A045690.
The unequal (anti-run) version is A045691.
A000929 counts partitions with all adjacent parts x >= 2y.
A002843 counts compositions with all adjacent parts x <= 2y.
A018819 counts partitions into powers of 2.
A154402 counts partitions with all adjacent parts x = 2y.
A274199 counts compositions with all adjacent parts x < 2y.
A342094 counts partitions with all adjacent parts x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342098 counts partitions with all adjacent parts x > 2y.
A342337 counts partitions with all adjacent parts x = y or x = 2y.

Programs

  • Maple
    # For example, the five partitions of 4, written in nonincreasing order, are
    # [1,1,1,1], [2,1,1], [2,2], [3,1], [4].
    # Only the last two satisfy the condition, and a(3)=2.
    # The Maple program below verifies this for small values of n.
    with(combinat); N:=8; a:=array(1..N); c:=array(1..N);
    for n from 1 to N do p:=partition(n); np:=nops(p); t:=0;
    for s to np do r:=p[s]; r:=sort(r,`>`); nr:=nops(r); j:=1;
    while jsum(r[k],k=j+1..nr) do j:=j+1;od; # gives A040039
    #while j= sum(r[k],k=j+1..nr) do j:=j+1;od; # gives A018819
    if j=nr then t:=t+1;fi od; a[n]:=t; od;
    # John McKay
  • Mathematica
    T[n_, m_] := T[n, m] = Sum[Binomial[n-2k-1, n-2k-m] Sum[Binomial[m, i] T[k, i], {i, 1, k}], {k, 0, (n-m)/2}] + Binomial[n-1, n-m];
    a[n_] := T[n+1, 1];
    Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jul 27 2018, after Vladimir Kruchinin *)
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&And@@Table[#[[i-1]]/#[[i]]<1/2,{i,2,Length[#]}]&]],{n,15}] (* Gus Wiseman, Apr 06 2021 *)
  • Maxima
    T(n,m):=sum(binomial(n-2*k-1,n-2*k-m)*sum(binomial(m,i)*T(k,i),i,1,k),k,0,(n-m)/2)+binomial(n-1,n-m);
    makelist(T(n+1,1),n,0,40); /* Vladimir Kruchinin, Mar 19 2015 */
    
  • PARI
    /* compute as "A033485 with terms repeated" */
    b(n) = if(n<2, 1, b(floor(n/2))+b(n-1));  /* A033485 */
    a(n) = b(n\2+1); /* note different offsets */
    for(n=0,99, print1(a(n),", ")); /* Joerg Arndt, Jan 21 2011 */
    
  • Python
    from itertools import islice
    from collections import deque
    def A040039_gen(): # generator of terms
        aqueue, f, b, a = deque([2]), True, 1, 2
        yield from (1, 1, 2, 2)
        while True:
            a += b
            yield from (a, a)
            aqueue.append(a)
            if f: b = aqueue.popleft()
            f = not f
    A040039_list = list(islice(A040039_gen(),40)) # Chai Wah Wu, Jun 07 2022

Formula

Let T(x) be the g.f, then T(x) = 1 + x/(1-x)*T(x^2) = 1 + x/(1-x) * ( 1 + x^2/(1-x^2) * ( 1 + x^4/(1-x^4) * ( 1 + x^8/(1-x^8) *(...) ))). [Joerg Arndt, May 11 2010]
From Joerg Arndt, Oct 02 2013: (Start)
G.f.: sum(k>=1, x^(2^k-1) / prod(j=0..k-1, 1-x^(2^k) ) ) [Bessenrodt/Olsson/Sellers].
G.f.: 1/(2*x^2) * ( 1/prod(k>=0, 1 - x^(2^k) ) - (1 + x) ).
a(n) = 1/2 * A018819(n+2).
(End)
a(n) = T(n+1,1), where T(n,m)=sum(k..0,(n-m)/2, binomial(n-2*k-1,n-2*k-m)*sum(i=1..k, binomial(m,i)*T(k,i)))+binomial(n-1,n-m). - Vladimir Kruchinin, Mar 19 2015
Using offset 1: a(1) = 1; a(n even) = a(n-1); a(n odd) = a(n-1) + a((n-1)/2). - Gus Wiseman, Oct 08 2018
Showing 1-10 of 54 results. Next