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.

A123313 Maximum of greatest common divisors of pairs of distinct squarefree numbers not greater than the n-th squarefree number; a(1)=1.

This page as a plain text file.
%I A123313 #23 Feb 16 2025 08:33:02
%S A123313 1,1,1,1,3,3,5,5,5,7,7,7,7,7,11,11,13,13,15,15,15,17,17,17,19,19,19,
%T A123313 21,21,23,23,23,23,23,23,29,29,29,31,31,33,33,33,35,35,35,37,37,39,39,
%U A123313 41,41,41,43,43,43,43,43,47,47,47,47,51,51,51,53,53,53,55,55,55,57,57,59
%N A123313 Maximum of greatest common divisors of pairs of distinct squarefree numbers not greater than the n-th squarefree number; a(1)=1.
%C A123313 A123314(n) = #{k: a(k) = A005117(n)}.
%H A123313 Reinhard Zumkeller, <a href="/A123313/b123313.txt">Table of n, a(n) for n = 1..10000</a>
%H A123313 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Squarefree.html">Squarefree</a>.
%H A123313 <a href="/index/Ga#gcd">Index entries for sequences related to GCD's</a>.
%F A123313 a(n) = Max(a(n-1), Max(GCD(A005117(n), A005117(k)): 1<=k<n)).
%t A123313 seq[max_] := Module[{sqf = Select[Range[max], SquareFreeQ], s, m}, m = Length[sqf]; s = Table[0, {m}]; s[[1]] = 1; Do[s[[k]] = Max[s[[k - 1]], Max[GCD[sqf[[k]], Take[sqf, k - 1]]]], {k, 2, m}]; s]; seq[120] (* _Amiram Eldar_, Feb 13 2021 *)
%o A123313 (PARI) mygcd(x, y) = if (x==y, 1, gcd(x,y));
%o A123313 sqf(n) = {my(v = List(), k=1); until (#v == n, if (issquarefree(k), listput(v, k)); k++); v;}
%o A123313 a(n) = vecmax(setbinop(mygcd, Vec(sqf(n)))); \\ _Michel Marcus_, Feb 13 2021
%Y A123313 Cf. A005117, A123314.
%K A123313 nonn
%O A123313 1,5
%A A123313 _Reinhard Zumkeller_, Sep 25 2006
%E A123313 Name corrected by _Amiram Eldar_, Feb 13 2021