# BellY function call fails

I would very much appreciate to get an answer about the reason of the message I get calling the BellY function.

f1[nmax_, gcrel_, j_Integer] := Sum[
BellY[j, K[1], Table[-(-gcrel)^K[2] gcrel, {K[2], 1, 1+j-K[1]}]]
(Log^(K[1]))[-gcrel-E^(-gcrel nmax)/nmax], {K[1], 1, j}]

N[f1[1,0,1]]


I get this message.

BellY::intnm: Non-negative machine-sized integer expected at position 1 in BellY[1.,1.,Table[0.^(1. +K[2.]),{K[2.],1.,1.}]].

Out[1270]=-1. BellY[1.,1.,Table[0.^(1. +K[2.]),{K[2.],1.,1.}]]

It is my first time in this forum. Thank you for your help.

• MMA version 12.1 If I try f1[1,0,1]I get a result of zero without any error messages. Have you tried a new kernel? – Daniel Huber Apr 9 at 19:59
• You have a syntax error. Log[-gcrel - E^(-gcrel nmax)/nmax]^K[1] is how you raise Log to a power. – Bob Hanlon Apr 9 at 21:23
• Thank you Daniel and Bob very much!!. I changed the syntax as pointed out , however I still get the same message back. I’ll to use a new version of Mathematica like the 12.1. Thanks much again. – Jose Luis Riccardo Apr 13 at 0:06