A123313 Maximum of greatest common divisors of pairs of distinct squarefree numbers not greater than the n-th squarefree number; a(1)=1.
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, 21, 21, 23, 23, 23, 23, 23, 23, 29, 29, 29, 31, 31, 33, 33, 33, 35, 35, 35, 37, 37, 39, 39, 41, 41, 41, 43, 43, 43, 43, 43, 47, 47, 47, 47, 51, 51, 51, 53, 53, 53, 55, 55, 55, 57, 57, 59
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Squarefree.
- Index entries for sequences related to GCD's.
Programs
-
Mathematica
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 *)
-
PARI
mygcd(x, y) = if (x==y, 1, gcd(x,y)); sqf(n) = {my(v = List(), k=1); until (#v == n, if (issquarefree(k), listput(v, k)); k++); v;} a(n) = vecmax(setbinop(mygcd, Vec(sqf(n)))); \\ Michel Marcus, Feb 13 2021
Formula
Extensions
Name corrected by Amiram Eldar, Feb 13 2021
Comments