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.

User: ?(#<5&),

?(#<5&),'s wiki page.

?(#<5&), has authored 3 sequences.

A354156 Primes p == 1 (mod 4) which are not Lagrange primes.

Original entry on oeis.org

37, 61, 89, 101, 109, 113, 149, 157, 173, 181, 193, 197, 233, 269, 277, 293, 317, 337, 349, 353, 373, 389, 401, 421, 433, 509, 557, 569, 577, 593, 601, 613, 641, 673, 701, 709, 757, 761, 773, 797, 821, 829, 877, 881, 937, 941, 977, 1009, 1013, 1033, 1049, 1061
Offset: 1

Author

N. J. A. Sloane, May 29 2022, based on Section 18.5 of Cosgrave (2022)

Keywords

References

  • J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 18.5.

Crossrefs

This is the complement of A354155 in A002144.

Programs

  • Python
    from itertools import islice
    from sympy import factorial, nextprime
    def agen(): # generator of terms
        p = 5
        while True:
            X = (p-1)//2
            Xf = factorial(X)**2
            if any(pow(factorial(Y), 2, p)+1 == p for Y in range(X-1, 0, -1)):
                yield p
            p = nextprime(p)
            while p%4 != 1:
                p = nextprime(p)
    print(list(islice(agen(), 5))) # Michael S. Branicky, May 30 2022

Extensions

a(26) and beyond from Michael S. Branicky, May 30 2022

A354155 Lagrange primes: primes p == 1 (mod 4) such that X = (p-1)/2 is the least solution in the interval [1, (p-1)/2] of the congruence (X!)^2 == -1 (mod p).

Original entry on oeis.org

5, 13, 17, 29, 41, 53, 73, 97, 137, 229, 241, 257, 281, 313, 397, 409, 449, 457, 461, 521, 541, 617, 653, 661, 677, 733, 769, 809, 853, 857, 929, 953, 997, 1021, 1069, 1109, 1201, 1213, 1217, 1249, 1277, 1361, 1373, 1409, 1489, 1553, 1597, 1609, 1621, 1697
Offset: 1

Author

N. J. A. Sloane, May 29 2022, based on Section 18.5 of Cosgrave (2022)

Keywords

References

  • J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 18.5.

Crossrefs

Programs

  • PARI
    is(n)=if(n%4 != 1 || !isprime(n), return(0)); my(t1=lift(sqrt(Mod(-1,n))), t2=n-t1, t=Mod(1,n)); for(k=2,n\2, if(t==t1 || t==t2, return(0)); t*=k); 1 \\ Charles R Greathouse IV, Aug 03 2023
    
  • PARI
    list(lim)=my(v=List()); forprimestep(p=5,lim\1,4, my(t1=lift(sqrt(Mod(-1,p))),t2=p-t1, t=Mod(1,p)); for(k=2,p\2, if(t==t1 || t==t2, next(2)); t*=k); listput(v,p)); Vec(v) \\ Charles R Greathouse IV, Aug 03 2023
  • Python
    from itertools import islice
    from sympy import factorial, nextprime
    def agen(): # generator of terms
        p = 5
        while True:
            X = (p-1)//2
            Xf = factorial(X)**2
            if all(pow(factorial(Y), 2, p)+1 != p for Y in range(X-1, 0, -1)):
                yield p
            p = nextprime(p)
            while p%4 != 1:
                p = nextprime(p)
    print(list(islice(agen(), 5))) # Michael S. Branicky, May 30 2022
    

Extensions

a(20) and beyond from Michael S. Branicky, May 30 2022

A330339 Boustrophedon primes: write the numbers 0, 1, 2, 3, ... in a triangle on a square grid in the boustrophedon manner, ending a row when a prime is reached; sequence lists primes that appear in the zeroth column.

Original entry on oeis.org

37, 53, 89, 113, 3821, 3989, 4657, 28661, 29021, 41641, 41669, 44249, 50909, 56053, 57041, 57301, 133981, 16501361, 46178761, 47633441, 47633477, 47722049, 47736121, 47774621, 47803477, 47810209, 47835013, 47835341, 47854969, 47862413, 47865017, 49448573, 49448617
Offset: 1

Author

N. J. A. Sloane, Dec 17 2019, following a suggestion from Eric Angelini. a(5) and a(6) were found by Walter Trump. a(7)-a(17) from N. J. A. Sloane, Dec 17 2019

Keywords

Comments

Eric Angelini's illustration shows the first 19 rows of the triangle. Each row ends when a prime is reached, and the next row starts directly under this prime but moves in the opposite direction.
The extended illustration from Walter Trump resembles a giant ski run.
Hans Havermann's plots of A330545, linked here, extend Walter Trump's graph to 4*10^8 rows (probably the longest ski run in the world). Only the turns are shown, and the illustration has been turned sideways.
A330545(k) = 0 iff prime(k) is a term of the present sequence. In a sense A330545 and the simpler A330547 are the more fundamental sequences and show the connection between the present problem and the ordinary primes and their alternating sums.
Note that because primes > 2 are odd, a prime can only appear in column 0 at the end of a row that is moving towards the left. A prime appearing in a row moving to the right will always appear in an odd-numbered column (and in particular, not in the zero column).
Furthermore the column number mod 4 uniquely determines the residue class of primes mod 4 in that column. If the column number is 0,1,2,3 mod 4 then the primes in that column are 1,3,3,1 respectively (see the "Notes" link). In particular, a(n) == 1 mod 4. - N. J. A. Sloane, Jan 04 2020
Note that the primes > 2 in column one and two are the primes in A282178.
Note on the links: The illustrations from Angelini and Trump show all the terms 0,1,2,3,4,..., while those of Havermann and Sloane just show the primes (as in A330545).

Crossrefs

A330546 gives the list of indices i such that a(n) = prime(i).
A127596 is another sequence with a similar flavor.
Not to be confused with A000747 = Boustrophedon transform of primes.

Extensions

More terms from Hans Havermann, Dec 17 2019