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!)
A068319 a(n) = if n <= lpf(n)^2 then lpf(n) else a(lpf(n) + n/lpf(n)), where lpf = least prime factor, A020639. 5

%I #18 Feb 05 2018 03:01:17

%S 1,2,3,2,5,5,7,5,3,7,11,5,13,3,5,7,17,11,19,5,7,13,23,3,5,5,5,7,29,17,

%T 31,11,3,19,5,5,37,7,7,13,41,23,43,3,11,5,47,5,7,5,5,7,53,29,7,17,13,

%U 31,59,11,61,3,3,19,11,5,67,5,5,37,71,7,73,7

%N a(n) = if n <= lpf(n)^2 then lpf(n) else a(lpf(n) + n/lpf(n)), where lpf = least prime factor, A020639.

%C n>1: a(n) is prime and a(n)=n iff n is prime.

%C a(n) = if n <= A088377(n) then A020639(n) else a(A111234(n)).

%H R. Zumkeller, <a href="/A068319/b068319.txt">Table of n, a(n) for n = 1..10000</a>

%e a(12)=a(2*6)=a(8)=a(2*4)=a(6)=a(2*3)=a(5)=a(5*1)=5.

%t lpf[n_] := FactorInteger[n][[1, 1]]; a[n_] := a[n] = If[n <= lpf[n]^2, lpf[n], a[lpf[n] + n/lpf[n]]]; Table[a[n], {n, 1, 74}](* _Jean-François Alcover_, Dec 21 2011 *)

%o (Haskell)

%o a068319 n = if n <= spf ^ 2 then spf else a068319 $ spf + div n spf

%o where spf = a020639 n

%o -- _Reinhard Zumkeller_, Jun 24 2013

%Y Cf. A032742.

%K nonn,nice

%O 1,2

%A _Reinhard Zumkeller_, Feb 27 2002, Jul 13 2007

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 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)