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.

A383870 Number of compositions of n such that none of the smallest parts are adjacent.

Original entry on oeis.org

1, 1, 1, 3, 4, 9, 15, 29, 53, 98, 180, 336, 618, 1142, 2110, 3899, 7197, 13283, 24509, 45218, 83396, 153769, 283463, 522449, 962732, 1773742, 3267417, 6018030, 11082693, 20407174, 37572633, 69169726, 127326924, 234362474, 431343281, 793831500, 1460854117
Offset: 0

Views

Author

John Tyler Rascoe, May 13 2025

Keywords

Examples

			a(5) = 9 counts: (1,2,2), (1,3,1), (1,4), (2,1,2), (2,2,1), (2,3), (3,2), (4,1), (5).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(i<1, 0,
         `if`(irem(n, i, 'r')=0, p!*binomial(p+1, r), 0)+
          add(b(n-i*j, min(n-i*j, i-1), p+j)/j!, j=0..n/i))
        end:
    a:= n-> `if`(n=0, 1, b(n$2, 0)):
    seq(a(n), n=0..36);  # Alois P. Heinz, May 13 2025
  • PARI
    A_x(N) ={Vec(1+sum(j=0,N, sum(i=j+1,N-j, (binomial(i,i-j-1) * x^(j+1) * (x^2/(1-x))^(i-1) )/(1-x^(i+j))))+O('x^N))}
    A_x(50)

Formula

G.f.: 1 + Sum_{j>=0} Sum_{i>j} (binomial(i,i-j-1) * x^(j+1) * (x^2/(1 - x))^(i-1))/(1 - x^(i+j)).