A003686

A few weeks ago I had an idea for generating this sequence based on the following rules:

  • populate the initial set with [1,2]
  • at each iteration
    • calculate the product of all the elements of the set except the last
    • add the last element to this product and append it to the set

I had a half baked notion that it might generate a set of primes, but was dissappointed at 371.

It seemed unlikely that I was the first person to think of this set, but http://oeis.org/A003686 was the only result for my google search of “1, 2, 3, 5, 11, 41, 371”

No idea what dude is talking about, but I thought it was interesting…

Here is a link to the awk script: primo.awk.

Here is some output before it gets sign extended:

[ 1, 2 ] : 1 + 2 = 3
[ 1, 2, 3 ] : 2 + 3 = 5
[ 1, 2, 3, 5 ] : 6 + 5 = 11
[ 1, 2, 3, 5, 11 ] : 30 + 11 = 41
[ 1, 2, 3, 5, 11, 41 ] : 330 + 41 = 371
[ 1, 2, 3, 5, 11, 41, 371 ] : 13530 + 371 = 13901
[ 1, 2, 3, 5, 11, 41, 371, 13901 ] : 5019630 + 13901 = 5033531
[ 1, 2, 3, 5, 11, 41, 371, 13901, 5033531 ] : 69777876630 + 5033531 = 69782910161
[ 1, 2, 3, 5, 11, 41, 371, 13901, 5033531, 69782910161 ] : 351229105131280512 + 69782910161 = 351229174914190656
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: