login

Revision History for A087272

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) is the largest prime number in 3x+1 trajectory initiated at n.
(history; published version)
#13 by Harvey P. Dale at Mon Feb 27 15:49:21 EST 2023
STATUS

editing

approved

#12 by Harvey P. Dale at Mon Feb 27 15:49:17 EST 2023
MATHEMATICA

Table[Max[Select[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&], PrimeQ]], {n, 2, 70}] (* Harvey P. Dale, Feb 27 2023 *)

STATUS

approved

editing

#11 by Alois P. Heinz at Sat Jul 16 12:31:36 EDT 2022
STATUS

editing

approved

#10 by Alois P. Heinz at Sat Jul 16 12:31:24 EDT 2022
CROSSREFS
STATUS

approved

editing

#9 by Peter Luschny at Mon Oct 15 07:58:25 EDT 2018
STATUS

reviewed

approved

#8 by Joerg Arndt at Mon Oct 08 13:12:34 EDT 2018
STATUS

proposed

reviewed

Discussion
Mon Oct 08
13:13
Joerg Arndt: Oops, I may have reviewed a bit too quick...
14:51
Michel Marcus: no, a(1) could be 2, because of 1, 4, 2, but it seems had been ignored in data
Tue Oct 09
01:26
Michel Marcus: can someone check what Mma says
02:51
Rémy Sigrist: by analogy with A025586 (where a Collatz trajectory stops at 1) : a(1) is not defined. I think that is the reason why the sequence started at n = 2. however, by analogy with A056959, we could say a(1) = 2. it could be interesting to include a(1) = 2 as someone could do a search with this initial value.
#7 by Rémy Sigrist at Mon Oct 08 12:50:13 EDT 2018
STATUS

editing

proposed

Discussion
Mon Oct 08
13:10
Michel Marcus: I wonder what is the Mma output when I see {w, 1, 256} : so with offset 1
#6 by Rémy Sigrist at Mon Oct 08 12:48:46 EDT 2018
NAME

a(n) is the largest prime number in 3x+1 trajectory initiated at n;.

OFFSET

1,2,1

LINKS

Rémy Sigrist, <a href="/A087272/b087272.txt">Table of n, a(n) for n = 2..10000</a>

PROG

(PARI) a(n) = my (mx=2); while (n>1, if (isprime(n), mx=max(mx, n)); n=if (n%2, 3*n+1, n/2)); mx \\ Rémy Sigrist, Oct 08 2018

EXTENSIONS

Offset corrected by Rémy Sigrist, Oct 08 2018

STATUS

approved

editing

Discussion
Mon Oct 08
12:50
Rémy Sigrist: added b-file and program + fixed offset
#5 by N. J. A. Sloane at Tue Oct 15 22:32:17 EDT 2013
AUTHOR

_Labos E. (labos(AT)ana.sote.hu), Elemer_, Sep 18 2003

Discussion
Tue Oct 15
22:32
OEIS Server: https://oeis.org/edit/global/2029
#4 by N. J. A. Sloane at Fri Feb 24 03:00:00 EST 2006
MATHEMATICA

c[x_] := (1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1); c[1]=1; fpl[x_] := Delete[FixedPointList[c, x], -1] ofp[x_] := Part[fpl[x], Flatten[Position[PrimeQ[fpl[x]], True]]] Table[Max[ofp[w]], {w, 1, 256}]

KEYWORD

nonn,new

nonn