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

A227753 Numbers which do not occur in A226062; numbers which encode Garden of Eden partitions in Bulgarian Solitaire in runlengths of their binary representation.

Original entry on oeis.org

5, 10, 18, 20, 21, 22, 26, 37, 41, 42, 43, 45, 53, 69, 73, 74, 75, 77, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 93, 101, 105, 106, 107, 109, 117, 138, 146, 148, 149, 150, 154, 162, 164, 165, 166, 168, 169, 170, 171, 172, 173, 174, 178, 180, 181, 182, 186, 202
Offset: 1

Views

Author

Antti Karttunen, Jul 26 2013

Keywords

Comments

Positions of zeros in A227752.
A225794 gives the sizes of the corresponding partitions.

Crossrefs

After its first two initial terms, all the terms of A227451 can be found in this sequence.

A227752 a(n) is the number of occurrences of n in A226062.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 0, 1, 2, 1, 2, 1, 1, 1, 0, 2, 0, 0, 0, 1, 2, 2, 0, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 0, 0, 0, 1, 0, 1, 1, 2, 2, 1, 3, 1, 0, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 0, 1, 2, 2, 0, 0, 0, 2, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Jul 26 2013

Keywords

Crossrefs

A227753 gives the positions of zeros.

Formula

In the following formula [] stands for Iverson brackets. Essentially we are just naively counting the integers which A226062 maps to n. A000225 is the guaranteed upper limit for the runlength codes for the partitions of size n:
a(n) = Sum_{i=0..A000225(A227183(n))} [A226062(i)==n].
a(n) = Sum_{i=A227368(A227183(n))..A000225(A227183(n))} [A226062(i)==n]. [This is slightly faster if somebody invents a clever formula for the lower limit A227368.]

A227183 a(n) is the sum of parts of the unique unordered partition encoded in the run lengths of the binary expansion of n; row sums of A227739 for n >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 05 2013

Keywords

Comments

Like A129594 this sequence utilizes the fact that compositions (i.e., ordered partitions) can be bijectively mapped to (unordered) partitions by taking the partial sums of the list of composants after one has been subtracted from each except the first one. Compositions in turn are mapped to nonnegative integers via the runlength encoding, where the lengths of maximum runs of 0's or 1's in binary representation of n give the composants. See the OEIS Wiki page and the example below.
Each n occurs A000041(n) times in total and occurs for the first time at A227368(n) and for the last time at position A000225(n). See further comments and conjectures at A227368 and A227370.

Examples

			19 has binary expansion "10011", thus the maximal runs of identical bits (scanned from right to left) are [2,2,1]. We subtract one from each after the first one, to get [2,1,0] and then form their partial sums as [2,2+1,2+1+0], which thus maps to unordered partition {2+3+3} which adds to 8. Thus a(19)=8.
		

Crossrefs

Row sums of A227189 and A227739. Cf. A227184 (corresponding products), A227185, A227189, A227192, A129594, A226062, A227368.
Analogous sum sequences computed for other encoding schemes of unordered partitions: A036042, A056239, A161511, A243503. Cf. also A229119, A003188, A075157, A243353 (associated permutations mapping between these schemes).

Programs

  • Mathematica
    Table[Function[b, Total@ Accumulate@ Prepend[If[Length@ b > 1, Rest[b] - 1, {}], First@ b] - Boole[n == 0]]@ Map[Length, Split@ Reverse@ IntegerDigits[n, 2]], {n, 0, 79}] // Flatten (* Michael De Vlieger, May 09 2017 *)
  • Python
    def A227183(n):
      '''Sum of parts of the unique unordered partition encoded in the run lengths of the binary expansion of n.'''
      s = 0
      b = n%2
      i = 1
      while (n != 0):
        n >>= 1
        if ((n%2) == b): # Staying in the same run of bits?
          i += 1
        else: # The run changes.
          b = n%2
          s += i
      return(s)

Formula

