OFFSET
1,2
COMMENTS
By definition, this sequence never repeats its values.
LINKS
Omer Demir, Table of n, a(n) for n = 1..10000
EXAMPLE
a(6) = 4. Therefore, ceiling(a(6) / 2) is equal to 2, and a(7) should be 1 * 2 + 1 = 3. However, since 3 can already be found in the sequence (coincidentally, at position n = 3), one must iterate the function again to get a(7) = 3 * 2 + 1 = 7. But 7 is also already in the sequence (at position n = 4), so the function must be iterated once more to find that a(7) is indeed equal to 7 * 2 + 1 = 15.
PROG
(Python)
from math import ceil
sequence = [1]
terms = 1000
for n in range(2, terms + 1):
nextnum = 1
while nextnum in sequence:
nextnum = nextnum * ceil(sequence[-1] / 2) + 1
sequence.append(nextnum)
print(sequence)
CROSSREFS
KEYWORD
nonn
AUTHOR
Omer Demir, May 30 2020
STATUS
approved