cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

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.

Original entry on oeis.org

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
Offset: 2

Views

Author

Reinhard Zumkeller, Jul 07 2001

Keywords

Examples

			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 prime-predecessor is taken as 1 (because 2 is the first prime), thus a(2) = (1*2)+1 = 3.
		

Crossrefs

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

Programs

  • 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 *)
  • Python
    from sympy import isprime, prevprime, primefactors
    def f(n): return 1 if n == 2 else prevprime(n)
    def a(n): return n*f(n)+1 if isprime(n) else n//min(primefactors(n))
    print([a(n) for n in range(2, 70)]) # Michael S. Branicky, Apr 17 2023
  • Scheme
    (define (A063041 n) (if (= 1 (A010051 n)) (+ 1 (* (A064989 n) n)) (A032742 n))) ;; Antti Karttunen, Jan 23 2017
    

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; [prime-predecessor] 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

Extensions

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

A063043 Collatz-2 (A063041) trajectory starting at 17.

Original entry on oeis.org

17, 222, 111, 37, 1148, 574, 287, 41, 1518, 759, 253, 23, 438, 219, 73, 5184, 2592, 1296, 648, 324, 162, 81, 27, 9, 3, 7, 36, 18, 9, 3, 7, 36, 18, 9, 3, 7, 36, 18, 9, 3, 7, 36, 18, 9, 3, 7, 36, 18, 9, 3, 7, 36, 18, 9, 3, 7, 36, 18, 9, 3, 7, 36, 18, 9, 3, 7, 36
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 07 2001

Keywords

Comments

a(23) = a(28) = 9 and a(i) = a(j) <==> i = j for i, j < 28; same cycle values as A063042 but the conjecture that this is the only cycle for all starting values is not true: see A063044

Crossrefs

Programs

  • Mathematica
    NestList[If[PrimeQ[#],#*Prime[PrimePi[#]-1]+1,#/Min@@First/@FactorInteger[#]]&,17,30] (* Jayanta Basu, May 27 2013 *)

Formula

a(0) = 17 and a(n) = A063041(a(n-1)) for n > 0

Extensions

More terms from Sean A. Irvine, Apr 16 2023

A063045 Largest value in Collatz-2 (A063041) trajectory starting at n.

Original entry on oeis.org

36, 36, 36, 36, 36, 36, 36, 36, 36, 144, 36, 144, 36, 36, 36, 5184, 36, 324, 36, 36, 144, 5184, 36, 36, 144, 36, 36, 121104, 36, 900, 36, 144, 5184, 36, 36, 5184, 324, 144, 40, 5184, 42, 1764, 144, 45, 5184
Offset: 2

Views

Author

Reinhard Zumkeller, Jul 07 2001

Keywords

Comments

a(47) currently unknown but large (see A280707). - Sean A. Irvine, Apr 16 2023

Examples

			a(3) = 36 (see A063042), a(17) = 5184 (see A063043), a(29) = 121104 (see A063044)
		

Crossrefs

Extensions

a(40), a(42) and a(45) corrected by Sean A. Irvine, Apr 16 2023

A063046 Length of non-periodic head in Collatz-2 (A063041) trajectory starting at n.

Original entry on oeis.org

6, 5, 7, 10, 6, 5, 8, 5, 11, 11, 7, 8, 6, 11, 9, 28, 5, 10, 12, 6, 12, 17, 8, 11, 9, 6, 7, 15, 12, 16, 10, 12, 29, 6, 5, 25, 11, 9, 13, 21, 7, 11, 13, 12, 18
Offset: 2

Views

Author

Reinhard Zumkeller, Jul 07 2001

Keywords

Examples

			a(3) = 5 (see A063042), a(17) = 28 (see A063043), a(29) = 15 (see A063044)
		

Crossrefs

Extensions

a(14) corrected by Sean A. Irvine, Apr 16 2023
Showing 1-4 of 4 results.