cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A362364 a(n) is the product of the first n primes that are coprime to a(n-1); a(0) = 1.

Original entry on oeis.org

1, 2, 15, 154, 3315, 67298, 2980185, 102091066, 6022953885, 319238763382, 24615812527995, 1654614510608906, 161405882746063215, 14284287070086685498, 1679105398207295625645, 166597640098421012963174, 24096841569672899523631395, 2989927846846361919650083778, 499069685749495422033929821845
Offset: 0

Views

Author

Robert Israel, Apr 18 2023

Keywords

Comments

Lexicographically first sequence of squarefree numbers such that A001222(a(n)) = n and each term is coprime to the next.

Examples

			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).
		

Crossrefs

Cf. A001222.
See the formula section for the relationships with A002110, A019565, A037481, A100112, A117214.

Programs

  • 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]);
  • 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

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).
a(n) = A019565(A037481(n)).
For n >= 1, a(n-1) = A117214(A100112(a(n))).
(End)