Are A055999 and A074171 somehow the same?

T. D. Noe noe at sspectra.com
Mon Oct 4 22:39:29 CEST 2004


>A055999 is a(n)=n*(n+7)/2, which works out to be ((n^2 - n)/2) - 3n
>>with a different offset. A074171 is Start with 1, add the next number
>>if one gets a prime then subtract the next number else add the next.
>
>I'm unable to understand how A74171 is generated.  For instance, with
>a(4)=4, add the next number, 5, gives 9, composite, so 4+5 = 9 is the next
>term.  Then a(5)=9, add the  next number (10?), gives 19, prime, so
>subtract 10 from 9?  What am I doing wrong?

Here's how A074171 works:

a(1) = 1
a(2) = a(1) + 2 = 3, which is prime, so
a(3) = a(2) - 3 = 0, which is not prime, so
a(4) = a(3) + 4 = 4, which is not prime

Let's assume no more primes are generated, so that all remaining terms are
added:

a(n) = a(n-1) + n for n > 3, which yields

a(n) = (n-3)(n+4)/2 for n >= 3

This shows that all subsequence terms are composite -- as we assumed.

This is a shifted version of A055999.

Tony






More information about the SeqFan mailing list