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

A144116 Number of non-Fibonacci parts in all partitions of n.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 5, 9, 14, 23, 34, 54, 76, 113, 158, 226, 309, 431, 580, 790, 1049, 1402, 1838, 2423, 3140, 4081, 5242, 6739, 8574, 10918, 13780, 17392, 21795, 27291, 33969, 42248, 52258, 64572, 79429, 97577, 119388, 145891, 177630, 215986, 261789
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2008

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; true end: l:= [0, 1]: for k to 100 do b(l[1]):= false; l:= [l[2], l[1]+l[2]] od: aa:= proc(n, i) option remember; local g, h; if n=0 then [1, 0] elif i=0 or n<0 then [0, 0] else g:= aa(n, i-1); h:= aa(n-i, i); [g[1]+h[1], g[2]+h[2] +`if`(b(i), h[1], 0)] fi end: a:= n-> aa(n, n)[2]: seq(a(n), n=1..60); # Alois P. Heinz, Jul 28 2009
  • Mathematica
    Clear[b]; b[] = True; l = {0, 1}; For[k=1, k <= 100, k++, b[l[[1]]] = False; l = {l[[2]], l[[1]] + l[[2]]}]; aa[n, i_] := aa[n, i] = Module[{g, h}, If[n==0, {1, 0}, If[i==0 || n<0, {0, 0}, g = aa[n, i-1]; h = aa[n-i, i]; {g[[1]] + h[[1]], g[[2]] + h[[2]] + If[b[i], h[[1]], 0]}] ]]; a[n_] := aa[n, n][[2]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jul 30 2015, after Alois P. Heinz *)

Formula

a(n) = A006128(n)-A144115(n).

Extensions

More terms from Alois P. Heinz, Jul 28 2009

A144121 Number of nonprime parts in the last section of the set of partitions of n.

Original entry on oeis.org

1, 1, 2, 4, 5, 9, 12, 20, 26, 39, 51, 76, 96, 136, 175, 241, 304, 412, 517, 686, 859, 1117, 1392, 1794, 2217, 2818, 3478, 4373, 5363, 6694, 8168, 10113, 12295, 15105, 18289, 22347, 26932, 32712, 39302, 47481, 56825, 68347
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2008

Keywords

Comments

First differences of A144119.

Crossrefs

Formula

a(n) = A138137(n)-A144120(n) = A144119(n)-A144119(n-1).

A326957 Total number of noncomposite parts in all partitions of n.

Original entry on oeis.org

0, 1, 3, 6, 11, 19, 32, 50, 77, 115, 170, 244, 348, 486, 675, 923, 1253, 1682, 2246, 2968, 3904, 5094, 6616, 8533, 10962, 13997, 17808, 22538, 28426, 35689, 44670, 55678, 69199, 85692, 105826, 130261, 159935, 195778, 239092, 291191, 353854, 428925, 518848
Offset: 0

Views

Author

Omar E. Pol, Aug 08 2019

Keywords

Examples

			For n = 6 we have:
--------------------------------------
.                        Number of
Partitions             noncomposite
of 6                       parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 2
4 + 2 ...................... 1
2 + 2 + 2 .................. 3
5 + 1 ...................... 2
3 + 2 + 1 .................. 3
4 + 1 + 1 .................. 2
2 + 2 + 1 + 1 .............. 4
3 + 1 + 1 + 1 .............. 4
2 + 1 + 1 + 1 + 1 .......... 5
1 + 1 + 1 + 1 + 1 + 1 ...... 6
------------------------------------
Total ..................... 32
So a(6) = 32.
		

Crossrefs

First differs from A183088 at a(13).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, n], b(n, i-1)+
          (p-> p+[0, `if`(isprime(i), p[1], 0)])(b(n-i, min(n-i, i))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Aug 13 2019
  • Mathematica
    b[n_] := Sum[PrimeNu[k] PartitionsP[n-k], {k, 1, n}];
    c[n_] := SeriesCoefficient[Product[1/(1-x^k), {k, 1, n}]/(1-x), {x, 0, n}];
    a[n_] := b[n] + c[n-1];
    a /@ Range[0, 50] (* Jean-François Alcover, Nov 15 2020 *)

Formula

a(n) = A037032(n) + A000070(n-1), n >= 1.
a(n) = A006128(n) - A326981(n).

A326981 Total number of composite parts in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 3, 4, 9, 13, 22, 31, 51, 70, 105, 145, 210, 283, 398, 530, 726, 958, 1283, 1673, 2212, 2854, 3714, 4756, 6119, 7764, 9893, 12457, 15728, 19674, 24636, 30615, 38079, 47034, 58109, 71396, 87692, 107179, 130943, 159278, 193619, 234486, 283720
Offset: 0

Views

Author

Omar E. Pol, Aug 09 2019

Keywords

Examples

			For n = 6 we have:
--------------------------------------
.                        Number of
Partitions               composite
of 6                       parts
--------------------------------------
6 .......................... 1
3 + 3 ...................... 0
4 + 2 ...................... 1
2 + 2 + 2 .................. 0
5 + 1 ...................... 0
3 + 2 + 1 .................. 0
4 + 1 + 1 .................. 1
2 + 2 + 1 + 1 .............. 0
3 + 1 + 1 + 1 .............. 0
2 + 1 + 1 + 1 + 1 .......... 0
1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
Total ...................... 3
So a(6) = 3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, 0], b(n, i-1)+
          (p-> p+[0, `if`(isprime(i), 0, p[1])])(b(n-i, min(n-i, i))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Aug 13 2019
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0 || i==1, {1, 0}, b[n, i-1] + # + {0, If[PrimeQ[i], 0, #[[1]]]}&[b[n-i, Min[n-i, i]]]];
    a[n_] := b[n, n][[2]];
    a /@ Range[0, 50] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)

Formula

a(n) = A144119(n) - A000070(n-1), n >= 1.
a(n) = A006128(n) - A326957(n).
Showing 1-4 of 4 results.