OFFSET
0,2
COMMENTS
Lexicographically first sequence of squarefree numbers such that A001222(a(n)) = n and each term is coprime to the next.
LINKS
Robert Israel, Table of n, a(n) for n = 0..315
FORMULA
If n is even, a(n) = Product_{i=1..n/2} prime(4*i-2)*prime(4*i-1).
If n is odd, a(n) = 2 * Product_{i=1..(n-1)/2} prime(4*i)*prime(4*i+1).
From Peter Munn, Apr 21 2023: (Start)
a(0) = 1, for n >= 1, a(n) = A002110(2n-1)/a(n-1).
(End)
EXAMPLE
a(0) = 1.
a(1) = 2 is the least prime coprime to a(0).
a(2) = 3*5 is the product of the two least primes coprime to a(1).
a(3) = 2*7*11 is the product of the three least primes coprime to a(2).
a(4) = 3*5*13*17 = 3315 is the product of the four least primes coprime to a(3).
MAPLE
f:= proc(n) local i;
if n::odd then 2 * mul(ithprime(4*i)*ithprime(4*i+1), i=1..(n-1)/2)
else mul(ithprime(4*i-2)*ithprime(4*i-1), i=1..(n/2))
fi
end proc:
map(f, [$0..20]);
PROG
(Python)
from math import prod
from sympy import prime
def A362364(n): return prod(prime(i)*prime(i+1) for i in range(2+((n&1)<<1), (n<<1)-1, 4))<<(n&1) # Chai Wah Wu, Apr 20 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Apr 18 2023
STATUS
approved