[seqfan] Help defining a sequence

Ali Sada pemd70 at yahoo.com
Mon Dec 2 03:05:57 CET 2019


Hi Everyone,

I need some help defining the sequence below. I put several examples in order to make sure my language is clear.   

To find each term of the sequence, we take the numbers from 1 to n and put them in a set. We keep adding the least odd element (or elements) to the least even element (or elements) until we run out of options. 
a(n) is the largest number that results from the operations.
We start with {1}. We have only one element, so a(1)=1

Then we take the set {1,2}.  The smallest odd element is 1 and the smallest even element is 2. We add them and we get a(2)=3

We take the set {1,2,3}. We add 1+2 = 3. Now, we have the multiset {3,3}. We don’t have any even element left, so a(3)=3 (the largest number resulted). 

We take the set {1,2,3,4}. We add 1 to 2 we get 3. Now we have the multiset {3,3,4}. Since we have two least odd elements, we add them both to the even element (4) and we get a(4)=10.

Now we take the set {1,2,3,4,5}. We add 1 and 2 and we get the multiset {3,3,4,5}. We add the two 3’s to 4 and we get 10. Now we have the set {10,5}. It still has an odd element and an even element, so we continue. 10+5=15. a(5)=15.

For the set {1,2,3,4,5,6}, the steps will be the same as before until we reach the set {10,5,6}. We add the least odd element (5) to the least even element (6) and we get the set {10,11}. We still have an odd element and an even element, so we add them. a(6)=10+11=21.

For the set {1,2,3,4,5,6,7} we have the same steps as before until we get the set {10,5,6,7}. The least odd element in this set is 5, and the least even element is 6. We add them and we get 11. The new resulted set is {10,11,7}. Now, we add the least odd element (7) to the least even element (10) and we get 17. The resulted set is {11,17}. We ran out of even elements, and the largest number we got was 17. So, a(7)=17.

Writing a program to find the terms of this sequence in VBA/Excel was difficult. I would really appreciate it if you could help me find the necessary terms for an OEIS sequence. 

The terms I found so far (and I might have made a mistake somewhere) are:

1, 3, 3, 10, 15, 21, 17, 21, 19, 29, 29, 49, 47, 49, 91, 75, 73, 75, 73, 75, 67, 83, 73, 75, 81, 75, 123, 121

Best,

Ali





More information about the SeqFan mailing list