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

A341461 Number of partitions of n into 3 distinct nonprime parts.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 2, 2, 4, 3, 4, 4, 6, 5, 8, 7, 9, 9, 10, 12, 14, 14, 14, 17, 19, 19, 22, 23, 24, 28, 27, 31, 33, 35, 36, 40, 40, 44, 47, 49, 50, 55, 53, 61, 62, 66, 65, 73, 72, 79, 81, 86, 85, 95, 91, 101, 101, 109, 107, 119, 114, 125, 125, 134, 134
Offset: 11

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    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`(isprime(i), 0, b(n-i, min(n-i, i-1), t-1))))
        end:
    a:= n-> b(n$2, 3):
    seq(a(n), n=11..75);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    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[PrimeQ[i], 0, b[n - i, Min[n - i, i - 1], t - 1]]]];
    a[n_] := b[n, n, 3];
    a /@ Range[11, 75] (* Jean-François Alcover, Jul 01 2021, after Alois P. Heinz *)
  • Python
    from functools import lru_cache
    from sympy import isprime
    @lru_cache(maxsize=None)
    def b(n, i, t):
      if n == 0: return int(t == 0)
      if i < 1 or t < 1: return 0
      b2 = 0 if isprime(i) else b(n-i, min(n-i, i-1), t-1)
      return b(n, i-1, t) + b2
    a = lambda n: b(n, n, 3)
    print([a(n) for n in range(11, 76)]) # Michael S. Branicky, Feb 12 2021 after Alois P. Heinz

A341451 Number of partitions of n into 4 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 5, 7, 8, 9, 10, 13, 13, 17, 17, 22, 21, 27, 27, 34, 34, 41, 40, 51, 49, 62, 59, 71, 70, 86, 82, 101, 97, 117, 112, 135, 131, 155, 150, 180, 170, 202, 196, 228, 222, 259, 248, 291, 281, 324, 314, 361, 348, 404, 388, 445, 431
Offset: 4

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    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`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 4):
    seq(a(n), n=4..69);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    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[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1]]]];
    a[n_] := b[n, n, 4];
    Table[a[n], {n, 4, 69}] (* Jean-François Alcover, Aug 19 2021, after Alois P. Heinz *)

A341452 Number of partitions of n into 5 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 9, 9, 12, 14, 16, 18, 22, 24, 29, 31, 38, 40, 49, 50, 62, 65, 77, 81, 97, 98, 120, 122, 144, 149, 176, 178, 212, 214, 251, 255, 299, 304, 352, 355, 412, 417, 482, 485, 559, 564, 643, 650, 742, 745, 850, 856, 965
Offset: 5

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    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`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 5):
    seq(a(n), n=5..68);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    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[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1]]]];
    a[n_] := b[n, n, 5];
    Table[a[n], {n, 5, 68}] (* Jean-François Alcover, Aug 19 2021, after Alois P. Heinz *)

A341453 Number of partitions of n into 6 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 9, 10, 12, 15, 16, 20, 23, 27, 30, 36, 40, 48, 53, 62, 68, 81, 87, 105, 112, 130, 141, 166, 176, 208, 219, 256, 271, 314, 331, 385, 403, 468, 488, 561, 588, 674, 702, 804, 837, 952, 991, 1126, 1168, 1321, 1372
Offset: 6

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    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`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 6):
    seq(a(n), n=6..67);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    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[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1], 0]]];
    a[n_] := b[n, n, 6];
    Table[a[n], {n, 6, 67}] (* Jean-François Alcover, Feb 23 2022, after Alois P. Heinz *)
    Table[Count[IntegerPartitions[n,{6}],?(NoneTrue[#,PrimeQ]&)],{n,6,70}] (* _Harvey P. Dale, Feb 21 2023 *)

A341457 Number of partitions of n into 9 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 9, 10, 12, 15, 17, 20, 24, 28, 32, 38, 44, 51, 60, 67, 79, 91, 104, 120, 138, 154, 180, 203, 232, 262, 300, 335, 385, 428, 489, 543, 620, 688, 782, 861, 979, 1078, 1222, 1341, 1518, 1661, 1875, 2048, 2308
Offset: 9

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    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`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 9):
    seq(a(n), n=9..68);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    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[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1], 0]]];
    a[n_] := b[n, n, 9];
    Table[a[n], {n, 9, 68}] (* Jean-François Alcover, Feb 23 2022, after Alois P. Heinz *)

A341454 Number of partitions of n into 7 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 9, 10, 12, 15, 17, 20, 24, 27, 32, 37, 43, 49, 58, 64, 76, 85, 99, 111, 129, 140, 166, 182, 210, 230, 267, 290, 336, 362, 418, 451, 519, 559, 640, 685, 784, 837, 956, 1020, 1158, 1232, 1397, 1483, 1677, 1776
Offset: 7

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    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`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 7):
    seq(a(n), n=7..67);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    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[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1], 0]]];
    a[n_] := b[n, n, 7];
    Table[a[n], {n, 7, 67}] (* Jean-François Alcover, Feb 23 2022, after Alois P. Heinz *)