a(n) = Sum_{i=0..A005811(n)-1} A227189(n,i). [The defining formula]
Equivalently, for n>=1, a(n) = Sum_{i=(A173318(n-1)+1)..A173318(n)} A227739(i).
a(n) = A227192(n) - A000217(A005811(n)-1).
Other identities:
a(A129594(n)) = a(n). [This follows from the fact that conjugating a partition doesn't change its total sum]
a(A226062(n)) = a(n). [Which is also true for the "Bulgarian operation"]
From Antti Karttunen, Mar 08 2015: (Start)
Can be also obtained by mapping with an appropriate permutation from the sequences giving sizes of each partition (i.e., sum of their parts) computed for other enumerations similar to A227739:
a(n) = A036042(A229119(n)).
a(n) = A161511(A003188(n)).
a(n) = A056239(A243353(n)).
a(n) = A243503(1+A075157(n)).
(End)

A129594 Involution of nonnegative integers induced by the conjugation of the partition encoded in the run lengths of binary expansion of n.

Original entry on oeis.org

0, 1, 3, 2, 4, 7, 6, 5, 11, 12, 15, 8, 9, 14, 13, 10, 20, 27, 28, 19, 16, 31, 24, 23, 22, 25, 30, 17, 18, 29, 26, 21, 43, 52, 59, 36, 35, 60, 51, 44, 47, 48, 63, 32, 39, 56, 55, 40, 41, 54, 57, 38, 33, 62, 49, 46, 45, 50, 61, 34, 37, 58, 53, 42, 84, 107, 116, 75, 68, 123
Offset: 0

Views

Author

Antti Karttunen, May 01 2007

Keywords

Comments

This sequence is based on the fact that compositions (i.e. ordered partitions) can be mapped 1-to-1 to partitions by taking the partial sums of the list where one is subtracted from each composant except the first. (See table A227189 where the parts for each partition are listed).
The inverse process, from partitions to compositions, occurs by inserting the first (i.e. smallest) element of a partition sorted into ascending order to the front of the list obtained by adding one to the first differences of the elements.
Compositions map bijectively to nonnegative integers by assigning each run of k consecutive 1's (or 0's) in binary expansion of n with summand k in the composition.
The graph of this sequence is quite interesting.

Examples

			a(8) = 11, as 8 is 1000 in binary, mapping to composition 3+1 (we scan the binary expansion from the least to the most significant end), which maps to partition 3+3, whose conjugate-partition is 2+2+2, yielding composition 2+1+1, which maps to binary 1011, 11 in decimal. a(13) = 14, as 13 is 1101 in binary, mapping to composition 1+1+2, which maps to the partition 1+1+2, whose conjugate-partition is 1+3, yielding composition 1+3, which maps to binary 1110, 14 in decimal. a(11) = 8 and a(14) = 13, as taking the conjugate of a partition is a self-inverse operation.
		

Crossrefs

a(n) = A075158(A122111(1+A075157(n)) - 1). See A129595 for another kind of encoding of integer partitions.
Sequences related to partitions encoded in this way:
Cf. A227189 (parts of partitions listed on separate rows of the array).
Cf. A005811 (number of parts in the partition).
Cf. A136480 (for n>= 1, the smallest part).
Cf. A227185 (the largest part).
Cf. A227183 (sum of parts).
Cf. A227184 (product of parts).
Note that this permutation maps between A005811 and A227185 as follows: A005811(n) = A227185(a(n)) and vice versa: A227185(n) = A005811(a(n)). On the other hand, it keeps A227183 fixed, as A227183(n) = A227183(a(n)).
Cf. also A226062.

A242424 Bulgarian solitaire operation on partition list A112798: a(1) = 1, a(n) = A000040(A001222(n)) * A064989(n).

Original entry on oeis.org

