Skip to main content
Commonmark migration
Source Link

#JavaScript (ES6), 63

JavaScript (ES6), 63

Implementing the recursive formula at OEIS page

F=(n,p=1,t=0,q=0)=>p<n?eval("for(;q++<=p;)t+=F(n-p,q)"):p>n?0:1

#JavaScript (ES6), 63

Implementing the recursive formula at OEIS page

F=(n,p=1,t=0,q=0)=>p<n?eval("for(;q++<=p;)t+=F(n-p,q)"):p>n?0:1

JavaScript (ES6), 63

Implementing the recursive formula at OEIS page

F=(n,p=1,t=0,q=0)=>p<n?eval("for(;q++<=p;)t+=F(n-p,q)"):p>n?0:1
Source Link
edc65
  • 32.2k
  • 3
  • 36
  • 90

#JavaScript (ES6), 63

Implementing the recursive formula at OEIS page

F=(n,p=1,t=0,q=0)=>p<n?eval("for(;q++<=p;)t+=F(n-p,q)"):p>n?0:1