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!)
A332877 Arrange the first n primes in a circle in any order. a(n) is the minimum value of the largest product of two consecutive primes out of all possible orders. 6
6, 15, 21, 35, 55, 77, 91, 143, 187, 221, 253, 323, 391, 493, 551, 667, 713, 899, 1073, 1189, 1271, 1517, 1591, 1763, 1961, 2183, 2419, 2537, 2773, 3127, 3233, 3599, 3953, 4189, 4331, 4757, 4897, 5293, 5723, 5963, 6499, 6887, 7171, 7663, 8051, 8633, 8989, 9797, 9991, 10403, 10807, 11303 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
It might appear that all terms are either the product of two consecutive primes or two primes with a prime in between (A333747). However, 253=11*23 is the first term that is not in that sequence.
The easiest optimal permutation of n primes is probably {p_1, p_n, p_2, p_n-1, …, p_ceiling(n/2)}. - Ivan N. Ianakiev, Apr 20 2020
LINKS
Giovanni Resta, Examples for a(2)-a(22)
FORMULA
Probably a(n) = A332765(n+1) for n > 4.
EXAMPLE
Here are the different ways to arrange the first 4 primes in a circle.
2-3
| | Products: 6, 21, 35, 10. Largest product: 35.
5-7
.
2-3
| | Products: 6, 15, 35, 14. Largest product: 35.
7-5
.
2-5
| | Products: 10, 15, 21, 14. Largest product: 21.
7-3
The minimum largest product is 21, so a(4)=21.
MATHEMATICA
primes[n_]:=Prime/@Range[n];
partition[n_]:=Partition[primes[n], UpTo[Ceiling[n/2]]];
riffle[n_]:=Riffle[partition[n][[1]], Reverse[partition[n][[2]]]];
a[n_]:=Max[Table[riffle[n][[i]]*riffle[n][[i+1]], {i, 1, n-1}]];
a/@Range[2, 60] (* Ivan N. Ianakiev, Apr 20 2020 *)
PROG
(PARI) a(n) = {my(x = oo); for (k=1, (n-1)!, my(vp = Vec(numtoperm(n, k-1))); vp = apply(x->prime(x), vp); x = min(x, max(vp[1]*vp[n-1], vecmax(vector(n-1, j, vp[j]*vp[j+1])))); ); x; } \\ Michel Marcus, Apr 14 2020
CROSSREFS
Sequence in context: A261078 A063466 A138109 * A357325 A362211 A072521
KEYWORD
nonn
AUTHOR
Bobby Jacobs, Apr 11 2020
EXTENSIONS
a(12)-a(13) from Michel Marcus, Apr 14 2020
a(14) from Alois P. Heinz, Apr 15 2020
a(15)-a(22) from Giovanni Resta, Apr 19 2020
More terms from Ivan N. Ianakiev, Apr 20 2020
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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)