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 A135718 #42 Jan 29 2025 08:05:18
%S A135718 4,9,8,25,4,49,16,27,4,121,8,169,4,9,32,289,4,361,8,9,4,529,9,125,4,
%T A135718 81,8,841,4,961,64,9,4,25,8,1369,4,9,16,1681,4,1849,8,25,4,2209,9,343,
%U A135718 4,9,8,2809,4,25,16,9,4,3481,8,3721,4,27,128,25,4,4489,8,9,4,5041
%N A135718 a(n) = smallest divisor of n^2 that is not a divisor of n.
%C A135718 All terms are in A025475. - _David A. Corneth_, Jun 24 2017
%H A135718 Vincenzo Librandi and David A. Corneth, <a href="/A135718/b135718.txt">Table of n, a(n) for n = 2..10001</a> (first 1999 terms from Vincenzo Librandi)
%F A135718 If n = product{p=primes, p|n} p^b(n,p), where each b(n,p) is a positive integer, then a(n) = the minimum value of a p^(b(n,p)+1) where p is a prime that divides n. Example: 24 has the prime factorization of 2^3 *3^1. So a(24) = the minimum of 2^(3+1) and 3^(1+1) = the minimum of 16 and 9, which is 9.
%F A135718 a(p) = p^2 for p prime. - _Michel Marcus_, Jun 13 2017
%e A135718 The divisors of 12 are 1,2,3,4,6,12. The divisors of 12^2 = 144 are 1,2,3,4,6,8,9,12,16,18,24,36,48,72,144. So the smallest divisor of 144 that is not a divisor of 12 is 8.
%p A135718 with(numtheory): a:=proc(n) options operator, arrow: op(1, `minus`(divisors(n^2), divisors(n))) end proc: seq(a(n),n=2..60); # _Emeric Deutsch_, May 18 2008
%t A135718 a135718[n_] := Map[First[Complement[Divisors[#^2], Divisors[#]]]&, Range[2, n]]
%t A135718 a135718[60] (* data *) (* _Hartmut F. W. Hoft_, Jun 13 2017 *)
%t A135718 Table[Min@ Map[Apply[Power, # + {0, 1}] &, FactorInteger@ n], {n, 2, 60}] (* _Michael De Vlieger_, Jun 23 2017 *)
%o A135718 (PARI) a(n) = fordiv(n^2, x, if (n % x, return (x))); \\ _Michel Marcus_, Jun 13 2017
%o A135718 (PARI) a(n) = my(f=factor(n)); vecmin(vector(#f~, i, f[i,1]^(f[i,2]+1))) \\ _David A. Corneth_, Jun 28 2017
%o A135718 (PARI) first(n) = {n++; my(v = vector(n-1), l = List()); forprime(p = 2, n, v[p-1] = p^2); forprime(p = 2, sqrtint(n), pp = p; j = 1; while(pp<n, pp*=p; j++; listput(l, [pp, p, j]))); listsort(l); for(i=1,#l, for(c = 0, n\l[i][1], for(d = 1, l[i][2]-1, t = c*l[i][1] + d*(l[i][1]\l[i][2]) - 1; if(t<n && v[t]==0, v[t]=l[i][1]))));v} \\ this prog uses A025475. _David A. Corneth_, Jun 30 2017
%Y A135718 Cf. A001597, A025475.
%K A135718 nonn,easy
%O A135718 2,1
%A A135718 _Leroy Quet_, May 10 2008
%E A135718 More terms from _Emeric Deutsch_, May 18 2008