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-6 of 6 results.

A246033 "Convex" primes: extremal primes in the sense of Tutaj.

Original entry on oeis.org

2, 3, 7, 19, 47, 73, 113, 199, 283, 467, 661, 887, 1129, 1327, 1627, 2803, 3947, 4297, 5881, 6379, 7043, 9949, 10343, 13187, 15823, 18461, 24137, 33647, 34763, 37663, 42863, 43067, 59753, 59797, 82619, 96017, 102679, 129643, 130699, 142237, 155893, 187477, 194119
Offset: 1

Views

Author

Michel Marcus and N. J. A. Sloane, Aug 18 2014

Keywords

Comments

See Tutaj (2014) for the precise definition.

Crossrefs

A different notion of convex prime is mentioned in A167844.

Programs

  • Maple
    plist := [2,3] ;
    nlist := [1,2] ;
    p := 5 ;
    for n from 3 to 100000 do # experimental upper limit!
        plist := [op(plist),p] ;
        nlist := [op(nlist),n] ;
        doflat := true ;
        while doflat do
            doflat := false ;
            for nrew from nops(nlist)-1 to 2 by -1 do
                slopold := (nlist[nrew]-nlist[nrew-1])/(plist[nrew]-plist[nrew-1]) ;
                slop := (nlist[nrew+1]-nlist[nrew])/(plist[nrew+1]-plist[nrew]) ;
                if slop >= slopold then
                    plist := subsop(nrew=NULL,plist) ;
                    nlist := subsop(nrew=NULL,nlist) ;
                    doflat := true ;
                end if;
            end do:
        end do:
        print(plist) ;
        p := nextprime(p) ;
    end do: # R. J. Mathar, Jul 28 2017
  • Mathematica
    terms = 50; nmax0 = 25000; dnmax = 1000; Clear[f];
    f[nmax_] := f[nmax] = Module[{}, plist = {2, 3}; nlist = {1, 2}; p = 5;
    For[n = 3, n <= nmax, n++,
    plist = Append[plist, p];
    nlist = Append[nlist, n]; doflat = True;
    While[doflat, doflat = False;
    For[nrew = Length[nlist]-1, nrew >= 2, nrew--, slopold = (nlist[[nrew]] - nlist[[nrew-1]])/(plist[[nrew]] - plist[[nrew-1]]); slop = (nlist[[nrew+1]] - nlist[[nrew]])/(plist[[nrew+1]] - plist[[nrew]]); If [slop >= slopold, plist [[nrew]] = Nothing nlist[[nrew]] = Nothing; doflat = True]]
    ]; p = NextPrime[p]
    ]; PadRight[plist, terms]
    ];
    f[nmax = nmax0]; f[nmax = nmax + dnmax];
    While[Print[nmax]; f[nmax][[1 ;; terms]] != f[nmax - dnmax][[1 ;; terms]], nmax = nmax + dnmax];
    f[nmax] (* Jean-François Alcover, Nov 01 2018, from R. J. Mathar's Maple code *)

Extensions

a(14) corrected by Edward Tutaj and Charles R Greathouse IV, Nov 27 2014
Primes beyond 33647 from R. J. Mathar, Jul 28 2017

A167843 Obtuse-angled primes.

Original entry on oeis.org

113, 127, 137, 139, 149, 157, 167, 179, 199, 211, 223, 227, 229, 233, 239, 257, 269, 277, 311, 331, 337, 347, 349, 359, 367, 379, 389, 421, 431, 433, 443, 449, 457, 467, 479, 499, 521, 541, 557, 569, 577, 599, 631, 641, 643, 653, 661, 677, 733, 743, 751, 761
Offset: 1

Views

Author

Omar E. Pol, Nov 13 2009

Keywords

Comments

Primes in A135603.
Primes whose structure of digits represents an obtuse angle. The vertex is an internal digit. In the graphic representation the points are connected by imaginary line segments from left to right.

Crossrefs

Programs

  • Python
    # uses agen() from A135603
    from sympy import isprime
    g = filter(isprime, agen())
    print([next(g) for n in range(1, 53)]) # Michael S. Branicky, Aug 03 2022

Extensions

a(12) and beyond from Michael S. Branicky, Aug 03 2022

A167845 Concave primes.

Original entry on oeis.org

131, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 233, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 331, 353, 367, 373, 379, 383, 389, 397, 431, 443, 461, 463, 467, 479, 487, 491, 499, 541, 563, 571, 577, 587, 593, 599, 641, 653, 661, 673
Offset: 1

Views

Author

Omar E. Pol, Nov 13 2009

Keywords

Comments

Primes in A135642.
Primes whose structure of digits represents a concave function or a concave object. In the graphic representation the points are connected by imaginary line segments from left to right.

Crossrefs

Extensions

More terms from Max Alekseyev, Apr 24 2010

A167846 Concave-convex primes.

Original entry on oeis.org

1021, 1031, 1033, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423
Offset: 1

Views

Author

Omar E. Pol, Nov 13 2009

Keywords

Comments

Primes in A163278.
Prime numbers with more than three digits that are not straight-line numbers (A135643), concave numbers (A135642) or convex numbers (A135641).

Crossrefs

Extensions

More terms from Rémy Sigrist, May 22 2019

A167847 Straight-line primes.

Original entry on oeis.org

11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 4567, 76543, 23456789, 1111111111111111111, 11111111111111111111111
Offset: 1

Views

Author

Omar E. Pol, Nov 14 2009

Keywords

Comments

Prime numbers with 2 digits together with the primes whose digits are in arithmetic progression. The structure of digits represents a straight line.
Note that in the graphic representation the points are connected by imaginary line segments (see also A135643).
Note that all two-digit primes are straight-line primes but this sequence has no three-digit terms.
No further terms between 23456789 and 115507867=prime(6600000). - R. J. Mathar, Dec 04 2009
All terms after 23456789 are repunit primes (A004022) with number of digits: 19, 23, 317, 1031, 49081, 86453, 109297, 270343, ... (A004023). - Jens Kruse Andersen, Jul 21 2014

Examples

			The number 4567 is straight-line prime:
  . . . .
  . . . .
  . . . 7
  . . 6 .
  . 5 . .
  4 . . .
  . . . .
  . . . .
  . . . .
  . . . .
		

Crossrefs

Extensions

2 more terms from R. J. Mathar, Dec 04 2009
a(25)-a(26) from Jens Kruse Andersen, Jul 21 2014

A319126 Convex hull primes, that is, prime numbers corresponding to the convex hull of PrimePi, the prime counting function.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 43, 47, 73, 113, 199, 283, 467, 661, 887, 1129, 1327, 1627, 2803, 3947, 4297, 5881, 6379, 7043, 9949, 10343, 13187, 15823, 18461, 24137, 33647, 34763, 37663, 42863, 43067, 59753, 59797, 82619, 96017, 102679, 129643, 130699, 142237
Offset: 1

Views

Author

Jean-François Alcover, Sep 11 2018

Keywords

Comments

"Convex hull of PrimePi" is a short wording for "the upper convex hull of the points {p, PrimePi(p)} for p >= 2".

Examples

			Prime 83 is not member because there exist two primes from the convex hull, namely 47 and 113, such that (PrimePi(83) - PrimePi(47))/(83 - 47) < (PrimePi(113) - PrimePi(83))/(113 - 83).
		

Crossrefs

Cf. A000720, A124661, A167844, A246033 (a subsequence).

Programs

  • Mathematica
    terms = 42;
    pMax = 110000;
    a[1] = 2;
    a[n_] := a[n] = Module[{}, For[slopeMax = 0; p1 = NextPrime[a[n-1]], p1 <= pMax, p1 = NextPrime[p1], slope = (PrimePi[p1] - PrimePi[a[n-1]])/(p1 - a[n-1]); If[slope > slopeMax, slopeMax = slope; p1Max = p1]]; p1Max];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 42}]
  • PARI
    lista(nn) = my(c, m, p=2, r, s, t=1); print1(p); for(n=2, nn, c=t; m=0; forprime(q=p+1, oo, c++; if(m0&&sJinyuan Wang, Feb 25 2025

Extensions

More terms from Jinyuan Wang, Feb 25 2025
Showing 1-6 of 6 results.