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 A337802 #12 Aug 24 2022 08:51:21 %S A337802 0,0,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0, %T A337802 0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0, %U A337802 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 %N A337802 Minimum value of the cyclic self-convolution of the first n terms of the characteristic function of primes. %C A337802 In the first 1000 terms, a(n) = 1 only for n = 3, 5, 7, 11, 13, 17, 19, 23, 31, 43, 47, 61, 73, 107, 109, 113, 181, 199, and 467. %C A337802 Is there an index k such that a(n) = 0 for n > k ? %e A337802 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 A337802 (0,1,1,0,1).(1,0,1,1,0) = 0*1 + 1*0 + 1*1 + 0*1 + 1*0 = 1, %e A337802 (0,1,1,0,1).(0,1,0,1,1) = 0*0 + 1*1 + 1*0 + 0*1 + 1*1 = 2, %e A337802 (0,1,1,0,1).(1,0,1,0,1) = 0*1 + 1*0 + 1*1 + 0*0 + 1*1 = 2, %e A337802 (0,1,1,0,1).(1,1,0,1,0) = 0*1 + 1*1 + 1*0 + 0*1 + 1*0 = 1, %e A337802 (0,1,1,0,1).(0,1,1,0,1) = 0*0 + 1*1 + 1*1 + 0*0 + 1*1 = 3. %e A337802 Then a(5)=1 because 1 is the minimum among the five values. %t A337802 b[n_] := Table[If[PrimeQ[i], 1, 0], {i, 1, n}]; %t A337802 Table[Min@Table[b[n].RotateRight[Reverse[b[n]], j], {j, 0, n - 1}], {n, 1, 100}] %o A337802 (PARI) a(n) = vecmin(vector(n, k, sum(i=1, n, isprime(n-i+1)*isprime(1+(i+k)%n)))); \\ _Michel Marcus_, Sep 23 2020 %Y A337802 Cf. A337327, A010051, A299111, A014342. %K A337802 nonn %O A337802 1,1 %A A337802 _Andres Cicuttin_, Sep 22 2020