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-5 of 5 results.

A341112 Number of partitions of n into 3 prime powers (including 1).

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 6, 6, 8, 8, 10, 9, 12, 10, 13, 12, 15, 13, 17, 15, 18, 15, 19, 16, 21, 17, 23, 18, 24, 19, 27, 23, 30, 24, 32, 25, 32, 26, 34, 26, 36, 26, 36, 28, 38, 28, 40, 30, 42, 32, 43, 30, 45, 32, 47, 35, 49, 30, 50, 35, 51, 36, 53, 35, 55, 37, 54, 40, 57, 36, 61, 40, 61
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 05 2021

Keywords

Crossrefs

Programs

  • Maple
    q:= proc(n) option remember; nops(ifactors(n)[2])<2 end:
    b:= proc(n, i, t) option remember; `if`(n=0,
          `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(q(i), b(n-i, min(n-i, i), t-1), 0)))
        end:
    a:= n-> b(n$2, 3):
    seq(a(n), n=3..75);  # Alois P. Heinz, Feb 05 2021
  • Mathematica
    q[n_] := q[n] = Length[FactorInteger[n]] < 2;
    b[n_, i_, t_] := b[n, i, t] = If[n == 0,
         If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
         If[q[i], b[n - i, Min[n - i, i], t - 1], 0]]];
    a[n_] := b[n, n, 3];
    Table[a[n], {n, 3, 75}] (* Jean-François Alcover, Feb 22 2022, after Alois P. Heinz *)

A341140 Number of partitions of n into 3 distinct prime powers (including 1).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 5, 7, 6, 8, 7, 8, 8, 10, 10, 12, 11, 12, 12, 13, 12, 16, 15, 15, 16, 18, 17, 19, 20, 21, 24, 22, 22, 23, 25, 22, 27, 26, 25, 26, 29, 25, 31, 27, 30, 31, 34, 26, 34, 31, 35, 32, 38, 29, 40, 32, 36, 34, 41, 29, 44, 35, 41, 36, 47, 34, 51, 38, 45, 41, 54
Offset: 6

Views

Author

Ilya Gutkovskiy, Feb 05 2021

Keywords

Crossrefs

Programs

  • Maple
    q:= proc(n) option remember; nops(ifactors(n)[2])<2 end:
    b:= proc(n, i, t) option remember; `if`(n=0,
          `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(q(i), b(n-i, min(n-i, i-1), t-1), 0)))
        end:
    a:= n-> b(n$2, 3):
    seq(a(n), n=6..77);  # Alois P. Heinz, Feb 05 2021
  • Mathematica
    q[n_] := q[n] = PrimeNu[n] < 2;
    b[n_, i_, t_] := b[n, i, t] = If[n == 0,
         If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
         If[q[i], b[n - i, Min[n - i, i - 1], t - 1], 0]]];
    a[n_] := b[n, n, 3];
    Table[a[n], {n, 6, 77}] (* Jean-François Alcover, Jul 13 2021, after Alois P. Heinz *)

A307726 Number of partitions of n into 2 prime powers (not including 1).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Apr 24 2019

Keywords

Examples

			a(10) = 3 because we have [8, 2], [7, 3] and [5, 5].
		

Crossrefs

Programs

  • Maple
    # note that this requires A246655 to be pre-computed
    f:= proc(n, k, pmax) option remember;
      local t, p, j;
      if n = 0 then return `if`(k=0, 1, 0) fi;
      if k = 0 then return 0 fi;
      if n > k*pmax then return 0 fi;
      t:= 0:
      for p in A246655 do
        if p > pmax then return t fi;
        t:= t + add(procname(n-j*p, k-j, min(p-1, n-j*p)), j=1..min(k, floor(n/p)))
      od;
      t
    end proc:
    map(f, [$0..100]); # Robert Israel, Apr 29 2019
  • Mathematica
    Array[Count[IntegerPartitions[#, {2}], _?(AllTrue[#, PrimePowerQ] &)] &, 101, 0]

Formula

a(n) = [x^n y^2] Product_{k>=1} 1/(1 - y*x^A246655(k)).

A307825 Number of partitions of n into 3 distinct prime powers (not including 1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 4, 4, 5, 4, 6, 5, 7, 6, 8, 8, 10, 8, 10, 9, 12, 11, 12, 11, 15, 12, 15, 14, 17, 17, 20, 18, 19, 19, 19, 22, 23, 20, 21, 24, 23, 24, 24, 24, 27, 28, 24, 27, 28, 28, 28, 33, 27, 33, 29, 31, 30, 35, 27, 35, 33, 34, 31, 40, 32, 42, 35, 39, 35, 47, 32
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 30 2019

Keywords

Examples

			a(15) = 4 because we have [9, 4, 2], [8, 5, 2], [8, 4, 3] and [7, 5, 3].
		

Crossrefs

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n, {3}], _?(And[UnsameQ @@ #, AllTrue[#, PrimePowerQ[#] &]] &)], {n, 0, 78}]

Formula

a(n) = [x^n y^3] Product_{k>=1} (1 + y*x^A246655(k)).

A307815 Number of partitions of n into 3 squarefree parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 3, 5, 4, 5, 5, 7, 7, 9, 8, 11, 11, 13, 11, 15, 14, 18, 15, 20, 19, 23, 20, 24, 24, 27, 24, 30, 29, 34, 30, 37, 36, 42, 36, 45, 44, 50, 44, 54, 54, 59, 52, 62, 63, 68, 57, 69, 70, 78, 65, 78, 78, 88, 74, 86, 87, 98, 84, 98, 98, 107, 93, 109, 108, 120, 102, 124, 123
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 30 2019

Keywords

Examples

			a(10) = 4 because we have [7, 2, 1], [6, 3, 1], [6, 2, 2] and [5, 3, 2].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0$3], `if`(i<1, 0, b(n, i-1)+
          `if`(numtheory[issqrfree](i), [0, b(n-i, min(i, n-i))[1..3][]], 0)))
        end:
    a:= n-> b(n$2)[4]:
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 30 2019
  • Mathematica
    Array[Count[IntegerPartitions[#, {3}], _?(AllTrue[#, SquareFreeQ] &)] &, 75, 0]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, {1, 0, 0, 0}, If[i < 1, {0, 0, 0, 0}, b[n, i - 1] + If[SquareFreeQ[i], {0, Sequence @@ b[n - i, Min[i, n - i]][[1 ;; 3]]}, {0, 0, 0, 0}]]];
    a[n_] := b[n, n][[4]];
    a /@ Range[0, 80] (* Jean-François Alcover, Jun 06 2021, after Alois P. Heinz *)

Formula

a(n) = [x^n y^3] Product_{k>=1} 1/(1 - mu(k)^2*y*x^k).
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} mu(i)^2 * mu(k)^2 * mu(n-i-k)^2, where mu is the Mobius function. - Wesley Ivan Hurt, May 09 2019
Showing 1-5 of 5 results.