OFFSET
0,3
COMMENTS
In this sequence the forward step is reduced from n to ceiling(n/2). As a result, the number of distinct numbers in the sequence as a percentage of the biggest number in the sequence (called "coverage") is increased. For example, for n<=1000000, the number of distinct numbers in this sequence is 694811 and the biggest number is 4350902, giving a coverage of about 15.97% (694811/4350902), higher than that of A005132 (736749/5946126, or about 12.39%).
The smallest missing numbers, h1, from the first m terms of the sequence, given as h1(m), are: 3(6), 5(46), 8(74), 22(646), 33(2551), 114(6009), 166(95445), 331(591310), ... In other words, all integers less than or equal to h1 can be found in the first m+1 terms of the sequence.
PROG
(Python)
import math
n_max = 1000000
a_last = 0
list1 = [a_last]
print(0)
for n in range(1, n_max+1):
m = a_last - n
if m >= 0 and m not in list1:
a = m
else:
a = a_last + math.ceil(n/2)
list1.append(a)
print(a)
a_last = a
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Jun 29 2020
STATUS
approved