OFFSET
1,1
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Min_{k=1..n} Sum_{i=1..n} prime(i)*prime(1 + (i+k) mod n).
EXAMPLE
For n = 4 the four possible cyclic autocorrelations of first four primes are:
(2,3,5,7).(2,3,5,7) = 2*2 + 3*3 + 5*5 + 7*7 = 4 + 9 + 25 + 49 = 87,
(2,3,5,7).(7,2,3,5) = 2*7 + 3*2 + 5*3 + 7*5 = 14 + 6 + 15 + 35 = 70,
(2,3,5,7).(5,7,2,3) = 2*5 + 3*7 + 5*2 + 7*3 = 10 + 21 + 10 + 21 = 62,
(2,3,5,7).(3,5,7,2) = 2*3 + 3*5 + 5*7 + 7*2 = 6 + 15 + 35 + 14 = 70,
then a(4)=62 because 62 is the minimum among the four values.
MAPLE
a:= n-> min(seq(add(ithprime(i)*ithprime(irem(i+k, n)+1), i=1..n), k=1..n)):
seq(a(n), n=1..40); # Alois P. Heinz, Feb 06 2018
MATHEMATICA
p[n_]:=Prime[Range[n]];
Table[Table[p[n].RotateRight[p[n], j], {j, 0, n-1}]//Min, {n, 1, 36}]
PROG
(PARI) a(n) = vecmin(vector(n, k, sum(i=1, n, prime(i)*prime(1+(i+k)%n)))); \\ Michel Marcus, Feb 07 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Feb 01 2018
STATUS
approved