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.

A375719 a(1) = 1; For n > 1, a(n) is the smallest number different from a(1), ..., a(n-1) such that lcm(a(1), ..., a(n)) is a perfect square.

This page as a plain text file.
%I A375719 #23 Jan 20 2025 12:50:06
%S A375719 1,4,2,9,3,6,12,16,8,18,24,25,5,10,15,20,30,36,40,45,48,49,7,14,21,28,
%T A375719 35,42,50,56,60,63,64,32,70,72,75,80,81,27,54,84,90,96,98,100,105,108,
%U A375719 112,120,121,11,22,33,44,55,66,77,88,99,110,126,132,135,140
%N A375719 a(1) = 1; For n > 1, a(n) is the smallest number different from a(1), ..., a(n-1) such that lcm(a(1), ..., a(n)) is a perfect square.
%C A375719 This is a permutation of the positive integers.
%C A375719 From _Yifan Xie_, Jan 09 2025: (Start)
%C A375719 The sequence can be constructed using the following properties:
%C A375719 1. The squares appear in increasing order.
%C A375719 2. p^(2k) is immediately followed by p^(2k-1), 2*p^(2k-1), ..., (p-1)*p^(2k-1) for prime p.
%C A375719 3. The numbers m^2 < k < (m+1)^2 such that A006530(k) < A051119(k) appear in increasing order between m^2 and (m+1)^2.
%C A375719 a(n) > a(n-1) iff a(n) = p^(2k) and a(n-1) = p^(2k-1), where p is a prime. (End)
%H A375719 Yifan Xie, <a href="/A375719/b375719.txt">Table of n, a(n) for n = 1..10000</a>
%H A375719 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A375719 For n = 4, a(4) is different from 1, 2, 4, and lcm(4, a(4)) is a perfect square. Therefore, a(4) = 9.
%o A375719 (PARI) seq(n)={my(b=1, a=vector(n), M=Map()); for(n=1, #a, my(k=1); while(!issquare(lcm(b,k)) || mapisdefined(M,k), k++); a[n]=k; b=lcm(b,k); mapput(M,k,1)); a} \\ _Andrew Howroyd_, Aug 30 2024
%o A375719 (Python)
%o A375719 from math import isqrt, lcm
%o A375719 from itertools import count, islice
%o A375719 def sqr(n): return isqrt(n)**2 == n
%o A375719 def agen(): # generator of terms
%o A375719     an, aset, L, m = 1, {1}, 1, 2
%o A375719     for n in count(2):
%o A375719         yield an
%o A375719         an = next(k for k in count(m) if k not in aset and sqr(lcm(k, L)))
%o A375719         aset.add(an)
%o A375719         L = lcm(L, an)
%o A375719         while m in aset: m += 1
%o A375719 print(list(islice(agen(), 65))) # _Michael S. Branicky_, Aug 30 2024
%Y A375719 Cf. A006530 (Gpf(n)), A051119 (largest divisor of n coprime to Gpf(n)).
%K A375719 nonn,easy
%O A375719 1,2
%A A375719 _Yifan Xie_, Aug 25 2024