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!)
A063041 Image of n under Collatz-2 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 prime-predecessor, before one is added. 7

%I #22 Apr 17 2023 01:51:16

%S 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,

%T 14,668,15,900,16,11,17,7,18,1148,19,13,20,1518,21,1764,22,15,23,2022,

%U 24,7,25,17,26,2492,27,11,28,19,29,3128,30,3600,31,21,32,13,33,4088,34,23

%N Image of n under Collatz-2 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 prime-predecessor, before one is added.

%H Antti Karttunen, <a href="/A063041/b063041.txt">Table of n, a(n) for n = 2..10001</a>

%F 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; [prime-predecessor] and lpf(n) = if n > 2 then Min{p prime | p < n and p divides n} else 1; [where lpf = A020639].

%F 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

%e 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.

%e For n=2, its prime-predecessor is taken as 1 (because 2 is the first prime), thus a(2) = (1*2)+1 = 3.

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

%o (Scheme) (define (A063041 n) (if (= 1 (A010051 n)) (+ 1 (* (A064989 n) n)) (A032742 n))) ;; _Antti Karttunen_, Jan 23 2017

%o (Python)

%o from sympy import isprime, prevprime, primefactors

%o def f(n): return 1 if n == 2 else prevprime(n)

%o def a(n): return n*f(n)+1 if isprime(n) else n//min(primefactors(n))

%o print([a(n) for n in range(2, 70)]) # _Michael S. Branicky_, Apr 17 2023

%Y Cf. A010051, A020639, A032742, A063045, A063046, A064989.

%Y Cf. A063042, A063043, A063044, A280707 (trajectories starting from 3, 17, 29 and 47).

%K nonn,easy

%O 2,1

%A _Reinhard Zumkeller_, Jul 07 2001

%E More terms from _Matthew Conroy_, Jul 15 2001

%E Description clarified by _Antti Karttunen_, Jan 23 2017

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)