login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A210737 Number of Dyck n-paths all of whose ascents have prime lengths. 4

%I #17 Apr 28 2018 18:17:05

%S 1,0,1,1,2,6,8,29,50,141,327,771,2047,4746,12644,30941,79886,204885,

%T 522242,1365056,3505825,9185742,23907116,62636476,164624803,432540010,

%U 1142827935,3017208675,7996379870,21211540268,56369770281,150086840133,400009010758

%N Number of Dyck n-paths all of whose ascents have prime lengths.

%H Alois P. Heinz, <a href="/A210737/b210737.txt">Table of n, a(n) for n = 0..700</a>

%F a(n) ~ c * d^n / n^(3/2), where d = 2.7925684676903082567..., c = 0.4016264581712556... . - _Vaclav Kotesovec_, Sep 02 2014

%e a(0) = 1: the empty path.

%e a(1) = 0.

%e a(2) = 1: UUDD.

%e a(3) = 1: UUUDDD.

%e a(4) = 2: UUDDUUDD, UUDUUDDD.

%e a(5) = 6: UUDDUUUDDD, UUDUUUDDDD, UUUDDDUUDD, UUUDDUUDDD, UUUDUUDDDD, UUUUUDDDDD.

%e a(6) = 8: UUDDUUDDUUDD, UUDDUUDUUDDD, UUDUUDDDUUDD, UUDUUDDUUDDD, UUDUUDUUDDDD, UUUDDDUUUDDD, UUUDDUUUDDDD, UUUDUUUDDDDD.

%p with(numtheory):

%p b:= proc(x, y, u) option remember;

%p `if`(x<0 or y<x, 0, `if`(x=0 and y=0, 1, b(x, y-1, true)+

%p `if`(u, add(b(x-ithprime(t), y, false), t=1..pi(x)), 0)))

%p end:

%p a:= n-> b(n, n, true):

%p seq(a(n), n=0..40);

%t b[x_, y_, u_] := b[x, y, u] = If[x<0 || y<x, 0, If[x == 0 && y == 0, 1, b[x, y-1, True] + If[u, Sum [b[x-Prime[t], y, False], {t, 1, PrimePi[x]}], 0]]]; a[n_] := b[n, n, True]; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Feb 13 2015, after _Alois P. Heinz_ *)

%o (PARI) seq(n)={Vec(serreverse(x/(1 + sum(i=2, n, if(isprime(i), x^i))) + O(x*x^n)))} \\ _Andrew Howroyd_, Apr 28 2018

%Y Cf. A210735.

%K nonn

%O 0,5

%A _Alois P. Heinz_, May 10 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:06 EDT 2024. Contains 371962 sequences. (Running on oeis4.)