1, 2, 4, 3, 6, 6, 10, 5, 12, 9, 14, 10, 22, 15, 18, 7, 26, 20, 34, 15, 30, 21, 38, 14, 27, 33, 40, 25, 46, 30, 58, 11, 42, 39, 45, 28, 62, 51, 66, 21, 74, 50, 82, 35, 60, 57, 86, 22, 75, 45, 78, 55, 94, 56, 63, 35, 102, 69, 106, 42, 118, 87, 100, 13, 99, 70, 122, 65
Offset: 1

Views

Author

Antti Karttunen, May 13 2014

Keywords

Comments

In "Bulgarian solitaire" a deck of cards or another finite set of objects is divided into one or more piles, and the "Bulgarian operation" is performed by taking one card from each pile, and making a new pile of them, which is added to the remaining set of piles. Essentially, this operation is a function whose domain and range are unordered integer partitions (cf. A000041) and which preserves the total size of a partition (the sum of its parts). This sequence is induced when the operation is implemented on the partitions as ordered by the list A112798.
Please compare to the definition of A122111, which conjugates the partitions encoded with the same system.
a(n) is even if and only if n is either a prime or a multiple of three.
Conversely, a(n) is odd if and only if n is a nonprime not divisible by three.

References

  • Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.

Crossrefs

Row 1 of A243070 (table which gives successive "recursive iterates" of this sequence and converges towards A122111).
Fixed points: A002110 (primorial numbers).

Programs

Formula

a(1) = 1, a(n) = A000040(A001222(n)) * A064989(n) = A105560(n) * A064989(n).
a(n) = A241909(A243051(A241909(n))).
a(n) = A243353(A226062(A243354(n))).
a(A000079(n)) = A000040(n) for all n.
A056239(a(n)) = A056239(n) for all n.

A037481 Base 4 digits are, in order, the first n terms of the periodic sequence with initial period 1,2.

Original entry on oeis.org

0, 1, 6, 25, 102, 409, 1638, 6553, 26214, 104857, 419430, 1677721, 6710886, 26843545, 107374182, 429496729, 1717986918, 6871947673, 27487790694, 109951162777, 439804651110, 1759218604441, 7036874417766, 28147497671065
Offset: 0

Views

Author

Keywords

Comments

The terms have a particular pattern in their binary expansion, which encodes for a "triangular partition" when runlength encoding of unordered partitions are used (please see A129594 for how that encoding works).
n a(n) same in binary run lengths unordered partition
0 0 0 [] {}
1 1 1 [1] {1}
2 6 110 [2,1] {1+2}
3 25 11001 [2,2,1] {1+2+3}
4 102 1100110 [2,2,2,1] {1+2+3+4}
5 409 110011001 [2,2,2,2,1] {1+2+3+4+5}
6 1638 11001100110 [2,2,2,2,2,1] {1+2+3+4+5+6}
7 6553 1100110011001 [2,2,2,2,2,2,1] {1+2+3+4+5+6+7}
8 26214 110011001100110 [2,2,2,2,2,2,2,1] {1+2+3+4+5+6+7+8}
9 104857 11001100110011001 [2,2,2,2,2,2,2,2,1] {1+2+3+4+5+6+7+8+9}
These partitions are the only fixed points of "Bulgarian Solitaire" operation (see Gardner reference or Wikipedia page), and thus the terms of this sequence give the fixed points for A226062 which implements that operation (using the same encoding for partitions). This also implies that these partitions are the roots of the game trees constructed for decks consisting of 1+2+3+...+k cards. See A227451 for the encoding of the corresponding tops of the main trunks of the same trees. - Antti Karttunen, Jul 12 2013

References

  • Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.

Crossrefs

Cf. A037487 (decimal digits 1,2).
The right edge of the table A227452. The fixed points of A226062.

