cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 31-40 of 47 results. Next

A066806 Expansion of Product_{k>=1} (1+x^k)^A001055(k).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 8, 11, 16, 21, 27, 38, 49, 63, 84, 109, 138, 180, 228, 289, 369, 463, 578, 732, 911, 1128, 1407, 1741, 2140, 2646, 3243, 3968, 4862, 5925, 7198, 8770, 10620, 12833, 15524, 18718, 22502, 27075, 32467, 38873, 46537, 55565, 66220, 78946
Offset: 0

Views

Author

Vladeta Jovovic, Jan 19 2002

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    g:= proc(n, k) option remember; `if`(n>k, 0, 1)+
          `if`(isprime(n), 0, add(`if`(d>k, 0, g(n/d, d)),
             d=divisors(n) minus {1, n}))
        end:
    b:= proc(n) b(n):= add((-1)^(n/d+1)*d*g(d$2), d=divisors(n)) end:
    a:= proc(n) a(n):= `if`(n=0, 1, add(a(n-k)*b(k), k=1..n)/n) end:
    seq(a(n), n=0..60);  # Alois P. Heinz, May 16 2014
  • Mathematica
    g[n_, k_] := g[n, k] = If[n > k, 0, 1] + If[PrimeQ[n], 0, Sum[If[d > k, 0, g[n/d, d]], {d, Divisors[n] ~Complement~ {1, n}}]];
    b[n_] := b[n] = Sum[(-1)^(n/d + 1)*d*g[d, d], {d, Divisors[n]}];
    a[n_] := a[n] = If[n == 0, 1, Sum[a[n - k]*b[k], {k, 1, n}]/n];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Mar 23 2017, after Alois P. Heinz *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import divisors, isprime
    @cacheit
    def g(n, k): return (0 if n>k else 1) + (0 if isprime(n) else sum(0 if d>k else g(n//d, d) for d in divisors(n)[1:-1]))
    @cacheit
    def b(n): return sum((-1)**(n//d + 1)*d*g(d, d) for d in divisors(n))
    @cacheit
    def a(n): return 1 if n==0 else sum(a(n - k)*b(k) for k in range(1, n + 1))//n
    print([a(n) for n in range(61)]) # Indranil Ghosh, Aug 19 2017, after Maple code

Formula

a(n) = (1/n)*Sum_{k=1..n} a(n-k)*b(k), n>0, a(0)=1, b(k)=Sum_{d|k} (-1)^(n/d+1)*d*A001055(d).

A319855 Minimum number that can be obtained by iteratively adding or multiplying together parts of the integer partition with Heinz number n until only one part remains.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 4, 1, 4, 3, 5, 2, 6, 4, 5, 1, 7, 4, 8, 3, 6, 5, 9, 2, 6, 6, 6, 4, 10, 5, 11, 1, 7, 7, 7, 4, 12, 8, 8, 3, 13, 6, 14, 5, 7, 9, 15, 2, 8, 6, 9, 6, 16, 6, 8, 4, 10, 10, 17, 5, 18, 11, 8, 1, 9, 7, 19, 7, 11, 7, 20, 4, 21, 12, 8, 8, 9, 8, 22, 3, 8
Offset: 1

Views

Author

Gus Wiseman, Sep 29 2018

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Examples

			a(30) = 5 because the minimum number that can be obtained starting with (3,2,1) is 3+2*1 = 5.
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    nexos[ptn_]:=If[Length[ptn]==0,{0},Union@@Select[ReplaceListRepeated[{Sort[ptn]},{{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x+y]],{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x*y]]}],Length[#]==1&]];
    Table[Min[nexos[If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]]],{n,100}]

Formula

a(1) = 0, a(n) = max(A056239(n) - A007814(n), 1). - Charlie Neder, Oct 03 2018

A319856 Maximum number that can be obtained by iteratively adding or multiplying together parts of the integer partition with Heinz number n until only one part remains.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 6, 5, 6, 4, 7, 6, 8, 6, 8, 6, 9, 6, 9, 7, 8, 8, 10, 9, 11, 6, 10, 8, 12, 9, 12, 9, 12, 9, 13, 12, 14, 10, 12, 10, 15, 9, 16, 12, 14, 12, 16, 12, 15, 12, 16, 11, 17, 12, 18, 12, 16, 9, 18, 15, 19, 14, 18, 16, 20, 12, 21, 13
Offset: 1

Views

Author

Gus Wiseman, Sep 29 2018

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Examples

			a(30) = 9 because the maximum number that can be obtained starting with (3,2,1) is 3*(2+1) = 9.
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    nexos[ptn_]:=If[Length[ptn]==0,{0},Union@@Select[ReplaceListRepeated[{Sort[ptn]},{{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x+y]],{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x*y]]}],Length[#]==1&]];
    Table[Max[nexos[If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]]],{n,100}]

A321460 Expansion of Product_{k>0} (1 - x^k)^A001055(k).

Original entry on oeis.org

1, -1, -1, 0, -1, 2, 0, 2, -1, 0, 3, -1, -2, -1, 1, -6, -1, 0, 0, 0, 7, -1, 1, -2, 4, 1, -2, 11, 1, -2, -10, 11, -12, 16, -15, -6, -6, -12, -1, 8, -4, -10, 9, -19, 21, -15, 23, 4, 28, -8, 42, -6, 9, 19, 3, -21, -18, -14, -15, 3, -72, 70, -21, -49, -9, 18, -12, 26, -68, -12
Offset: 0

Views

Author

Seiichi Manyama, Nov 10 2018

Keywords

Crossrefs

Convolution inverse of A066739.

A319841 Number of distinct positive integers that can be obtained by iteratively adding or multiplying together parts of the integer partition with Heinz number n until only one part remains.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 4, 2, 2, 1, 5, 2, 2, 2, 4, 1, 5, 1, 6, 2, 2, 2, 6, 1, 2, 2, 7, 1, 6, 1, 4, 4, 2, 1, 8, 2, 5, 2, 4, 1, 6, 2, 8, 2, 2, 1, 7, 1, 2, 4, 9, 2, 6, 1, 4, 2, 6, 1, 8, 1, 2, 6, 4, 2, 6, 1, 9, 4, 2, 1, 10, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Sep 29 2018

Keywords

Examples

			60 is the Heinz number of (3,2,1,1) and
   5 = (3+2)*1*1
   6 = 3*2*1*1
   7 = 3+2+1+1
   8 = (3+1)*2*1
   9 = 3*(2+1)*1
  10 = (3+2)*(1+1)
  12 = (3+1)*(2+1)
so we have a(60) = 7. It is not possible to obtain 11 by adding or multiplying together the parts of (3,2,1,1).
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    Table[Length[Select[ReplaceListRepeated[{If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]},{{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x+y]],{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x*y]]}],Length[#]==1&]],{n,100}]

Formula

a(2^n) = A048249(n).

A370817 Greatest number of multisets that can be obtained by choosing a prime factor of each factor in an integer factorization of n into unordered factors > 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 07 2024

Keywords

Comments

First differs from A096825 at a(210) = 4, A096825(210) = 6.
First differs from A343943 at a(210) = 4, A343943(210) = 6.
First differs from A345926 at a(90) = 4, A345926(90) = 3.

Examples

			For the factorizations of 60 we have the following choices (using prime indices {1,2,3} instead of prime factors {2,3,5}):
  (2*2*3*5): {{1,1,2,3}}
   (2*2*15): {{1,1,2},{1,1,3}}
   (2*3*10): {{1,1,2},{1,2,3}}
    (2*5*6): {{1,1,3},{1,2,3}}
    (3*4*5): {{1,2,3}}
     (2*30): {{1,1},{1,2},{1,3}}
     (3*20): {{1,2},{2,3}}
     (4*15): {{1,2},{1,3}}
     (5*12): {{1,3},{2,3}}
     (6*10): {{1,1},{1,2},{1,3},{2,3}}
       (60): {{1},{2},{3}}
So a(60) = 4.
		

Crossrefs

For all divisors (not just prime factors) we have A370816.
The version for partitions is A370809, for all divisors A370808.
A000005 counts divisors.
A001055 counts factorizations, strict A045778.
A006530 gives greatest prime factor, least A020639.
A027746 lists prime factors, A112798 indices, length A001222.
A355741 chooses prime factors of prime indices, variations A355744, A355745.
A368413 counts non-choosable factorizations, complement A368414.
A370813 counts non-divisor-choosable factorizations, complement A370814.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Max[Length[Union[Sort/@Tuples[If[#==1,{},First/@FactorInteger[#]]&/@#]]]&/@facs[n]],{n,100}]

A066816 Expansion of Product_{k>=1} (1 + A001055(k)*x^k).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 8, 10, 15, 20, 25, 36, 46, 58, 78, 95, 120, 160, 198, 249, 318, 392, 485, 608, 745, 914, 1140, 1390, 1692, 2092, 2528, 3032, 3709, 4468, 5364, 6494, 7770, 9279, 11161, 13347, 15824, 18920, 22465, 26539, 31607, 37345, 43994, 52016
Offset: 0

Views

Author

Vladeta Jovovic, Jan 20 2002

Keywords

Comments

This sequence is obtained from the generalized Euler transform in A266964 by taking f(n) = -1, g(n) = -A001055(n). - Seiichi Manyama, Nov 14 2018

Crossrefs

Formula

a(n) = (1/n)*Sum_{k=1..n} a(n-k)*b(k), n > 0, a(0)=1, b(k) = Sum_{d|k} (-1)^(k/d+1)*d*(A001055(d))^(k/d).

A321566 Expansion of Product_{1 <= i_1 <= i_2 <= i_3 <= i_4} 1/(1 - x^(i_1*i_2*i_3*i_4)).

Original entry on oeis.org

1, 1, 2, 3, 6, 8, 14, 19, 32, 44, 67, 91, 139, 186, 269, 362, 518, 687, 960, 1267, 1747, 2294, 3106, 4052, 5449, 7063, 9365, 12092, 15914, 20422, 26639, 34029, 44090, 56075, 72108, 91303, 116802, 147264, 187210, 235182, 297562, 372346, 468777, 584553, 732803, 910744
Offset: 0

Views

Author

Seiichi Manyama, Nov 13 2018

Keywords

Crossrefs

Product_{1 <= i_1 <= i_2 <= ... <= i_b} 1/(1 - x^(i_1 * i_2 * ... * i_b)): A000041 (b=1), A182269 (b=2), A321360 (b=3), this sequence (b=4).

Formula

Euler transform of A218320.
G.f.: Product_{k>0} 1/(1 - x^k)^A218320(k).

A282249 Number of representations of n as a sum of products of pairs of positive integers: n = Sum_{k=1..m} i_k*j_k with m >= 0, i_k < j_k, j_k > j_{k+1} and all factors distinct.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 2, 1, 3, 3, 4, 4, 6, 5, 6, 8, 8, 9, 11, 10, 14, 15, 14, 14, 21, 18, 21, 25, 25, 30, 34, 33, 42, 45, 41, 55, 62, 58, 66, 79, 76, 94, 95, 97, 115, 131, 120, 148, 153, 159, 175, 203, 189, 226, 232, 243, 268, 299, 271, 340, 349, 363, 389
Offset: 0

Views

Author

Alois P. Heinz, Feb 09 2017

Keywords

Comments

Or number of partitions of n where part i has multiplicity < i and all multiplicities are distinct and different from all parts.

Examples

			a(0) = 1: the empty sum.
a(6) = 2: 1*6 = 2*3.
a(8) = 2: 1*8 = 2*4.
a(10) = 3: 1*10 = 2*5 = 1*4+2*3.
a(11) = 3: 1*11 = 1*5+2*3 = 2*4+1*3.
a(12) = 4: 1*12 = 2*6 = 1*6+2*3 = 3*4.
a(13) = 4: 1*13 = 1*7+2*3 = 2*5+1*3 = 1*5+2*4.
a(14) = 6: 1*14 = 1*8+2*3 = 2*7 = 1*6+2*4 = 2*5+1*4 = 3*4+1*2.
a(15) = 5: 1*15 = 1*9+2*3 = 1*7+2*4 = 2*6+1*3 = 3*5.
a(25) = 14: 1*25 = 1*19+2*3 = 1*17+2*4 = 1*15+2*5 = 1*13+2*6 = 1*13+3*4 = 2*11+1*3 = 1*11+2*7 = 2*10+1*5 = 1*10+3*5 = 2*9+1*7 = 1*9+2*8 = 3*7+1*4 = 1*7+3*6.
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember;
          (((2*n+3)*n-2)*n-`if`(n::odd, 3, 0))/12
        end:
    g:= (n, i, s)-> `if`(n=0, 1, `if`(n>h(i), 0,
                    b(n, i, select(x-> x<=i, s)))):
    b:= proc(n, i, s) option remember; g(n, i-1, s)+
         `if`(i in s, 0, add(`if`(j in s, 0, g(n-i*j,
          min(n-i*j, i-1), s union {j})), j=1..min(i-1, n/i)))
        end:
    a:= n-> g(n$2, {}):
    seq(a(n), n=0..100);
  • Mathematica
    h[n_] := h[n] = (((2*n + 3)*n - 2)*n - If[OddQ[n], 3, 0])/12;
    g[n_, i_, s_] := If[n==0, 1, If[n>h[i], 0, b[n, i, Select[s, # <= i&]]]];
    b[n_, i_, s_] := b[n, i, s] = g[n, i - 1, s] + If[MemberQ[s, i], 0, Sum[If[MemberQ[s, j], 0, g[n - i*j, Min[n - i*j, i - 1], s ~Union~ {j}]], {j, 1, Min[i - 1, n/i]}]];
    a[n_] := g[n, n, {}];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 01 2018, after Alois P. Heinz *)

A282379 Number of representations of n as a sum of products of pairs of positive integers: n = Sum_{k=1..m} i_k*j_k with m >= 0, i_k <= j_k, j_k > j_{k+1} and all factors distinct with the exception that i_k = j_k is allowed.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6, 5, 9, 9, 8, 11, 15, 13, 17, 17, 19, 24, 29, 23, 33, 37, 39, 40, 53, 48, 62, 63, 71, 77, 94, 81, 110, 116, 122, 123, 156, 152, 185, 180, 200, 213, 259, 236, 287, 298, 325, 333, 404, 386, 450, 457, 506, 531, 615, 579, 679, 721
Offset: 0

Views

Author

Alois P. Heinz, Feb 13 2017

Keywords

Examples

			a(4) = 2: 1*4 = 2*2.
a(5) = 2: 1*5 = 2*2+1*1.
a(6) = 2: 1*6 = 2*3.
a(7) = 3: 1*7 = 2*3+1*1 = 1*3+2*2.
a(8) = 3: 1*8 = 2*4 = 1*4+2*2.
a(9) = 4: 1*9 = 1*5+2*2 = 2*4+1*1 = 3*3.
a(10) = 5: 1*10 = 1*6+2*2 = 2*5 = 1*4+2*3 = 3*3+1*1.
a(11) = 6: 1*11 = 1*7+2*2 = 2*5+1*1 = 1*5+2*3 = 2*4+1*3 = 3*3+1*2.
a(12) = 5: 1*12 = 1*8+2*2 = 2*6 = 1*6+2*3 = 3*4.
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember;
          n*(n+1)*(2*n+1)/6
        end:
    g:= (n, i, s)-> `if`(n=0, 1, `if`(n>h(i), 0,
                    b(n, i, select(x-> x<=i, s)))):
    b:= proc(n, i, s) option remember; g(n, i-1, s)+
         `if`(i in s, 0, add(`if`(j in s, 0, g(n-i*j,
          min(n-i*j, i-1), s union {j})), j=1..min(i, n/i)))
        end:
    a:= n-> g(n$2, {}):
    seq(a(n), n=0..100);
  • Mathematica
    h[n_] := h[n] = n(n+1)(2n+1)/6;
    g[n_, i_, s_ ] := If[n == 0, 1, If[n > h[i], 0,
         b[n, i, Select[s, # <= i&]]]];
    b[n_, i_, s_] := b[n, i, s] = g[n, i - 1, s] +
         If[MemberQ[s, i], 0, Sum[If[MemberQ[s, j], 0, g[n - i*j,
         Min[n - i*j, i - 1], s ~Union~ {j}]], {j, 1, Min[i, n/i]}]];
    a[n_] := g[n, n, {}];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 01 2021, after Alois P. Heinz *)
Previous Showing 31-40 of 47 results. Next