Prime chains: p -> (p + (-1)^{(p-1)/2)} / 2

54 views
Skip to first unread message

Tomasz Ordowski

unread,
Mar 13, 2026, 2:20:35 PMMar 13
to seq...@googlegroups.com

Hello Everyone!

Prime chains generated by the map

a(n+1) = (a(n) + (-1)^{(a(n)-1)/2)} / 2, with a(1) = p odd prime.

Equivalently:

  • if a(n) == 1 (mod 4), then a(n+1) = (a(n)+1)/2

  • if a(n) == 3 (mod 4), then a(n+1) = (a(n)-1)/2

Iterate until the first composite appears and count only the prime terms.

Examples: 47 -> 23 -> 11 -> 5 -> 3 -> 1 (5 primes);

2879 -> 1439 -> 719 -> 359 -> 179 -> 89 -> 45 (6 primes). 

The smallest primes starting chains of length k seem to begin

3, 5, 11, 23, 47, 2879, ...

Question:
Can anyone find longer prime chains for this iteration, and the smallest primes producing chains of length 7, 8, ... ?

(Backward step: a = 2b ± 1.)

Best, 

Tom Ordo 

Tomasz Ordowski

unread,
Mar 13, 2026, 2:39:14 PMMar 13
to seq...@googlegroups.com
Prime chains: 
p -> (p + (-1)^{(p-1)/2}) / 2
Correction of brackets, it should be:
a(n+1) = (a(n) + (-1)^{(a(n)-1)/2}) / 2, with a(1) = p odd prime. 

Amiram Eldar

unread,
Mar 13, 2026, 2:53:49 PMMar 13
to SeqFan
The least prime that generates a chain of 7 is 1065601:
1065601 -> 532801 -> 266401 -> 133201 -> 66601 -> 33301  -> 16651

Tomasz Ordowski

unread,
Mar 13, 2026, 3:55:48 PMMar 13
to seq...@googlegroups.com
Ami, thanks! 

Cf. https://oeis.org/A110092
(see the last three terms there).

Tom  

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/71c69065-b52c-464f-99d3-a55215ebddd9n%40googlegroups.com.

Amiram Eldar

unread,
Mar 13, 2026, 3:57:26 PMMar 13
to SeqFan
and the least prime that generates a chain of 8 is 1985902081:
1985902081 -> 992951041 -> 496475521 -> 248237761 -> 124118881 -> 62059441 -> 31029721 -> 15514861

Tomasz Ordowski

unread,
Mar 13, 2026, 4:00:05 PMMar 13
to seq...@googlegroups.com

Tomasz Ordowski

unread,
Mar 13, 2026, 4:48:54 PMMar 13
to seq...@googlegroups.com
Cf. https://oeis.org/A110059
See a(8). 

Tomasz Ordowski

unread,
Mar 15, 2026, 5:23:03 AMMar 15
to seq...@googlegroups.com
The largest prime that gives a full prime chain (ending in 3) is p = 47.
There will be no such restriction if we change the definition of the prime chain as follows.
Namely p -> Odd(p - (-1)^{(p-1)/2}), where Odd(m) is the odd part of m (its greatest odd divisor). 
Backward iteration (p -> p2^n +- 1 for some n > 1) allows us to create arbitrarily long prime chains (starting from 1). 
In the first step, we obtain the Fermat(+) or Mersenne(-) primes. In the next steps, the tree will have numerous prime branches. 

Dave Consiglio

unread,
Mar 16, 2026, 10:19:00 AMMar 16
to seq...@googlegroups.com
a(9) =  21981381119

My computer has been chewing on it all weekend - a(10) > 174872140559

Reply all
Reply to author
Forward
0 new messages