The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A299111 Maximum value of the cyclic convolution of first n primes with themselves. 8
4, 13, 37, 82, 183, 344, 601, 918, 1355, 2048, 2873, 3978, 5455, 7112, 9105, 11530, 14391, 17504, 21353, 25686, 30311, 35536, 41421, 48010, 55911, 64632, 73869, 83766, 94151, 105420, 118569, 132566, 148247, 164564, 182617, 201770, 222975, 245532, 269253 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = Max_{k=1..n} Sum_{i=1..n} prime(n-i+1)*prime(1+(i+k) mod n).
a(n) >= A014342(n). Does the ratio a(n)/A014342(n) have a limit as n -> infinity? - Robert Israel, Feb 07 2018
EXAMPLE
For n = 4 the four possible cyclic convolution of first four primes with themselves are:
(2,3,5,7).(7,5,3,2) = 2*7 + 3*5 + 5*3 + 7*2 = 14 + 15 + 15 + 14 = 58,
(2,3,5,7).(2,7,5,3) = 2*2 + 3*7 + 5*5 + 7*3 = 4 + 21 + 25 + 21 = 71,
(2,3,5,7).(3,2,7,5) = 2*3 + 3*2 + 5*7 + 7*5 = 6 + 6 + 35 + 35 = 82,
(2,3,5,7).(5,3,2,7) = 2*5 + 3*3 + 5*2 + 7*7 = 10 + 9 + 10 + 49 = 78,
then a(4)=82 because 82 is the maximum among the four values.
MAPLE
f:= proc(n) local V, R, i;
V:= Vector(n, ithprime);
R:= ArrayTools:-FlipDimension(V, 1)^%T;
max(seq(ArrayTools:-CircularShift(R, i) . V, i=0..n-1))
end proc:
map(f, [$1..100]); # Robert Israel, Feb 07 2018
MATHEMATICA
a[n_]:=Prime[Range[n]];
Table[Max@Table[a[n].RotateRight[Reverse[a[n]], j], {j, 0, n - 1}], {n, 1, 36}]
PROG
(PARI) a(n) = my(vp=primes(n)); vecmax(vector(n, k, sum(i=1, n, vp[n-i+1]*vp[1+(i+k)%n]))); \\ Michel Marcus, Feb 07 2018; Jun 15 2022
CROSSREFS
Sequence in context: A003727 A103082 A279111 * A324250 A226866 A048474
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Feb 02 2018
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 May 28 20:33 EDT 2024. Contains 372919 sequences. (Running on oeis4.)