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.

A354621 Number of n-tuples (p_1, p_2, ..., p_n) of positive integers such that p_{i-1} <= p_i <= prime(i).

This page as a plain text file.
%I A354621 #21 Jan 04 2023 17:08:52
%S A354621 1,2,5,19,85,586,3583,28568,195449,1666786,18757980,161386953,
%T A354621 1897428757,20910643255,186584844271,1896239913403,23753305611756,
%U A354621 322385257985845,3291722491175736,43011227141438328,517673545204963277,5056620552149902641,65366993167319822971
%N A354621 Number of n-tuples (p_1, p_2, ..., p_n) of positive integers such that p_{i-1} <= p_i <= prime(i).
%C A354621 The number of n-tuples of primes with p_{i-1} <= p_i <= prime(i) give A000108.
%H A354621 Alois P. Heinz, <a href="/A354621/b354621.txt">Table of n, a(n) for n = 0..754</a>
%F A354621 a(n) = Sum_{j=0..n-1} a(j)*(-1)^(n+1-j)*binomial(prime(j+1),n-j) with a(0) = 1.
%F A354621 Sum_{n>=0} a(n)*x^n * (1-x)^prime(n+1) = 1.
%e A354621 a(0) = 1: ( ).
%e A354621 a(1) = 2: (1), (2).
%e A354621 a(2) = 5: (1,1), (1,2), (1,3), (2,2), (2,3).
%p A354621 b:= proc(n, i) option remember; `if`(n=0, 1,
%p A354621       add(b(n-1, j), j=1..min(i, ithprime(n))))
%p A354621     end:
%p A354621 a:= n-> b(n, infinity):
%p A354621 seq(a(n), n=0..23);
%p A354621 # second Maple program:
%p A354621 a:= proc(n) option remember; `if`(n=0, 1, -add(a(j)*
%p A354621       (-1)^(n-j)*binomial(ithprime(j+1), n-j), j=0..n-1))
%p A354621     end:
%p A354621 seq(a(n), n=0..23);
%t A354621 a[n_] := a[n] = If[n == 0, 1, -Sum[a[j]*(-1)^(n - j)* Binomial[Prime[j + 1], n - j], {j, 0, n - 1}]];
%t A354621 Table[a[n], {n, 0, 23}] (* _Jean-François Alcover_, Dec 28 2022, after second Maple program *)
%Y A354621 Cf. A000040, A000108, A325057.
%K A354621 nonn
%O A354621 0,2
%A A354621 _Alois P. Heinz_, Jul 08 2022