login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065642 a(1) = 1; for n > 1, a(n) = Min {m > n | m has same prime factors as n ignoring multiplicity}. 42
1, 4, 9, 8, 25, 12, 49, 16, 27, 20, 121, 18, 169, 28, 45, 32, 289, 24, 361, 40, 63, 44, 529, 36, 125, 52, 81, 56, 841, 60, 961, 64, 99, 68, 175, 48, 1369, 76, 117, 50, 1681, 84, 1849, 88, 75, 92, 2209, 54, 343, 80, 153, 104, 2809, 72, 275, 98, 171, 116, 3481, 90, 3721 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
After the initial 1, a permutation of the nonsquarefree numbers A013929. The array A284457 is obtained as a dispersion of this sequence. - Antti Karttunen, Apr 17 2017
Numbers such that a(n)/n is not an integer are listed in A284342.
LINKS
Reinhard Zumkeller (terms 1..1000) & Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
A007947(a(n)) = A007947(n); a(A007947(n)) = A007947(n) * A020639(n), where A007947 is the squarefree kernel (radical), A020639 is the least prime factor (lpf).
a(A000040(n)^k) = A000040(n)^(k+1); A001221(a(n)) = A001221(n).
A285328(a(n)) = n. - Antti Karttunen, Apr 17 2017
n < a(n) <= n*lpf(n) <= n^2. - Charles R Greathouse IV, Oct 18 2017
EXAMPLE
a(10) = a(2 * 5) = 2 * 2 * 5 = 20; a(12) = a(2^2 * 3) = 2 * 3^2 = 18.
MATHEMATICA
ffi[x_]:= Flatten[FactorInteger[x]]; lf[x_]:= Length[FactorInteger[x]]; ba[x_]:= Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; cor[x_]:= Apply[Times, ba[x]]; Join[{1}, Table[Min[Flatten[Position[Table[cor[w], {w, n+1, n^2}]-cor[n], 0]]+n], {n, 2, 100}]] (* This code is suitable since prime factor set is invariant iff squarefree kernel is invariant. *) (* G. C. Greubel, Oct 31 2018 *)
Array[If[# == 1, 1, Function[{n, c}, SelectFirst[Range[n + 1, n^2], Times @@ FactorInteger[#][[All, 1]] == c &]] @@ {#, Times @@ FactorInteger[#][[All, 1]]}] &, 61] (* Michael De Vlieger, Oct 31 2018 *)
PROG
(Haskell)
a065642 1 = 1
a065642 n = head [x | let rad = a007947 n, x <- [n+1..], a007947 x == rad]
-- Reinhard Zumkeller, Jun 12 2015, Jul 27 2011
(PARI) A065642(n)={ my(r=A007947(n)); if(1==n, n, n += r; while(A007947(n) <> r, n += r); n)} \\ Antti Karttunen, Apr 17 2017
(PARI) a(n)=if(n<2, return(1)); my(f=factor(n), r, mx, mn, t); if(#f~==1, return(f[1, 1]^(f[1, 2]+1))); f=f[, 1]; r=factorback(f); mn=mx=n*f[1]; forvec(v=vector(#f, i, [1, logint(mx/r, f[i])+1]), t=prod(i=1, #f, f[i]^v[i]); if(t<mn && t>n, mn=t)); mn \\ Charles R Greathouse IV, Oct 18 2017
(Scheme) (define (A065642 n) (if (= 1 n) n (let ((k (A007947 n))) (let loop ((n (+ n k))) (if (= (A007947 n) k) n (loop (+ n k))))))) ;; (Semi-naive implementation) - Antti Karttunen, Apr 17 2017
(Python)
from sympy import primefactors, prod
def a007947(n): return 1 if n < 2 else prod(primefactors(n))
def a(n):
if n==1: return 1
r=a007947(n)
n += r
while a007947(n)!=r:
n+=r
return n
print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Apr 17 2017
CROSSREFS
Cf. A285328 (a left inverse).
Cf. also arrays A284457 & A284311, A285321 and permutations A284572, A285112, A285332.
Sequence in context: A063748 A121920 A318279 * A285109 A217579 A118585
KEYWORD
nice,nonn
AUTHOR
Reinhard Zumkeller, Dec 03 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)