Programs

  • Magma
    I:=[0, 1, 6]; [n le 3 select I[n] else 4*Self(n-1)+Self(n-2)-4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 21 2012
    
  • Mathematica
    LinearRecurrence[{4,1,-4},{0,1,6},40] (* Vincenzo Librandi, Jun 21 2012 *)
    Module[{nn=30,ps},ps=PadRight[{},nn,{1,2}];Table[FromDigits[Take[ps,n],4],{n,0,nn}]] (* Harvey P. Dale, Jul 18 2013 *)
  • PARI
    concat(0, Vec(x*(2*x+1)/((x-1)*(x+1)*(4*x-1)) + O(x^100))) \\ Colin Barker, Apr 30 2014
    
  • PARI
    a(n) = 2<<(2*n) \ 5; \\ Kevin Ryde, Jun 24 2023
    
  • Python
    def A037481(n): return (1<<(n<<1|1))//5 # Chai Wah Wu, Jun 28 2023
  • Scheme
    (define (A037481 n) (/ (- (/ (+ (expt 4 (1+ n)) (expt -1 n)) 5) 1) 2)) ;; Using Ralf Stephan's direct formula - Antti Karttunen, Jul 12 2013
    

Formula

a(n) = ((4^(n+1) - (-1)^(n+1))/5 - 1)/2. - Ralf Stephan
a(n) = 4*a(n-1) + a(n-2) - 4*a(n-3). - Vincenzo Librandi, Jun 21 2012
a(n) = A226062(A129594(A227451(n))). [See page 465 in Gardner's book] - Antti Karttunen, Jul 12 2013
G.f.: x*(2*x+1) / ((x-1)*(x+1)*(4*x-1)). - Colin Barker, Apr 30 2014

A243353 Permutation of natural numbers which maps between the partitions as encoded in A227739 (binary based system, zero-based) to A112798 (prime-index based system, one-based).

Original entry on oeis.org

1, 2, 4, 3, 9, 8, 6, 5, 25, 18, 16, 27, 15, 12, 10, 7, 49, 50, 36, 75, 81, 32, 54, 125, 35, 30, 24, 45, 21, 20, 14, 11, 121, 98, 100, 147, 225, 72, 150, 245, 625, 162, 64, 243, 375, 108, 250, 343, 77, 70, 60, 105, 135, 48, 90, 175, 55, 42, 40, 63, 33, 28, 22, 13, 169, 242, 196, 363, 441, 200, 294, 605, 1225, 450, 144
Offset: 0

Views

Author

Antti Karttunen, Jun 05 2014

Keywords

Comments

Note the indexing: the domain includes zero, but the range starts from one.

Crossrefs

A243354 gives the inverse mapping.

Programs

  • Mathematica
    f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; Table[f[BitXor[n, Floor[n/2]], 1, 1], {n, 0, 74}] (* Michael De Vlieger, May 09 2017 *)
  • Python
    from sympy import prime
    import math
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    def a003188(n): return n^int(n/2)
    def a243353(n): return a005940(1 + a003188(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A243353 n) (A005940 (+ 1 (A003188 n))))
    

Formula

a(n) = A005940(1+A003188(n)).
a(n) = A241909(1+A075157(n)). [With A075157's original starting offset]
For all n >= 0, A243354(a(n)) = n.
A227183(n) = A056239(a(n)). [Maps between the corresponding sums ...]
A227184(n) = A003963(a(n)). [... and products of parts of each partition].
For n >= 0, a(A037481(n)) = A002110(n). [Also "triangular partitions", the fixed points of Bulgarian solitaire, A226062 & A242424].
For n >= 1, a(A227451(n+1)) = 4*A243054(n).

A242422 Numbers in whose prime factorization the indices of primes sum to a triangular number.

Original entry on oeis.org

1, 2, 5, 6, 8, 13, 21, 22, 25, 27, 28, 29, 30, 36, 40, 46, 47, 48, 57, 64, 73, 76, 85, 86, 91, 102, 107, 117, 121, 123, 130, 136, 142, 147, 151, 154, 156, 164, 165, 175, 185, 189, 196, 197, 198, 201, 206, 208, 210, 217, 220, 222, 225, 243, 250, 252, 257, 264, 268, 270, 279, 280, 296, 298, 299, 300
Offset: 1

Views

Author

Antti Karttunen, May 16 2014

Keywords

Comments

Numbers k such that A010054(A056239(k)) is one, or equally, that A002262(A056239(k)) is zero.
In "Bulgarian solitaire" a deck of cards or another finite set of objects is divided into one or more piles, and the "Bulgarian operation" is performed by taking one card from each pile, and making a new pile of them. The question originally posed was: on what condition the resulting partitions will eventually reach a fixed point, that is, a collection of piles that will be unchanged by the operation. See Martin Gardner reference and the Wikipedia-page.
This sequence answers the question when we implement the operation on the partition list A112798: These are all such numbers that starting iterating A242424 from them leads eventually to a fixed point, which will be one of the primorial numbers, A002110.
Contains the same terms as rows of A215366 indexed with triangular numbers (A000217: 0, 1, 3, 6, ...), although not in the same order. {1}, {2}, {5, 6, 8}, {13, 21, 22, 25, 27, 28, 30, 36, 40, 48, 64}, etc.
Heinz numbers of integer partitions of triangular numbers. The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k). - Gus Wiseman, Nov 13 2018

Examples

			1 is present as it has an empty factorization, for which the sum of prime indices is zero, and zero is also a triangular number.
2 = p_1 is present as 1 is a triangular number.
6 = p_1 * p_2 is present, as 1+2 = 3 is a triangular number.
300 = 2*2*3*5*5 = p_1 * p_1 * p_2 * p_3 * p_3 is present, as 1+1+2+3+3 = 10 is a triangular number.
Any primorial number p_1 * p_2 * p_3 * ... * p_n is present, as 1+2+3+...+n is by definition a triangular number.
The sequence of all integer partitions whose Heinz numbers are in the sequence begins: (), (1), (3), (2,1), (1,1,1), (6), (4,2), (5,1), (3,3), (2,2,2), (4,1,1), (10), (3,2,1), (2,2,1,1), (3,1,1,1), (9,1), (15), (2,1,1,1,1), (8,2), (1,1,1,1,1,1), (21), (8,1,1), (7,3), (14,1), (6,4). - _Gus Wiseman_, Nov 13 2018
		

References

  • Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.

Crossrefs

Complement: A242423.
A002110 (primorial numbers) is a subsequence.

Programs

  • Mathematica
    triQ[n_]:=Module[{k,i},For[k=n;i=1,k>0,i++,k-=i];k==0];
    Select[Range[100],triQ[Total[Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]*k]]]&] (* Gus Wiseman, Nov 13 2018 *)

