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.
%I A365708 #24 Jan 01 2024 11:55:17 %S A365708 2,1,1,2,1,1,1,1,3,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1, %T A365708 1,2,1,1,1,1,1,1,1,1,1,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1, %U A365708 1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2 %N A365708 a(n) for n >= 2 is the smallest term of A008578 m dividing n such that n/m is not a square, a(1) = 2. %C A365708 In other words, a(n) is the least prime divisor of n for n = m^2, (m > 1), otherwise a(n) = 1. (Every term is 1 or a prime.) Compare with A007913. %H A365708 Michael De Vlieger, <a href="/A365708/b365708.txt">Table of n, a(n) for n = 1..10000</a> %e A365708 a(1) = 2, since 2 is the smallest m such that 1/m is not a square. %e A365708 a(2) = 1, since 2/1 = 2 is not a square (likewise for all primes p, a(p) = 1). %e A365708 a(4) = 2, since 4/1 = 4, a square, but 4/2 = 2, not a square, and so on. %e A365708 If n is a square with lpf(n) = p, then a(n) = p, the least m such that n/m is not a square. %t A365708 {2}~Join~Table[SelectFirst[Divisors[n], ! IntegerQ@ Sqrt[n/#] &], {n, 2, 120}] (* _Michael De Vlieger_, Sep 17 2023 *) %o A365708 (PARI) a(n) = fordiv(n, d, if (!issquare(n/d), return(d))); n+1; \\ _Michel Marcus_, Sep 17 2023 %Y A365708 Cf. A007913, A008578, A020639. %K A365708 nonn %O A365708 1,1 %A A365708 _David James Sycamore_, Sep 16 2023