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.

A144118 Number of non-Fibonacci parts in the last section of the set of partitions of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 2, 4, 5, 9, 11, 20, 22, 37, 45, 68, 83, 122, 149, 210, 259, 353, 436, 585, 717, 941, 1161, 1497, 1835, 2344, 2862, 3612, 4403, 5496, 6678, 8279, 10010, 12314, 14857, 18148, 21811, 26503, 31739, 38356, 45803, 55066, 65553, 78488, 93129
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2008

Keywords

Comments

First differences of A144116.

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] -aa(n-1, n-1)[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]]}]; a[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]] - aa[n-1, n-1][[2]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Dec 05 2016 after Alois P. Heinz *)

Formula

a(n) = A138137(n)-A144117(n) = A144116(n)-A144116(n-1).

Extensions

More terms from Alois P. Heinz, Jul 28 2009

A144119 Total number of nonprime parts in all partitions of n.

Original entry on oeis.org

1, 2, 4, 8, 13, 22, 34, 54, 80, 119, 170, 246, 342, 478, 653, 894, 1198, 1610, 2127, 2813, 3672, 4789, 6181, 7975, 10192, 13010, 16488, 20861, 26224, 32918, 41086, 51199, 63494, 78599, 96888, 119235, 146167, 178879, 218181, 265662, 322487, 390834, 472343
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2008

Keywords

Comments

a(n) is also the sum of the differences between the sum of m-th largest and the sum of (m+1)st largest elements in all partitions of n for all nonprimes m. - Omar E. Pol, Oct 27 2012

Examples

			From _Omar E. Pol_, Nov 20 2011 (Start):
For n = 6 we have:
--------------------------------------
.                        Number of
Partitions            nonprime parts
--------------------------------------
6 .......................... 1
3 + 3 ...................... 0
4 + 2 ...................... 1
2 + 2 + 2 .................. 0
5 + 1 ...................... 1
3 + 2 + 1 .................. 1
4 + 1 + 1 .................. 3
2 + 2 + 1 + 1 .............. 2
3 + 1 + 1 + 1 .............. 3
2 + 1 + 1 + 1 + 1 .......... 4
1 + 1 + 1 + 1 + 1 + 1 ...... 6
------------------------------------
Total ..................... 22
So a(6) = 22. (End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 then [1, 0]
        elif i<1 then [0, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(isprime(i), 0, g[1])]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0, {1, 0}, If[i<1, {0, 0}, g = If[i>n, {0, 0}, b[n-i, i]]; b[n, i-1] + g + {0, If[PrimeQ[i], 0, g[[1]]]} ]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 29 2015, after Alois P. Heinz *)
  • PARI
    vector(100, n, sum(k=1, n, (numdiv(k)-omega(k))*numbpart(n-k))) \\ Altug Alkan, Oct 29 2015

Formula

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

A144120 Number of prime parts in the last section of the set of partitions of n.

Original entry on oeis.org

0, 1, 1, 2, 3, 6, 7, 12, 16, 25, 32, 48, 61, 88, 113, 154, 198, 267, 337, 446, 563, 730, 915, 1174, 1460, 1853, 2294, 2878, 3545, 4416, 5404, 6679, 8144, 9991, 12125, 14791, 17866, 21677, 26084, 31478, 37733, 45340
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2008

Keywords

Comments

First differences of A037032.

Crossrefs

Formula

a(n) = A037032(n)-A037032(n-1).
Showing 1-3 of 3 results.