[seqfan] Re: How to generate A000047?

Giovanni Resta g.resta at iit.cnr.it
Sat Jan 24 09:11:05 CET 2009


Harry J. Smith wrote:
> This program had a problem for n > 30. I think I have fixed it:
>   
Yes, thanks. I discovered it too, it was the missing cast in

(long long)D[k]*D[k]<=n;

In the meantime I also implemented a suggestion by
Ray Chandler which cut the time in two:
an odd number cannot be representable if it is
equal to 3 or 5 mod 8.

Using that I was able to compute 
the values up to 33 in 645 minutes. 
(Ray confirmed the values up to 32 with a Mathematica program).
Now I'm computing the 34th value and then I'll stop the program.
Each new value needs, on my PC, about 2.62 times the time for the
previous, so the next one will appear after 645*2.62 minutes since
I run the program, which means about 28 hours.
Since it does not seems that this problem is that interesting, I 
think I'll stop there and I'll submit the new values up to 34th to OEIS.

If , for some unknown reason, one really wants more values, it is worth 
noting
that this problem is highly parallelizable.

giovanni





More information about the SeqFan mailing list