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

A121548 Triangle read by rows: T(n,k) is the number of compositions of n into k Fibonacci numbers (1 <= k <= n; only one 1 is considered as a Fibonacci number).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 0, 3, 3, 1, 1, 2, 6, 4, 1, 0, 3, 7, 10, 5, 1, 0, 2, 9, 16, 15, 6, 1, 1, 2, 9, 23, 30, 21, 7, 1, 0, 2, 10, 28, 50, 50, 28, 8, 1, 0, 3, 9, 34, 71, 96, 77, 36, 9, 1, 0, 2, 12, 36, 95, 156, 168, 112, 45, 10, 1, 0, 0, 12, 43, 115, 231, 308, 274, 156, 55, 11, 1, 1, 2, 9, 48, 140, 312, 504, 560, 423, 210, 66, 12, 1
Offset: 1

Views

Author

Emeric Deutsch, Aug 07 2006

Keywords

Examples

			T(5,3)=6 because we have [1,2,2], [2,1,2], [2,2,1], [1,1,3], [1,3,1] and [3,1,1].
Triangle starts:
  1;
  1,  1;
  1,  2,  1;
  0,  3,  3,  1;
  1,  2,  6,  4,  1;
  0,  3,  7, 10,  5,  1;
  0,  2,  9, 16, 15,  6,  1;
  ...
		

Crossrefs

T(2n,n) gives A341072.

Programs

  • Maple
    with(combinat): G:=1/(1-t*sum(z^fibonacci(i),i=2..40))-1: Gser:=simplify(series(G,z=0,25)): for n from 1 to 23 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 1 to 15 do seq(coeff(P[n],t,j),j=1..n) od; # yields sequence in triangular form
    # second Maple program:
    g:= proc(n) g(n):= (t-> issqr(t+4) or issqr(t-4))(5*n^2) end:
    T:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(g(j), T(n-j, t-1), 0), j=1..n)))
        end:
    seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Oct 10 2022
  • Mathematica
    nmax = 14;
    T = Rest@CoefficientList[#, t]& /@ Rest@(1/(1 - t*Sum[z^Fibonacci[i],
         {i, 2, nmax}]) - 1 + O[z]^(nmax+1) // CoefficientList[#, z]&);
    Table[T[[n, k]], {n, 1, nmax}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 02 2022 *)

Formula

G.f.: G(t,z) = 1 / (1 - t*Sum_{i>=2} z^Fibonacci(i)) - 1.
Sum of terms in row n = A076739(n).
T(n,1) = A010056(n) (the characteristic function of the Fibonacci numbers);
T(n,2) = A121549(n);
T(n,3) = A121550(n);
Sum_{k=1..n} k*T(n,k) = A121551(n).

A341071 Number of compositions of 2n into n squarefree parts.

Original entry on oeis.org

1, 1, 3, 7, 23, 76, 267, 932, 3263, 11410, 40028, 140955, 498467, 1769249, 6299282, 22485487, 80435919, 288275461, 1034862558, 3720499175, 13393720428, 48275699654, 174194970601, 629187941167, 2274710068067, 8230764250326, 29805342037721, 108009638665648
Offset: 0

Views

Author

Alois P. Heinz, Feb 04 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`(numtheory[issqrfree](j), b(n-j, t-1), 0), j=1..n)))
        end:
    a:= n-> b(2*n, n):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, t_] := b[n, t] =
      If[n == 0, If[t == 0, 1, 0], If[t < 1, 0, Sum[
      If[SquareFreeQ[j], b[n - j, t - 1], 0], {j, 1, n}]]];
    a[n_] := b[2n, n];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 26 2023, from Maple program *)

Formula

a(n) ~ c * d^n / sqrt(n), where d = 3.6921332109291502908930783402282652076342401140592914... and c = 0.27220098720735952890181498005903942865018992276116... - Vaclav Kotesovec, Feb 14 2021
Showing 1-2 of 2 results.