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

A341132 Number of partitions of n into 2 distinct prime powers (including 1).

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 5, 4, 3, 2, 5, 3, 4, 4, 5, 3, 6, 3, 6, 5, 6, 4, 7, 2, 5, 4, 6, 3, 6, 3, 6, 5, 5, 2, 8, 3, 7, 4, 6, 2, 8, 3, 7, 4, 5, 2, 8, 3, 6, 4, 6, 3, 9, 2, 8, 5, 7, 2, 10, 3, 7, 6, 7, 3, 9, 2, 9, 4, 6, 4, 11, 3, 8, 4, 7, 3, 12
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-1), t-1), 0)))
        end:
    a:= n-> b(n$2, 2):
    seq(a(n), n=3..90);  # 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, 2];
    Table[a[n], {n, 3, 90}] (* Jean-François Alcover, Jul 13 2021, after Alois P. Heinz *)

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 3, 4, 5, 6, 6, 8, 7, 9, 9, 10, 10, 12, 11, 14, 13, 14, 13, 16, 13, 18, 15, 18, 16, 20, 18, 23, 20, 25, 23, 26, 22, 28, 23, 30, 23, 30, 23, 32, 26, 32, 27, 34, 28, 37, 28, 36, 29, 40, 31, 43, 28, 42, 32, 44, 32, 46, 32, 46, 35, 46, 35, 50, 34, 51, 37, 53, 36, 59, 36, 57, 41
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 24 2019

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    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:
    seq(f(n,3,n),n=0..80) # Robert Israel, Apr 25 2019
  • Mathematica
    Array[Count[IntegerPartitions[#, {3}], _?(AllTrue[#, PrimePowerQ] &)] &, 81, 0]

Formula

a(n) = [x^n y^3] Product_{k>=1} 1/(1 - y*x^A246655(k)).
a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} [omega(i) * omega(j) * omega(n-i-j) == 1], where omega(n) is the number of distinct prime factors of n and [==] is the Iverson bracket. - Wesley Ivan Hurt, Apr 25 2019

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

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Apr 30 2019

Keywords

Examples

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

Crossrefs

Programs

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

Formula

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