A243051 Integer sequence induced by Bulgarian solitaire operation on partition list A241918: a(n) = A241909(A242424(A241909(n))).

Original entry on oeis.org

1, 2, 4, 3, 8, 25, 16, 9, 9, 343, 32, 10, 64, 14641, 125, 27, 128, 15, 256, 98, 2401, 371293, 512, 30, 27, 24137569, 6, 2662, 1024, 147, 2048, 81, 161051, 893871739, 625, 50, 4096, 78310985281, 4826809, 28, 8192, 3993, 16384, 57122, 50, 14507145975869, 32768, 90, 81
Offset: 1

Views

Author

Antti Karttunen, May 29 2014

Keywords

Comments

In "Bulgarian solitaire" a deck of cards or another finite set of objects is divided into one or more piles, and the "Bulgarian operation" is performed by taking one card from each pile, and making a new pile of them, which is added to the remaining set of piles. Essentially, this operation is a function whose domain and range are unordered integer partitions (cf. A000041) and which preserves the total size of a partition (the sum of its parts). This sequence is induced when the operation is implemented on the partitions as ordered by the list A241918.

Examples

			For n = 10, we see that as 10 = 2*5 = p_1^1 * p_2^0 * p_3^1, it encodes a partition [2,2,2]. Applying one step of Bulgarian solitaire (subtract one from each part, and add a new part as large as there were parts in the old partition) to this partition results a new partition [1,1,1,3], which is encoded in the prime factorization of p_1^0 * p_2^0 * p_3^0 * p_4^3 = 7^3 = 343. Thus a(10) = 343.
