login
This site is supported by donations 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
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, 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, 31, 59, 11, 61, 3, 3, 19, 11, 5, 67, 5, 5, 37, 71, 7, 73, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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

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

LINKS

R. Zumkeller, Table of n, a(n) for n = 1..10000

EXAMPLE

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

MATHEMATICA

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

PROG

(Haskell)

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

            where spf = a020639 n

-- Reinhard Zumkeller, Jun 24 2013

CROSSREFS

Cf. A032742.

Sequence in context: A074251 A074196 A153023 * A133775 A099043 A318677

Adjacent sequences:  A068316 A068317 A068318 * A068320 A068321 A068322

KEYWORD

nonn,nice

AUTHOR

Reinhard Zumkeller, Feb 27 2002, Jul 13 2007

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 22 18:55 EDT 2018. Contains 316500 sequences. (Running on oeis4.)