A341455 Number of partitions of n into 8 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 9, 10, 12, 15, 17, 20, 24, 28, 32, 38, 43, 51, 59, 67, 77, 90, 101, 119, 133, 152, 172, 199, 220, 256, 283, 325, 359, 412, 453, 520, 569, 652, 711, 810, 882, 1005, 1091, 1238, 1341, 1519, 1641, 1854, 1999
Offset: 8

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    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`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 8):
    seq(a(n), n=8..67);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    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[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1], 0]]];
    a[n_] := b[n, n, 8];
    Table[a[n], {n, 8, 67}] (* Jean-François Alcover, Feb 23 2022, after Alois P. Heinz *)

A341480 Number of ways to write n as an ordered sum of 3 nonprime numbers.

Original entry on oeis.org

1, 0, 0, 3, 0, 3, 3, 3, 9, 4, 9, 12, 12, 15, 21, 19, 27, 30, 30, 39, 42, 46, 54, 60, 61, 75, 72, 91, 90, 108, 99, 129, 123, 142, 147, 168, 156, 201, 180, 217, 213, 246, 235, 279, 255, 304, 297, 336, 327, 375, 342, 412, 390, 447, 423, 492, 453, 529, 507, 573, 538, 630, 579
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 13 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(isprime(j), 0, b(n-j, t-1)), j=1..n)))
        end:
    a:= n-> b(n, 3):
    seq(a(n), n=3..65);  # Alois P. Heinz, Feb 13 2021
  • Mathematica
    nmax = 65; CoefficientList[Series[Sum[Boole[!PrimeQ[k]] x^k, {k, 1, nmax}]^3, {x, 0, nmax}], x] // Drop[#, 3] &

Formula

G.f. g(x)^3 where g(x) is the G.f. of A005171.

A341460 Number of partitions of n into 10 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 9, 10, 12, 15, 17, 20, 24, 28, 32, 38, 44, 51, 60, 68, 79, 92, 104, 122, 139, 157, 181, 208, 234, 270, 304, 347, 391, 445, 499, 569, 636, 724, 805, 913, 1015, 1150, 1274, 1440, 1592, 1796, 1980, 2231, 2455
Offset: 10

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    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`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 10):
    seq(a(n), n=10..69);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    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[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1], 0]]];
    a[n_] := b[n, n, 10];
    Table[a[n], {n, 10, 69}] (* Jean-François Alcover, Feb 28 2022, after Alois P. Heinz *)
    Table[Count[IntegerPartitions[n,{10}],?(NoneTrue[#,PrimeQ]&)],{n,10,70}] (* _Harvey P. Dale, Sep 01 2024 *)
Showing 1-9 of 9 results.