For n = 46, we see that as 46 = 2*23 = p_1 * p_9 = p_1^1 * p_2^0 * p_3^0 * ... * p_9^1, it encodes a partition [2,2,2,2,2,2,2,2,2]. Applying one step of Bulgarian solitaire to this partition results a new partition [1,1,1,1,1,1,1,1,1,9], which is encoded in the prime factorization of p_1^0 * p_2^0 * ... * p_9^0 * p_10^9 = 29^9 = 14507145975869. Thus a(46) = 14507145975869.
For n = 1875, we see that as 1875 = p_1^0 * p_2^1 * p_3^4, it encodes a partition [1,2,5]. Applying Bulgarian Solitaire, we get a new partition [1,3,4]. This in turn is encoded by p_1^0 * p_2^2 * p_3^2 = 3^2 * 5^2 = 225. Thus a(1875)=225.
		

References

  • Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.

Crossrefs

Row 1 of A243060 (table which gives successive "recursive iterates" of this sequence and converges towards A122111).
Fixed points: A243054.

Formula

a(n) = A241909(A242424(A241909(n))).
a(n) = 1 + A075157(A226062(A075158(n-1))).
A243503(a(n)) = A243503(n) for all n. [Because Bulgarian operation doesn't change the total sum of the partition].

A227185 The largest part in the unordered partition encoded in the runlengths of the binary expansion of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 05 2013

Keywords

Comments

The bijective encoding of nonordered partitions via compositions (ordered partitions) present in the binary expansion of n is explained in A227184.
It appears that a(4n+2) = a(2n+1). - Ralf Stephan, Jul 20 2013

Examples

			12 has binary expansion "1100", for which the lengths of runs (consecutive blocks of 0- or 1-bits) are [2,2]. Converting this to a partition in the manner explained in A227184 gives the partition {2+3}. Its largest part is 3, thus a(12)=3, which is actually the first time when this sequence differs from A043276.
		

Crossrefs

For all n, A005811(n) = a(A129594(n)). Cf. also A136480 (for n>= 1, gives the smallest part) and A227183, A227184, A226062, A092339, A227147.
a(n) gives the rightmost nonzero term on the n-th row of A227189.

Programs

  • Mathematica
    Table[Function[b, Max@ Accumulate@ Prepend[If[Length@ b > 1, Rest[b] - 1, {}], First@ b] - Boole[n == 0]]@ Map[Length, Split@ Reverse@ IntegerDigits[ n, 2]], {n, 0, 120}] // Flatten (* Michael De Vlieger, May 09 2017 *)
  • Scheme
    (define (A227185 n) (if (zero? n) n (+ 1 (- (A029837 (+ 1 n)) (A005811 n)))))
    (define (A227185v2 n) (if (zero? n) n (car (reverse (binexp_to_ascpart n))))) ;; Alternative definition, using the auxiliary functions given in A227184.

Formula

Defining formula:
a(0)=0; and for n>=1, a(n) = A029837(n+1) - (A005811(n)-1). [Because the largest part in the unordered partition in this encoding scheme is computed as (c_1 + (c_2-1) + (c_3-1) + ... + (c_k-1)) where c_1 .. c_k are the parts of the k-part composition that sum together as c_1 + c_2 + ... + c_k = A029837(n+1) (the binary width of n), so we subtract from the total binary width of n the number of runs (A005811) minus 1.]
Equivalently: a(n) = A092339(n)+1 for n>0.
a(n) = A005811(A129594(n)). [This just states the fact that when conjugating a partition, the largest part of an old partition will be the number of the parts in the new, conjugated partition.]
Showing 1-10 of 15 results. Next