

A063041


Image of n under Collatz2 map, a generalization of the classical '3x+1'  function: instead of dividing an even number by 2 a nonprime will be divided by its smallest prime factor and a prime will be multiplied not by 3 but by its primepredecessor, before one is added.


7



3, 7, 2, 16, 3, 36, 4, 3, 5, 78, 6, 144, 7, 5, 8, 222, 9, 324, 10, 7, 11, 438, 12, 5, 13, 9, 14, 668, 15, 900, 16, 11, 17, 7, 18, 1148, 19, 13, 20, 1518, 21, 1764, 22, 15, 23, 2022, 24, 7, 25, 17, 26, 2492, 27, 11, 28, 19, 29, 3128, 30, 3600, 31, 21, 32, 13, 33, 4088, 34, 23
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,1


LINKS

Antti Karttunen, Table of n, a(n) for n = 2..10001


FORMULA

a(n) = if n prime then (n * pp(n) + 1) else (n / lpf(n)) for n > 1 where pp(n) = if n > 2 then Max{p prime  p < n} else 1; [primepredecessor] and lpf(n) = if n > 2 then Min{p prime  p < n and p divides n} else 1; [where lpf = A020639].
If A010051(n) = 1 [when n is a prime], a(n) = 1 + (A064989(n)*n), otherwise a(n) = A032742(n).  Antti Karttunen, Jan 23 2017


EXAMPLE

a(17) = 17 * 13 = 222 as 17 is prime and 13 is the largest prime < 17; a(4537) = 349 as 4537 = 13 * 349 hence lpf(4537) = 13; other examples in A063042, A063043, A063044.
For n=2, its primepredecessor is taken as 1 (because 2 is the first prime), thus a(2) = (1*2)+1 = 3.


MATHEMATICA

Join[{3}, Table[If[PrimeQ[n], n*Prime[PrimePi[n]1]+1, n/Min[First/@FactorInteger[n]]], {n, 3, 69}]] (* Jayanta Basu, May 27 2013 *)


PROG

(Scheme) (define (A063041 n) (if (= 1 (A010051 n)) (+ 1 (* (A064989 n) n)) (A032742 n))) ;; Antti Karttunen, Jan 23 2017


CROSSREFS

Cf. A010051, A020639, A032742, A063045, A063046, A064989.
Cf. A063042, A063043, A063044, A280707 (trajectories starting from 3, 17, 29 and 47).
Sequence in context: A318467 A324713 A245611 * A257729 A328502 A308480
Adjacent sequences: A063038 A063039 A063040 * A063042 A063043 A063044


KEYWORD

nonn,easy


AUTHOR

Reinhard Zumkeller, Jul 07 2001


EXTENSIONS

More terms from Matthew Conroy, Jul 15 2001
Description clarified by Antti Karttunen, Jan 23 2017


STATUS

approved



