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

A355391 Position of first appearance of n in A181591 = binomial(bigomega(n), omega(n)).

Original entry on oeis.org

1, 4, 8, 16, 32, 24, 128, 256, 512, 48, 2048, 4096, 8192, 16384, 96, 65536, 131072, 262144, 524288, 240, 192, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 384, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 480, 768, 137438953472
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2022

Keywords

Comments

The statistic omega = A001221 counts distinct prime factors (without multiplicity).
The statistic bigomega = A001222 counts prime factors with multiplicity.
We have A181591(2^k) = k, so the sequence is fully defined. Positions meeting this maximum are A185024, complement A006987.

Examples

			The terms together with their prime indices begin:
       1: {}
       4: {1,1}
       8: {1,1,1}
      16: {1,1,1,1}
      32: {1,1,1,1,1}
      24: {1,1,1,2}
     128: {1,1,1,1,1,1,1}
     256: {1,1,1,1,1,1,1,1}
     512: {1,1,1,1,1,1,1,1,1}
      48: {1,1,1,1,2}
    2048: {1,1,1,1,1,1,1,1,1,1,1}
    4096: {1,1,1,1,1,1,1,1,1,1,1,1}
    8192: {1,1,1,1,1,1,1,1,1,1,1,1,1}
   16384: {1,1,1,1,1,1,1,1,1,1,1,1,1,1}
      96: {1,1,1,1,1,2}
   65536: {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
  131072: {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
  262144: {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
  524288: {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
     240: {1,1,1,1,2,3}
     192: {1,1,1,1,1,1,2}
		

Crossrefs

Positions of powers of 2 are A185024, complement A006987.
Counting multiplicity gives A355386.
The sorted version is A355392.
A000005 counts divisors.
A001221 counts prime factors without multiplicity.
A001222 count prime factors with multiplicity.
A070175 gives representatives for bigomega and omega, triangle A303555.

Programs

  • Mathematica
    s=Table[Binomial[PrimeOmega[n],PrimeNu[n]],{n,1000}];
    Table[Position[s,k][[1,1]],{k,Select[Union[s],SubsetQ[s,Range[#]]&]}]
  • PARI
    f(n) = binomial(bigomega(n), omega(n)); \\ A181591
    a(n) = my(k=1); while (f(k) != n, k++); k; \\ Michel Marcus, Jul 10 2022

Formula

binomial(bigomega(a(n)), omega(a(n))) = n.

Extensions

a(22)-a(28) from Michel Marcus, Jul 10 2022
a(29)-a(37) from Amiram Eldar, Jul 10 2022

A355392 Sorted positions of first appearances in A181591 = binomial(bigomega(n), omega(n)).

Original entry on oeis.org

1, 4, 8, 16, 24, 32, 48, 96, 128, 192, 240, 256, 384, 480, 512, 768, 960, 1536, 1920, 2048, 3072, 3360, 3840, 4096, 6144, 6720, 7680, 8192, 12288, 13440, 15360, 16384, 24576, 26880, 30720, 49152, 53760, 61440, 65536, 73920, 107520, 122880, 131072, 147840, 196608
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2022

Keywords

Comments

These are the positions of terms in A181591 that are different from all prior terms.
The statistic omega = A001221 counts distinct prime factors (without multiplicity).
The statistic bigomega = A001222 counts prime factors with multiplicity.
We have A181591(2^k) = k, so the image under A181591 is a permutation of the positive integers. It begins: 1, 2, 3, 4, 6, 5, 10, 15, 7, 21, 20, ...

Examples

			The terms together with their prime indices begin:
    1: {}
    4: {1,1}
    8: {1,1,1}
   16: {1,1,1,1}
   24: {1,1,1,2}
   32: {1,1,1,1,1}
   48: {1,1,1,1,2}
   96: {1,1,1,1,1,2}
  128: {1,1,1,1,1,1,1}
  192: {1,1,1,1,1,1,2}
  240: {1,1,1,1,2,3}
  256: {1,1,1,1,1,1,1,1}
  384: {1,1,1,1,1,1,1,2}
  480: {1,1,1,1,1,2,3}
  512: {1,1,1,1,1,1,1,1,1}
  768: {1,1,1,1,1,1,1,1,2}
  960: {1,1,1,1,1,1,2,3}
		

Crossrefs

The unsorted version with multiplicity is A355386.
This is the sorted version of A355391.
A000005 counts divisors.
A001221 counts prime indices without multiplicity.
A001222 count prime indices with multiplicity.
A070175 gives representatives for bigomega and omega, triangle A303555.

Programs

  • Mathematica
    s=Table[Binomial[PrimeOmega[n],PrimeNu[n]],{n,1000}];
    Select[Range[Length[s]],FreeQ[Take[s,#-1],s[[#]]]&]

Extensions

a(41)-a(45) from Amiram Eldar, Jul 10 2022

A156552 Unary-encoded compressed factorization of natural numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 7, 6, 9, 16, 11, 32, 17, 10, 15, 64, 13, 128, 19, 18, 33, 256, 23, 12, 65, 14, 35, 512, 21, 1024, 31, 34, 129, 20, 27, 2048, 257, 66, 39, 4096, 37, 8192, 67, 22, 513, 16384, 47, 24, 25, 130, 131, 32768, 29, 36, 71, 258, 1025, 65536, 43, 131072, 2049, 38, 63, 68, 69, 262144
Offset: 1

Views

Author

Leonid Broukhis, Feb 09 2009

Keywords

Comments

The primes become the powers of 2 (2 -> 1, 3 -> 2, 5 -> 4, 7 -> 8); the composite numbers are formed by taking the values for the factors in the increasing order, multiplying them by the consecutive powers of 2, and summing. See the Example section.
From Antti Karttunen, Jun 27 2014: (Start)
The odd bisection (containing even terms) halved gives A244153.
The even bisection (containing odd terms), when one is subtracted from each and halved, gives this sequence back.
(End)
Question: Are there any other solutions that would satisfy the recurrence r(1) = 0; and for n > 1, r(n) = Sum_{d|n, d>1} 2^A033265(r(d)), apart from simple variants 2^k * A156552(n)? See also A297112, A297113. - Antti Karttunen, Dec 30 2017

Examples

			For 84 = 2*2*3*7 -> 1*1 + 1*2 + 2*4 + 8*8 =  75.
For 105 = 3*5*7 -> 2*1 + 4*2 + 8*4 = 42.
For 137 = p_33 -> 2^32 = 4294967296.
For 420 = 2*2*3*5*7 -> 1*1 + 1*2 + 2*4 + 4*8 + 8*16 = 171.
For 147 = 3*7*7 = p_2 * p_4 * p_4 -> 2*1 + 8*2 + 8*4 = 50.
		

Crossrefs

One less than A005941.
Inverse permutation: A005940 with starting offset 0 instead of 1.
Cf. also A297106, A297112 (Möbius transform), A297113, A153013, A290308, A300827, A323243, A323244, A323247, A324201, A324812 (n for which a(n) is a square), A324813, A324822, A324823, A324398, A324713, A324815, A324819, A324865, A324866, A324867.

Programs

  • Mathematica
    Table[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[ Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ n]], {n, 67}] (* Michael De Vlieger, Sep 08 2016 *)
  • PARI
    a(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ David A. Corneth, Mar 08 2019
    
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n)))); \\ (based on the given recurrence) - Antti Karttunen, Mar 08 2019
    
  • Perl
    # Program corrected per instructions from Leonid Broukhis. - Antti Karttunen, Jun 26 2014
    # However, it gives correct answers only up to n=136, before corruption by a wrap-around effect.
    # Note that the correct answer for n=137 is A156552(137) = 4294967296.
    $max = $ARGV[0];
    $pow = 0;
    foreach $i (2..$max) {
    @a = split(/ /, `factor $i`);
    shift @a;
    $shift = 0;
    $cur = 0;
    while ($n = int shift @a) {
    $prime{$n} = 1 << $pow++ if !defined($prime{$n});
    $cur |= $prime{$n} << $shift++;
    }
    print "$cur, ";
    }
    print "\n";
    (Scheme, with memoization-macro definec from Antti Karttunen's IntSeq-library, two different implementations)
    (definec (A156552 n) (cond ((= n 1) 0) (else (+ (A000079 (+ -2 (A001222 n) (A061395 n))) (A156552 (A052126 n))))))
    (definec (A156552 n) (cond ((= 1 n) (- n 1)) ((even? n) (+ 1 (* 2 (A156552 (/ n 2))))) (else (* 2 (A156552 (A064989 n))))))
    ;; Antti Karttunen, Jun 26 2014
    
  • Python
    from sympy import primepi, factorint
    def A156552(n): return sum((1<Chai Wah Wu, Mar 10 2023

Formula

From Antti Karttunen, Jun 26 2014: (Start)
a(1) = 0, a(n) = A000079(A001222(n)+A061395(n)-2) + a(A052126(n)).
a(1) = 0, a(2n) = 1+2*a(n), a(2n+1) = 2*a(A064989(2n+1)). [Compare to the entanglement recurrence A243071].
For n >= 0, a(2n+1) = 2*A244153(n+1). [Follows from the latter clause of the above formula.]
a(n) = A005941(n) - 1.
As a composition of related permutations:
a(n) = A003188(A243354(n)).
a(n) = A054429(A243071(n)).
For all n >= 1, A005940(1+a(n)) = n and for all n >= 0, a(A005940(n+1)) = n. [The offset-0 version of A005940 works as an inverse for this permutation.]
This permutations also maps between the partition-lists A112798 and A125106:
A056239(n) = A161511(a(n)). [The sums of parts of each partition (the total sizes).]
A003963(n) = A243499(a(n)). [And also the products of those parts.]
(End)
From Antti Karttunen, Oct 09 2016: (Start)
A161511(a(n)) = A056239(n).
A029837(1+a(n)) = A252464(n). [Binary width of terms.]
A080791(a(n)) = A252735(n). [Number of nonleading 0-bits.]
A000120(a(n)) = A001222(n). [Binary weight.]
For all n >= 2, A001511(a(n)) = A055396(n).
For all n >= 2, A000120(a(n))-1 = A252736(n). [Binary weight minus one.]
A252750(a(n)) = A252748(n).
a(A250246(n)) = A252754(n).
a(A005117(n)) = A277010(n). [Maps squarefree numbers to a permutation of A003714, fibbinary numbers.]
A085357(a(n)) = A008966(n). [Ditto for their characteristic functions.]
For all n >= 0:
a(A276076(n)) = A277012(n).
a(A276086(n)) = A277022(n).
a(A260443(n)) = A277020(n).
(End)
From Antti Karttunen, Dec 30 2017: (Start)
For n > 1, a(n) = Sum_{d|n, d>1} 2^A033265(a(d)). [See comments.]
More linking formulas:
A106737(a(n)) = A000005(n).
A290077(a(n)) = A000010(n).
A069010(a(n)) = A001221(n).
A136277(a(n)) = A181591(n).
A132971(a(n)) = A008683(n).
A106400(a(n)) = A008836(n).
A268411(a(n)) = A092248(n).
A037011(a(n)) = A010052(n) [conjectured, depends on the exact definition of A037011].
A278161(a(n)) = A046951(n).
A001316(a(n)) = A061142(n).
A277561(a(n)) = A034444(n).
A286575(a(n)) = A037445(n).
A246029(a(n)) = A181819(n).
A278159(a(n)) = A124859(n).
A246660(a(n)) = A112624(n).
A246596(a(n)) = A069739(n).
A295896(a(n)) = A053866(n).
A295875(a(n)) = A295297(n).
A284569(a(n)) = A072411(n).
A286574(a(n)) = A064547(n).
A048735(a(n)) = A292380(n).
A292272(a(n)) = A292382(n).
A244154(a(n)) = A048673(n), a(A064216(n)) = A244153(n).
A279344(a(n)) = A279339(n), a(A279338(n)) = A279343(n).
a(A277324(n)) = A277189(n).
A037800(a(n)) = A297155(n).
For n > 1, A033265(a(n)) = 1+A297113(n).
(End)
From Antti Karttunen, Mar 08 2019: (Start)
a(n) = A048675(n) + A323905(n).
a(A324201(n)) = A000396(n), provided there are no odd perfect numbers.
The following sequences are derived from or related to the base-2 expansion of a(n):
A000265(a(n)) = A322993(n).
A002487(a(n)) = A323902(n).
A005187(a(n)) = A323247(n).
A324288(a(n)) = A324116(n).
A323505(a(n)) = A323508(n).
A079559(a(n)) = A323512(n).
A085405(a(n)) = A323239(n).
The following sequences are obtained by applying to a(n) a function that depends on the prime factorization of its argument, which goes "against the grain" because a(n) is the binary code of the factorization of n, which in these cases is then factored again:
A000203(a(n)) = A323243(n).
A033879(a(n)) = A323244(n) = 2*a(n) - A323243(n),
A294898(a(n)) = A323248(n).
A000005(a(n)) = A324105(n).
A000010(a(n)) = A324104(n).
A083254(a(n)) = A324103(n).
A001227(a(n)) = A324117(n).
A000593(a(n)) = A324118(n).
A001221(a(n)) = A324119(n).
A009194(a(n)) = A324396(n).
A318458(a(n)) = A324398(n).
A192895(a(n)) = A324100(n).
A106315(a(n)) = A324051(n).
A010052(a(n)) = A324822(n).
A053866(a(n)) = A324823(n).
A001065(a(n)) = A324865(n) = A323243(n) - a(n),
A318456(a(n)) = A324866(n) = A324865(n) OR a(n),
A318457(a(n)) = A324867(n) = A324865(n) XOR a(n),
A318458(a(n)) = A324398(n) = A324865(n) AND a(n),
A318466(a(n)) = A324819(n) = A323243(n) OR 2*a(n),
A318467(a(n)) = A324713(n) = A323243(n) XOR 2*a(n),
A318468(a(n)) = A324815(n) = A323243(n) AND 2*a(n).
(End)

Extensions

More terms from Antti Karttunen, Jun 28 2014

A267116 Bitwise-OR of the exponents of primes in the prime factorization of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Examples

			For n = 4 = 2^2, bitwise-OR of 2 alone is 2, thus a(4) = 2.
For n = 6 = 2^1 * 3^1, when we take a bitwise-or of 1 and 1, we get 1, thus a(6) = 1.
For n = 24 = 2^3 * 3^1, bitwise-or of 3 and 1 ("11" and "01" in binary) gives "11", thus a(24) = 3.
For n = 210 = 2^1 * 3^1 * 5^1 * 7^1, bitwise-or of 1, 1, 1 and 1 gives 1, thus a(210) = 1.
For n = 720 = 2^4 * 3^2 * 5^1, bitwise-or of 4, 2 and 1 ("100", "10" and "1" in binary) gives 7 ("111" in binary), thus a(720) = 7.
		

Crossrefs

Cf. A000290 (indices of even numbers).
Cf. A000037 (indices of odd numbers).
Nonunit terms of A005117, A062503, A113849 give the positions of ones, twos, fours respectively in this sequence.
Sequences with similar definitions: A260728, A267113, A267115 (bitwise-AND) and A268387 (bitwise-XOR of exponents).
Sequences with related analysis: A267114, A268374, A268375, A268376.
Sequences A088529, A136565 and A181591 coincide with a(n) for n: 2 <= n < 24.
A003961, A059896 are used to express relationship between terms of this sequence.
Related to A087207 via A225546.

Programs

  • Maple
    read("transforms"):
    A267116 := proc(n)
        local a,e ;
        a := 0 ;
        for e in ifactors(n)[2] do
            a := ORnos(a,op(2,e)) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Feb 16 2021
  • Mathematica
    {0}~Join~Rest@ Array[BitOr @@ Map[Last, FactorInteger@ #] &, 120] (* Michael De Vlieger, Feb 04 2016 *)
  • PARI
    a(n)=my(f = factor(n)); my(b = 0); for (k=1, #f~, b = bitor(b, f[k,2]);); b; \\ Michel Marcus, Feb 05 2016
    
  • PARI
    a(n)=if(n>1, fold(bitor, factor(n)[,2]), 0) \\ Charles R Greathouse IV, Aug 04 2016
    
  • Python
    from functools import reduce
    from operator import or_
    from sympy import factorint
    def A267116(n): return reduce(or_,factorint(n).values(),0) # Chai Wah Wu, Aug 31 2022

Formula

a(1) = 0; for n > 1: a(n) = A067029(n) OR a(A028234(n)). [Here OR stands for bitwise-or, A003986.]
Other identities and observations. For all n >= 1:
a(n) = A007814(n) OR A260728(n) OR A267113(n).
a(n) = A001222(n) - A268374(n).
A268387(n) <= a(n) <= A001222(n).
From Peter Munn, Jan 08 2020: (Start)
a(A059896(n,k)) = a(n) OR a(k).
a(A003961(n)) = a(n).
a(n^2) = 2*a(n).
a(n) = A087207(A225546(n)).
a(A225546(n)) = A087207(n).
(End)

A088529 Numerator of Bigomega(n)/Omega(n).

Original entry on oeis.org

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

Views

Author

Cino Hilliard, Nov 16 2003

Keywords

Examples

			bigomega(24) / omega(24) = 4/2 = 2, so a(24) = 2.
		

References

  • H. Z. Cao, On the average of exponents, Northeast. Math. J., Vol. 10 (1994), pp. 291-296.

Crossrefs

Cf. A001221, A001222, A070012, A070013, A070014, A088530 (gives the denominator).

Programs

  • Mathematica
    Table[Numerator[PrimeOmega[n]/PrimeNu[n]], {n, 2, 100}] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    for(x=2,100,y=bigomega(x)/omega(x);print1(numerator(y)","))
    
  • Python
    from sympy import primefactors, Integer
    def bigomega(n): return 0 if n==1 else bigomega(Integer(n)/primefactors(n)[0]) + 1
    def omega(n): return Integer(len(primefactors(n)))
    def a(n): return (bigomega(n)/omega(n)).numerator
    print([a(n) for n in range(2, 51)]) # Indranil Ghosh, Jul 13 2017

Formula

Let B = number of prime divisors of n with multiplicity, O = number of distinct prime divisors of n. Then a(n) = numerator of B/O.
a(n) = A136565(n) = A181591(n) for n: 2 <= n < 24. - Reinhard Zumkeller, Nov 01 2010
Sum_{k=2..n} a(k)/A088530(k) ~ n + O(n/log(log(n))) (Duncan, 1970). - Amiram Eldar, Oct 14 2022
Sum_{k=2..n} a(k)/A088530(k) = n + c_1 * n/log(log(n)) + c_2 * n/log(log(n))^2 + O(n/log(log(n))^3), where c_1 = A136141 and c_2 = A272531 (Cao, 1994; Finch, 2020). - Amiram Eldar, Dec 15 2022

A136565 a(n) = sum of the distinct values making up the exponents in the prime-factorization of n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Jan 07 2008

Keywords

Comments

The sums of the first 10^k terms, for k = 1, 2, ..., are 13, 192, 2089, 21405, 215730, 2162136, 21636277, 216410510, 2164253043, 21642998932, ... . Apparently, the asymptotic mean of this sequence is 2.164... . - Amiram Eldar, Jun 30 2025

Examples

			120 = 2^3 * 3^1 * 5^1. The exponents of the prime factorization are therefore 3,1,1. The distinct values which equal these exponents are 1 and 3. So a(120) = 1+3 = 4.
		

Crossrefs

Programs

  • Mathematica
    Join[{0},Table[Total[Union[Transpose[FactorInteger[n]][[2]]]],{n,2,110}]] (* Harvey P. Dale, Jun 23 2013 *)
  • PARI
    A136565(n) = vecsum(apply(primepi,factor(factorback(apply(e->prime(e),(factor(n)[,2]))))[,1])); \\ Antti Karttunen, Sep 06 2018

Formula

a(n) = A088529(n) = A181591(n) for n: 2 <= n < 24. - Reinhard Zumkeller, Nov 01 2010
a(n) = A066328(A181819(n)). - Antti Karttunen, Sep 06 2018

Extensions

More terms from Diana L. Mecum, Jul 17 2008

A353390 Number of compositions of n whose own run-lengths are a subsequence (not necessarily consecutive).

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 3, 2, 2, 8, 17, 26, 43, 77, 129, 210, 351, 569
Offset: 0

Views

Author

Gus Wiseman, May 15 2022

Keywords

Examples

			The a(0) = 1 through a(9) = 8 compositions (empty columns indicated by dots):
  ()  (1)  .  .  (22)  (122)  (1122)  (11221)  (21122)  (333)
                       (221)  (1221)  (12211)  (22112)  (22113)
                              (2211)                    (22122)
                                                        (31122)
                                                        (121122)
                                                        (122112)
                                                        (211221)
                                                        (221121)
For example, the composition y = (2,2,3,3,1) has run-lengths (2,2,1), which form a (non-consecutive) subsequence, so y is counted under a(11).
		

Crossrefs

The version for partitions is A325702.
The recursive version is A353391, ranked by A353431.
The consecutive case is A353392, ranked by A353432.
These compositions are ranked by A353402.
The reverse version is A353403.
The recursive consecutive version is A353430.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A047966 counts uniform partitions, compositions A329738.
A169942 counts Golomb rulers, ranked by A333222.
A325676 counts knapsack compositions, ranked by A333223, partitions A108917.
A325705 counts partitions containing all of their distinct multiplicities.
A329739 counts compositions with all distinct run-lengths, for runs A351013.
A353400 counts compositions with all run-lengths > 2.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], MemberQ[Subsets[#],Length/@Split[#]]&]],{n,0,15}]

A353391 Number of compositions of n that are empty, a singleton, or whose run-lengths are a subsequence that is already counted.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 1, 4, 5, 7, 9, 11, 15, 22, 38, 45, 87, 93
Offset: 0

Views

Author

Gus Wiseman, May 15 2022

Keywords

Examples

			The a(9) = 4 through a(14) = 15 compositions (A..E = 10..14):
  (9)       (A)       (B)       (C)       (D)       (E)
  (333)     (2233)    (141122)  (2244)    (161122)  (2255)
  (121122)  (3322)    (221123)  (4422)    (221125)  (5522)
  (221121)  (131122)  (221132)  (151122)  (221134)  (171122)
            (221131)  (221141)  (221124)  (221143)  (221126)
                      (231122)  (221142)  (221152)  (221135)
                      (321122)  (221151)  (221161)  (221153)
                                (241122)  (251122)  (221162)
                                (421122)  (341122)  (221171)
                                          (431122)  (261122)
                                          (521122)  (351122)
                                                    (531122)
                                                    (621122)
                                                    (122121122)
                                                    (221121221)
		

Crossrefs

The non-recursive version is A353390, ranked by A353402.
The non-recursive consecutive version is A353392, ranked by A353432.
The non-recursive reverse version is A353403.
The unordered version is A353426, ranked by A353393 (nonprime A353389).
The consecutive version is A353430.
These compositions are ranked by A353431.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A329738 counts uniform compositions, partitions A047966.
A114901 counts compositions with no runs of length 1.
A169942 counts Golomb rulers, ranked by A333222.
A325676 counts knapsack compositions, ranked by A333223.
A325705 counts partitions containing all of their distinct multiplicities.
A329739 counts compositions with all distinct run-length.

Programs

  • Mathematica
    yosQ[y_]:=Length[y]<=1||MemberQ[Subsets[y],Length/@Split[y]]&&yosQ[Length/@Split[y]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],yosQ]],{n,0,15}]

A355383 Number of pairs (y, v), where y is a partition of n and v is a sub-multiset of y whose cardinality equals the number of distinct parts in y.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 16, 26, 42, 64, 100, 150, 224, 330, 482, 697, 999, 1418, 1996, 2794, 3879, 5355, 7343, 10018, 13583, 18338, 24618, 32917, 43790, 58043, 76591, 100716, 131906, 172194, 223966, 290423, 375318, 483668, 621368, 796138, 1017146
Offset: 0

Views

Author

Gus Wiseman, Jul 02 2022

Keywords

Comments

If a partition is regarded as an arrow from the number of parts to the number of distinct parts, this sequence counts composable containments of partitions.

Examples

			The a(0) = 1 through a(5) = 10 pairs:
  ()()  (1)(1)  (2)(2)   (3)(3)    (4)(4)     (5)(5)
                (11)(1)  (21)(21)  (31)(31)   (41)(41)
                         (111)(1)  (22)(2)    (32)(32)
                                   (211)(11)  (311)(11)
                                   (211)(21)  (311)(31)
                                   (1111)(1)  (221)(21)
                                              (221)(22)
                                              (2111)(11)
                                              (2111)(21)
                                              (11111)(1)
		

Crossrefs

With multiplicity we have A339006.
The version for compositions is A355384.
The homogeneous version w/o containment is A355385, compositions A355388.
A001970 counts multiset partitions of partitions.
A063834 counts partitions of each part of a partition.

Programs

  • Mathematica
    Table[Sum[Length[Union[Subsets[y,{Length[Union[y]]}]]],{y,IntegerPartitions[n]}],{n,0,15}]

A136277 From the binary representation of n: binomial(number of ones, number of blocks of contiguous ones).

Original entry on oeis.org

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

Views

Author

Neven Juric (neven.juric(AT)apis-it.hr), Apr 01 2008

Keywords

Comments

First occurrence of k: 1, 3, 7, 15, 31, 23, 127, 255, 511, 47, 2047, 4095, 8191, 16383, 95, 65535, 131071, ..., . k must occur by 2^k-1. - Robert G. Wilson v
Record values: 1, 3, 7, 15, 23, 47, 95, 175, 191, 351, 703, 1375, 1407, 2751, 5503, 10943, 11007, 21887, 22015, 43775, 87423, 87551, 174847, 175103, 349695, 699135, 699391, 1398271, 1398783, 2796543, 2797567, 5592575, 5593087, 11185151, 11186175, ..., . - Robert G. Wilson v

Crossrefs

Programs

  • Maple
    A000120 := proc(n) local i ; add(i,i=convert(n,base,2)) ; end: A069010 := proc(n) local b,c,i ; if n = 0 then RETURN(0) ; fi ; b := convert(n,base,2) ; c := 0 ; if nops(b) > 1 then for i from 1 to nops(b) do if op(i,b) <> op(i-1,b) then c := c+1 ; fi ; od: fi ; op(1,b)+floor(c/2) ; end: A136277 := proc(n) binomial(A000120(n),A069010(n)) ; end: seq(A136277(n),n=0..120) ; # R. J. Mathar, Apr 01 2008
  • Mathematica
    f[n_] := Block[{id = IntegerDigits[n, 2]}, Binomial[ Count[id, 1], Floor[(Length@ Split@ id + 1)/2]]]; Array[f, 100] (* Robert G. Wilson v *)

Formula

a(n) = A007318(A000120(n),A069010(n)). - R. J. Mathar, Apr 01 2008
a(n) = A181591(A005940(1+n)). - Antti Karttunen, May 29 2017

Extensions

More terms from R. J. Mathar and Robert G. Wilson v, Apr 01 2008
Showing 1-10 of 14 results. Next