OFFSET
0,2
COMMENTS
See A357379 for the corresponding products.
The sequence is well defined; we can always extend it with a value strictly greater than the square of the greatest value so far.
The sequence is unbounded (otherwise we could only have a finite number of products a(floor(n/2)) * a(n), and therefore a finite number of terms).
For any prime number p: the first term >= p is p.
All prime numbers appear in the sequence.
If a(n) is the first occurrence of some prime number p, then a(m) = 1 for some m in the interval floor(n/2)..2*n.
There are infinitely many 1's in the sequence; as a consequence, every positive integer appears in A357379.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, Density plot of the first 10000000 terms
Rémy Sigrist, C program
FORMULA
a(2*n + 1) > a(2*n).
EXAMPLE
The first terms are:
n a(n) a(floor(n/2)) a(floor(n/2))*a(n)
-- ---- ------------- ------------------
0 1 1 1
1 2 1 2
2 2 2 4
3 3 2 6
4 4 2 8
5 5 2 10
6 1 3 3
7 3 3 9
8 3 4 12
9 4 4 16
10 1 5 5
11 3 5 15
12 7 1 7
PROG
(C) See Links section.
(Python)
from itertools import count, islice
def agen(): # generator of terms
alst, disallowed = [1], {1}; yield 1
for n in count(1):
ahalf, k = alst[n//2], 1
while ahalf*k in disallowed: k += 1
an = k; yield an; alst.append(an); disallowed.add(ahalf*an)
print(list(islice(agen(), 75))) # Michael S. Branicky, Sep 26 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Sep 26 2022
STATUS
approved