Hi,


I don't have my PC at hand now, but what is the problem with your calculation?

I had never heard of Nivens constant, but looking at Wikipedia there is a 
formula for it containing the zeta function.

Why not use this formula?

Zeta 2 3 4 are well known constants, and you can calculate or hardcode the 
values for other even arguments, 
https://en.m.wikipedia.org/wiki/Particular_values_of_Riemann_zeta_function 

You might need to calculate bernoulli numbers.


For odd values I think you need to calculate from scratch, but since zeta 14 is 
almost 1 you don't need to do too many calculations, just from 5 to 15, say. 


This is just thinking out loud. But my main point is you only probably need the 
first 15 or so zeta values before convergence is 'good enough'.


Regards,

Jon






On Wed, Jul 6, 2016 at 12:12 AM +0900, "mikel paternain" 
<mikelpa...@hotmail.es> wrote:











________________________________
De: mikel paternain 
Enviado: domingo, 3 de julio de 2016 12:07:37
Para: programming@forums.jsoftware.com
Asunto: Niven's constant

Hi,

I need improve the code for calculating Niven's constant. Could you help me?

A first test is (see "Computo ergo sum" section in JoJ):

exp=:+/"1@=@q:
max=:>./
a=.max@exp(2+1.1000)
C=.(+/%#)a

Thanks in advance,

Mikel Paternain


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to