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 A127257 #19 Feb 16 2025 08:33:04 %S A127257 2,6,18,20,50,68,74,78,90,96,134,138,156,200,204,228,278,288,296,306, %T A127257 326,338,378,384,398,404,440,464,468,504,510,524,530,546,600,608,644, %U A127257 660,704,726,740,774,828,854,870,930,938,944,966,986,1008,1034,1068 %N A127257 a(n) is the initial element of the sequence A(n) defined exactly like A119752 but with the additional condition that each of its elements must not be contained in any of the sequences A(k) for k < n. %C A127257 Recall that A119752 is the sequence defined recursively by a(1)=2 and a(k) is the first even number greater than a(k-1) such that 2a(k)+1 is prime and a(k)+a(j)+1 is prime for all 1<=j<k. %C A127257 a(n)=A(n,1), the first element of each sequence A(n) defined recursively as follows. Let A(1)=A119752, that is, A(1,k)=A119752(k). Then A(n) is the sequence defined recursively as follows: (1) A(n,1) is the first even number not in any A(m), 1<=m<n, such that 2A(n,1)+1 is prime. (2) A(n,k) is the first even number greater than A(n,k-1), not in any A(m), 1<=m<n, such that 2A(n,k)+1 is prime. (3) A(n,k)+A(n,j)+1 is prime for all 1<=j<k. %C A127257 Let us say that a positive integer t is eventually in A(n) if 2^p*t, p>=1, is in A(n). For example, if t=19, then A(36,1)=2^5*19. The only numbers not eventually in some A(n) are all powers 2^p such that 2^(p+1)+1 is not prime, (so p is not 0, 1, 3, 7, 15) and Sierpinski numbers of the second kind, namely odd integers t such that 2^p*t+1 is composite for all p>=1. The smallest known example is t=78,557. %H A127257 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SierpinskiNumberoftheSecondKind.html">Sierpinski Number of the Second Kind</a>. %e A127257 a(1)=2 is the first element of A119752=2, 8, 14, 44, 224, 638, 1274, 4004, 675404, ... so a(2)=6 since 6 is the first even number not in A119752 such that 2*6+1 is prime. Furthermore, A(2)=6, 30, 36, 120, 300, 426, 8700, 71910,... %o A127257 (PARI) isok(va, k, n) = if (isprime(2*k+1), for (i=1, n-1, if (! isprime(va[i]+k+1), return(0))); return(1)); %o A127257 avec(start, lim) = my(list=List(), n=2, ok=1); listput(list, start); while(ok, my(k=list[n-1]+2); while (!isok(list, k, n), k+=2; if (k>lim, ok=0; break)); if (ok, listput(list, k)); n++;); Vec(list); %o A127257 findfirst(v, lim) = forstep (n=2, lim, 2, if (isprime(2*n+1) && !vecsearch(v, n), return(n))); %o A127257 lista(lim) = my(list = List()); listput(list, 2); my(v=avec(2, lim)); while (1, my(new = findfirst(v, lim)); if (! new, break); my(w = avec(new, lim)); v = vecsort(concat(v, w)); listput(list, new);); Vec(list); \\ _Michel Marcus_, Mar 06 2023 %Y A127257 Cf. A119751, A119752, A127256. %K A127257 nonn %O A127257 1,1 %A A127257 _Walter Kehowski_, Jan 10 2007