OFFSET
1,2
COMMENTS
In other words, a(1) = 1, then for n > 1, a(n) is the least number k, not occurring earlier, whose squarefree kernel (rad(k)) is a divisor of n.
A permutation of the positive integers. - Robert Israel, Dec 11 2022
From Michael De Vlieger, Dec 06 2022, corrected by Robert Israel, Dec 11 2022: (Start)
Some consequences of definition:
Prime n = p implies a(p) = p^2, comprising maxima.
n = 2p implies a(2p) = p, n = 4p implies a(4p) = 2p.
n = 2^e with e >= 1 implies a(2^e) = 2^(e+1) if e is odd, 2^(e-1) if e is even.
n = p^e with e >= 1 and p an odd prime implies a(n) = p^(e+1).
Composite squarefree 2n implies a(2n) = n, comprising minima.
gcd(n, n +/- 1) = 1 implies gcd(a(n), a(n +/- 1)) = 1.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Annotated log log scatterplot of a(n), n = 1..2^12, highlighting and labeling primes in red, composite prime powers in gold and labeling in orange, composite squarefree in green, numbers that are products of composite prime powers in large light blue and labeling in blue, and all other numbers in dark blue. The first 36 terms are simply labeled in black.
FORMULA
For n = p^k, where p is prime and k >= 1, a(n) = p^(k+1). In particular, a(p) = p^2 (records).
EXAMPLE
a(5) = 25 because rad(25) = 5 and there is no smaller number not equal to 5 which has this property.
MAPLE
N:= 100: # for a(1)..a(N)
R:= map(NumberTheory:-Radical, [$1..N^2]):
A[1]:= 1:
Agenda:= [$2..N^2]:
for n from 2 to N do
if isprime(R[n]) then
if R[n] = 2 and padic:-ordp(n, 2)::even then A[n]:= n/2
else A[n]:= R[n]*n
fi;
if A[n] <= N then Agenda:= subs(A[n]=NULL, Agenda) fi;
next
fi;
found:= false;
for j from 1 to nops(Agenda) do
x:= Agenda[j];
if x <> n and n mod R[x] = 0 then
A[n]:= x; Agenda:= subsop(j=NULL, Agenda); found:= true; break
fi
od;
if not found then break fi;
od:
convert(A, list); # Robert Israel, Dec 11 2022
MATHEMATICA
nn = 120; c[_] = False; f[n_] := f[n] = Times @@ FactorInteger[n][[All, 1]]; a[1] = 1; c[1] = True; u = 2; Do[Which[PrimeQ[n], k = n^2, PrimePowerQ[n], Set[{p, k}, {f[n], 1}]; While[Nand[! c[p^k], p^k != n], k++]; k = p^k, True, k = u; While[Nand[! c[k], k != n, Divisible[n, f[k]]], k++]]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Dec 06 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Dec 05 2022
EXTENSIONS
More terms from Michael De Vlieger, Dec 07 2022
STATUS
approved