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.

Showing 1-2 of 2 results.

A051861 Twice the positions in A051686 at which new primes appear in that sequence.

Original entry on oeis.org

2, 4, 16, 38, 58, 72, 148, 170, 178, 282, 388, 446, 512, 652, 656, 758, 836, 856, 1514, 1592, 1648, 1712, 1906, 1918, 2034, 2606, 2758, 4094, 4936, 5624, 5758, 5842, 5924, 6764, 8188, 10570, 10922, 11072, 11482, 13082, 13972, 14626, 15212, 16018, 18986
Offset: 1

Views

Author

Labos Elemer, Dec 14 1999

Keywords

Comments

Halving this sequence gives 1, 2, 8, 19, ..., 256, 326, ..., 47764, ..., the indices in A051686 at which primes appear which have not appeared before.
This sequence lists the terms of A051692 in ascending order, whereas A051692 lists them in increasing order of the emerging primes in A051686.

Crossrefs

Programs

  • Mathematica
    s[n_] := Module[{p = 2}, While[! PrimeQ[2*n*p + 1], p = NextPrime[p]]; p]; seq[len_] := Module[{t = {}, v = {}, n = 1, c = 0, p}, While[c < len, p = s[n]; If[FreeQ[t, p], c++; AppendTo[t, p]; AppendTo[v, 2*n]]; n++]; v]; seq[45] (* Amiram Eldar, Feb 28 2025 *)
  • PARI
    s(n) = {my(p = 2); while(!isprime(2*n*p + 1), p = nextprime(p+1)); p;}
    isin(list, k) = {for(i = 1, #list, if(list[i] == k, return(1))); 0};
    list(len) = {my(t = List(), n = 1, c = 0, p); while(c < len, p = s(n); if(!isin(t, p), c++; listput(t, p); print1(2*n, ", ")); n++);} \\ Amiram Eldar, Feb 28 2025

Extensions

Edited by Jon E. Schoenfield, May 28 2018

A051860 Distinct prime numbers in order of their appearance in A051686.

Original entry on oeis.org

2, 3, 7, 5, 19, 13, 37, 11, 31, 29, 61, 17, 23, 103, 83, 41, 47, 43, 107, 53, 97, 59, 67, 79, 73, 71, 109, 167, 151, 197, 127, 163, 89, 137, 157, 139, 113, 233, 181, 101, 229, 193, 179, 211, 131, 149, 373, 251, 271, 307, 173, 409, 199, 283, 227, 349, 263, 443, 313
Offset: 1

Views

Author

Labos Elemer, Dec 14 1999

Keywords

Comments

A051686 includes the minimal 2k-Germain primes, which show a special order of emergence as 2k increases. This sequence shows this order.
Each prime seems to appear several times.

Examples

			37 appears first in A051686 at the 148th position and it is the 7th new prime number which arises, sooner than smaller primes like 11, 31, 29, 17, 23, so a(7) = 37.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := Module[{p = 2}, While[! PrimeQ[2*n*p + 1], p = NextPrime[p]]; p]; seq[len_] := Module[{t = {}, n = 1, c = 0, p}, While[c < len, p = s[n]; If[FreeQ[t, p], c++; AppendTo[t, p]]; n++]; t]; seq[60] (* Amiram Eldar, Feb 28 2025 *)
  • PARI
    s(n) = {my(p = 2); while(!isprime(2*n*p + 1), p = nextprime(p+1)); p;}
    isin(list, k) = {for(i = 1, #list, if(list[i] == k, return(1))); 0};
    list(len) = {my(t = List(), n = 1, c = 0, p); while(c < len, p = s(n); if(!isin(t, p), c++; listput(t, p)); n++); Vec(t);} \\ Amiram Eldar, Feb 28 2025
Showing 1-2 of 2 results.