login
This site is supported by donations 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}. 32
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 A065642(n) / n is not an integer are listed in A284342.

Numbers such that A065642(n) / n = 7 are listed in A084968, A065642(n) / n = 11 in A084969, A065642(n) / n = 13 in A084970. - Paolo P. Lava, Jul 21 2017

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.

MAPLE

with(numtheory): P:=proc(n) local k; if n=1 then 1 else k:=n+1; while phi(k)/k<>phi(n)/n

do k:=k+1; od; k; fi; end: seq(P(i), i=1..10^2); # Paolo P. Lava, Jul 21 2017

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. *)

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 operator import mul

from sympy import primefactors

def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))

def a(n):

    if n==1: return 1

    r=a007947(n)

    n = n + r

    while a007947(n)!=r:

        n+=r

    return n

print [a(n) for n in xrange(1, 121)] # Indranil Ghosh, Apr 17 2017

CROSSREFS

Cf. A005117, A007947, A013929, A020639, A000040, A001221, A081382.

Cf. A285328 (a left inverse).

Cf. also arrays A284457 & A284311, A285321 and permutations A284572, A285112, A285332.

Cf. A084968, A084969, A084970, A284342.

Sequence in context: A063748 A121920 A318279 * A285109 A217579 A118585

Adjacent sequences:  A065639 A065640 A065641 * A065643 A065644 A065645

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 18 18:56 EDT 2019. Contains 328197 sequences. (Running on oeis4.)