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.
%I A337327 #35 Aug 24 2022 08:51:26 %S A337327 0,1,2,2,3,2,4,3,3,3,4,4,6,5,4,4,6,5,8,7,6,6,8,7,8,7,6,6,8,7,10,9,8,8, %T A337327 8,8,10,9,8,8,10,10,12,12,10,11,12,12,12,13,12,12,14,13,14,13,12,12, %U A337327 12,12,14,13,12,13,12,14,14,15,12,14,14,16,16,18 %N A337327 Maximum value of the cyclic self-convolution of the first n terms of the characteristic function of primes. %H A337327 Rémy Sigrist, <a href="/A337327/b337327.txt">Table of n, a(n) for n = 1..10000</a> %H A337327 Andres Cicuttin, <a href="/A337327/a337327.pdf">Graph of first 2^10 terms</a> %e A337327 The primes among the first 5 positive integers (1,2,3,4,5) are 2, 3, and 5, then the corresponding characteristic function of primes is (0,1,1,0,1) (see A010051) and the corresponding five possible cyclic self-convolutions are the dot products between (0,1,1,0,1) and the rotations of its mirrored version as shown below: %e A337327 (0,1,1,0,1).(1,0,1,1,0) = 0*1 + 1*0 + 1*1 + 0*1 + 1*0 = 1, %e A337327 (0,1,1,0,1).(0,1,0,1,1) = 0*0 + 1*1 + 1*0 + 0*1 + 1*1 = 2, %e A337327 (0,1,1,0,1).(1,0,1,0,1) = 0*1 + 1*0 + 1*1 + 0*0 + 1*1 = 2, %e A337327 (0,1,1,0,1).(1,1,0,1,0) = 0*1 + 1*1 + 1*0 + 0*1 + 1*0 = 1, %e A337327 (0,1,1,0,1).(0,1,1,0,1) = 0*0 + 1*1 + 1*1 + 0*0 + 1*1 = 3. %e A337327 Then a(5)=3 because 3 is the maximum among the five values. %t A337327 b[n_]:=Table[If[PrimeQ[i],1,0],{i,1,n}]; %t A337327 Table[Max@Table[b[n].RotateRight[Reverse[b[n]],j],{j,0,n-1}],{n,1,100}] %o A337327 (PARI) a(n) = vecmax(vector(n, k, sum(i=1, n, isprime(n-i+1)*isprime(1+(i+k)%n)))); \\ _Michel Marcus_, Aug 26 2020 %Y A337327 Cf. A010051, A299111, A014342. %K A337327 nonn,look %O A337327 1,3 %A A337327 _Andres Cicuttin_, Aug 23 2020