## Are all the sequence numbers prime?

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

Goahead52
Posts: 431
Joined: Thu Oct 16, 2014 9:28 am UTC

### Are all the sequence numbers prime?

Hi,

Here is a sequence of prime numbers:
3,5,11,17,47,257,510767,....
The algorithm used to build such sequence is :
We definie Primorial p noted #p=2*3*5*7*....*p
Start from U(0)=3 the first odd prime
Compute a(1)=int(sqrt(U(0)))+1=2
U(1)=U(0)+a(1) where a(1) is equal to primorial #2 = 2
U(1)=5
Compute a(2)=int(sqrt(U(1))+1=3
U(2)=U(1)+a(2)=5+#3=5+(2*3)=11
Compute a(3)=int(sqrt(11))+1=4 (4 is not prime so we use #3=2*3
U(3)=11+(2*3)=17
and so on

Are all the numbers of the sequence prime numbers?
The sequence is growing faster it is not easy to know.
Thank you for any help.

PM 2Ring
Posts: 3715
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

### Re: Are all the sequence numbers prime?

No. The next term in your sequence (after 510767) is

Code: Select all

`13802651106711802536344050306133362992649963656229914863058580142142610482430817949922104531639351381921564573865712490763569228376295661814770390189505137031692781919527713285374540164408571278055683171593020170233128086464775974520546386806644011091046992108509661969860784773011026549130272637`

which has a factor of 965854931

Xanthir
My HERO!!!
Posts: 5423
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

### Re: Are all the sequence numbers prime?

I'm having a hard time figuring out what this sequence even *is* - is the a() function just "the primorial of the largest prime less than or equal to the sqrt of the previous sequence value"?
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

Goahead52
Posts: 431
Joined: Thu Oct 16, 2014 9:28 am UTC

### Re: Are all the sequence numbers prime?

Xanthir wrote:I'm having a hard time figuring out what this sequence even *is* - is the a() function just "the primorial of the largest prime less than or equal to the sqrt of the previous sequence value"?

Yes.
If a() is prime (let us say q) then the primoiral is #q=2*3*5*3.....*q
If a() is not prime then the primorial is #q where q is the last prime < a()

Examples :

a()=10 then #q=2*3*5*7
a()=19 then #q=2*3*5*.....*17*19

PsiSquared
Posts: 126
Joined: Wed May 09, 2012 6:02 pm UTC

### Re: Are all the sequence numbers prime?

PM 2Ring wrote:No. The next term in your sequence (after 510767) is

Code: Select all

`13802651106711802536344050306133362992649963656229914863058580142142610482430817949922104531639351381921564573865712490763569228376295661814770390189505137031692781919527713285374540164408571278055683171593020170233128086464775974520546386806644011091046992108509661969860784773011026549130272637`

which has a factor of 965854931

Which is to be expected.

The first few terms must be prime, simply because the method of construction rules out any factor below their square root:

5=2+3 cannot be divisible by 2 or 3
11=5+2x3 cannot be divisible by 2 or 3
17=11+2x3 cannot be divisible by 2 or 3
47=17+2x3x5 cannot be divisible by 2,3 or 5

And the following two terms are also fairly likely to be prime:
257=47+2x3x5x7 cannot be divisible by 2,3,5 or 7.
510767=257+2x3x5x7x11x13x17 cannot be divisible by 2,3,5,7,11,13 or 17.

A number in the 200's which isn't divisible by 2,3,5 or 7 has a 16/21 chance of being prime.
And a number in the 500000s which isn't divisible by anything up to 17 has a roughly 40% chance of being prime.

On the other hand, the next term is a 296-digit number and the only factors which are ruled out are those under 719. So there's no reason at all to think it would be prime. And indeed, it isn't.

Return to “Mathematics”

### Who is online

Users browsing this forum: No registered users and 11 guests