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.

A099640 Primes with subscripts described in A098213.

This page as a plain text file.
%I A099640 #15 Feb 23 2025 02:41:00
%S A099640 2,2,2,19,113,509,2551,19267,75041,753143,4310819,38238461,307379717,
%T A099640 805592213,13341291553
%N A099640 Primes with subscripts described in A098213.
%C A099640 These primes are the smallest ones that introduce consecutive prime segments of length n, providing "maximum-diversity matrices". See A098213.
%F A099640 a(n) = prime(A098213(n)). See explanations at A098213.
%e A099640 For n = 7: prime list = {2551,2557,2579,2591,2593,2609,2617}, consecutive differences = {6,22,12,2,16,8}, 7 X 7 matrix = [{abs(p(i)-p(j))], C[7,2] = 21 distinct positive matrix entries: {2,6,8,12,14,16,18,22,24,26,28,30,34,36,38,40,42,52,58,60,66}.
%t A099640 a[n_] := Module[{v = Prime[Range[n]]}, While[CountDistinct@ Flatten@ Abs@ Outer[Plus, v, -v] - 1 != Binomial[n, 2], v = Join[v[[2 ;; -1]], {NextPrime[v[[-1]]]}]]; v[[1]]]; Array[a, 10] (* _Amiram Eldar_, Feb 23 2025 *)
%o A099640 (PARI) s(v) = {my(d = List()); for(i = 1, #v, for(j = 1, i-1, listput(d, abs(v[i] - v[j])))); #Set(d);}
%o A099640 a(n) = {my(v = primes(n), t = n*(n-1)/2, j = 1); while(s(v) != t, v[j] = nextprime(1 + if(j==1, v[n], v[j-1])); j++; if(j > n, j -= n)); v[j];} \\ _Amiram Eldar_, Feb 23 2025
%Y A099640 Cf. A098213, A079007.
%K A099640 nonn,more
%O A099640 1,1
%A A099640 _Labos Elemer_, Oct 29 2004
%E A099640 a(14)-a(15) from _Amiram Eldar_, Feb 23 2025