The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A238642 n if n+1 is prime; if n+1 is composite, n multiplied by smallest prime factor of n+1. 2
 1, 2, 6, 4, 10, 6, 14, 24, 18, 10, 22, 12, 26, 42, 30, 16, 34, 18, 38, 60, 42, 22, 46, 120, 50, 78, 54, 28, 58, 30, 62, 96, 66, 170, 70, 36, 74, 114, 78, 40, 82, 42, 86, 132, 90, 46, 94, 336, 98, 150, 102, 52, 106, 270, 110, 168, 114, 58, 118, 60, 122 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 EXAMPLE a(8) = 24 because the smallest prime factor of 9 is 3 and 8*3 = 24. MAPLE with(numtheory): a:= n-> n*`if`(isprime(n+1), 1, min(factorset(n+1)[])): seq(a(n), n=1..100);  # Alois P. Heinz, Mar 03 2014 PROG (Sage) q=100 #change q for more terms [n if is_prime(n+1) else n*min(prime_divisors(n+1)) for n in [1..q]] # Tom Edgar, Mar 03 2014 CROSSREFS Sequence in context: A227389 A015906 A066043 * A145019 A066678 A306645 Adjacent sequences:  A238639 A238640 A238641 * A238643 A238644 A238645 KEYWORD nonn AUTHOR J. Lowell, Mar 01 2014 EXTENSIONS More terms from Tom Edgar, Mar 03 2014 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.

Last modified April 11 23:40 EDT 2021. Contains 342899 sequences. (Running on oeis4.)