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!)
A266552 Irregular triangle read by rows giving the 3p+1 sequence of n. 0
2, 3, 10, 5, 16, 8, 4, 2, 4, 2, 5, 16, 8, 4, 2, 6, 3, 10, 5, 16, 8, 4, 2, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 8, 4, 2, 9, 3, 10, 5, 16, 8, 4, 2, 10, 5, 16, 8, 4, 2, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
The n-th row of the triangle provides the 3p+1 sequence for n, such that the sequence terminates at the first occurrence of 2. The 3p+1 sequence is a variation of the 3x+1 (Collatz) sequence.
The 3p+1 sequence for n >= 2 is defined as follows: b(0) = n; b(n+1) = 3 * b(n) + 1 if b(n) is prime; otherwise, b(n+1) = b(n) divided by the smallest prime factor of b(n).
It seems that all 3p+1 sequences reach 2. This has been verified for n up to 5*10^8. Once a 3p+1 sequence reaches 2, it repeats the following cycle: 2, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, ...
LINKS
Jack Brennen, Felice Russo, A Collatz-like sequence.
EXAMPLE
The irregular array a(n,k) starts:
n\k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
2: 2
3: 3 10 5 16 8 4 2
4: 4 2
5: 5 16 8 4 2
6: 6 3 10 5 16 8 4 2
7: 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2
8: 8 4 2
9: 9 3 10 5 16 8 4 2
10: 5 16 8 4 2
11: 11 34 17 52 26 13 40 20 10 5 16 8 4 2
PROG
(PARI) row(n) = {print1 (n, ", "); while (n!=2, nn = if (isprime(n), 3*n+1, n/factor(n)[1, 1]); print1(nn, ", "); n=nn); } \\ Michel Marcus, Jan 02 2016
(Python)
from sympy import isprime, primefactors
def a(n):
if n==2: return [2]
l=[n, ]
while True:
if isprime(n): n = 3*n + 1
else: n/=min(primefactors(n))
l+=[n, ]
if n==2: break
return l
for n in range(2, 21): print a(n) # Indranil Ghosh, Apr 22 2017
CROSSREFS
Cf. A266551 (image of n under the 3p+1 map).
Cf. A175871 (the repeating cycle starting at 2).
Cf. A070165 (irregular triangle read by rows giving trajectory of n in Collatz problem).
Sequence in context: A139693 A182076 A347271 * A263716 A344457 A175899
KEYWORD
nonn,tabf
AUTHOR
Robert C. Lyons, Dec 31 2015
STATUS
approved

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