cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A299111 Maximum value of the cyclic convolution of first n primes with themselves.

This page as a plain text file.
%I A299111 #44 Jun 15 2022 08:15:04
%S A299111 4,13,37,82,183,344,601,918,1355,2048,2873,3978,5455,7112,9105,11530,
%T A299111 14391,17504,21353,25686,30311,35536,41421,48010,55911,64632,73869,
%U A299111 83766,94151,105420,118569,132566,148247,164564,182617,201770,222975,245532,269253
%N A299111 Maximum value of the cyclic convolution of first n primes with themselves.
%H A299111 Robert Israel, <a href="/A299111/b299111.txt">Table of n, a(n) for n = 1..2000</a>
%F A299111 a(n) = Max_{k=1..n} Sum_{i=1..n} prime(n-i+1)*prime(1+(i+k) mod n).
%F A299111 a(n) >= A014342(n). Does the ratio a(n)/A014342(n) have a limit as n -> infinity? - _Robert Israel_, Feb 07 2018
%e A299111 For n = 4 the four possible cyclic convolution of first four primes with themselves are:
%e A299111 (2,3,5,7).(7,5,3,2) = 2*7 + 3*5 + 5*3 + 7*2 = 14 + 15 + 15 + 14 = 58,
%e A299111 (2,3,5,7).(2,7,5,3) = 2*2 + 3*7 + 5*5 + 7*3 = 4 + 21 + 25 + 21 = 71,
%e A299111 (2,3,5,7).(3,2,7,5) = 2*3 + 3*2 + 5*7 + 7*5 = 6 + 6 + 35 + 35 = 82,
%e A299111 (2,3,5,7).(5,3,2,7) = 2*5 + 3*3 + 5*2 + 7*7 = 10 + 9 + 10 + 49 = 78,
%e A299111 then a(4)=82 because 82 is the maximum among the four values.
%p A299111 f:= proc(n) local V,R,i;
%p A299111     V:= Vector(n, ithprime);
%p A299111     R:= ArrayTools:-FlipDimension(V,1)^%T;
%p A299111     max(seq(ArrayTools:-CircularShift(R,i) . V, i=0..n-1))
%p A299111 end proc:
%p A299111 map(f, [$1..100]); # _Robert Israel_, Feb 07 2018
%t A299111 a[n_]:=Prime[Range[n]];
%t A299111 Table[Max@Table[a[n].RotateRight[Reverse[a[n]], j], {j, 0, n - 1}], {n,1,36}]
%o A299111 (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
%Y A299111 Cf. A014342, A299053.
%K A299111 nonn
%O A299111 1,1
%A A299111 _Andres Cicuttin_, Feb 02 2018