There are three differences between my computations and yours. (1) I use Perl (2) I index from zero and (3) I wrote the algorithm myself. Any of these may account for discrepancies between our results, and since you and Brockhaus agree, I will let you be right, it isn't worth it to me to find my error. All I was interested in was whether the observed bunching phenomenon was real, or whether I was totally off the wall. It appears that both you and Brockhaus have confirmed the bunching with period about 21.6. Do you think this is a constant? If so, what would cause this regular bunching? If you plotted the integers 216 per row and colored the Ulams black and the others white, I bet you would get a pretty set of stripes. Anyway, thanks for confirming my observation. ----- Original Message ----- From: "Dan Hoey" <Hoey@aic.nrl.navy.mil> To: "David Wilson" <davidwwilson@attbi.com> Cc: "Math Fun" <math-fun@mailman.xmission.com>; "Klaus Brockhaus" <klaus-brockhaus@t-online.de> Sent: Monday, February 10, 2003 6:07 PM Subject: Re: [math-fun] Ulam(1,2)
"David Wilson" <davidwwilson@attbi.com> wrote:
I took a look at Ulam(1,2), the Ulam sequence starting with (1, 2) and including every subsequent number which is a unique sum of distinct earlier terms. This is Sloane's A002858.
... Can anyone confirm my data?
Did you intend to use zero-based indexing? If u(0)=1, u(1)=2, I concur that u(1000)=12336, u(1999)=25511. Otherwise one of us has a bug. I also get u(10000)=132790, u(50000)=676043, u(74084)=1000002.
But there's a pretty definite bug in the histogram. My histogram of f(n)=(u(n) mod 21.6)/21.6 agrees with yours in its general trend, but differs in particulars. For f(1000...1999) in 20 buckets I get
113 101 119 98 87 70 58 40 31 8 5 0 0 2 4 14 22 64 66 98
rather than your
110 101 120 97 90 67 58 40 31 9 4 0 0 2 7 11 22 64 66 101.
As a test, I find that the five numbers in the [.5,.55) bucket arise from u(1091)=13533 (f=0.527771) u(1210)=14894 (f=0.53704834) u(1730)=21870 (f=0.5) u(1748)=22151 (f=0.50927734) u(1947)=24851 (f=0.50927734). What four numbers do you have?
I agree exactly with Klaus Brockhaus's data for f(1000...1259), so I think I'm slightly likelier to be correct, but only slightly, and I'm pretty suspicious about the zero-based indexing.
My data suggests that 21.6 should be about 21.60157 .
Dan
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun