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}]


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.

  • $\begingroup$ 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? $\endgroup$ – Daniel Huber Apr 9 at 19:59
  • $\begingroup$ You have a syntax error. Log[-gcrel - E^(-gcrel nmax)/nmax]^K[1] is how you raise Log to a power. $\endgroup$ – Bob Hanlon Apr 9 at 21:23
  • $\begingroup$ 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. $\endgroup$ – Jose Luis Riccardo Apr 13 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.