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

A073831 Maximum of A073830(k) for k between A001359(n) and A001359(n+1).

Original entry on oeis.org

8, 56, 182, 552, 1406, 2862, 4556, 9506, 10712, 17292, 19460, 30102, 32942, 37442, 49952, 54522, 69432, 77006, 94556, 113906, 167690, 177662, 209306, 259590, 317532, 352242, 376382, 398792, 427062, 636006, 658532, 678152
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2002

Keywords

Comments

a(n) = A073830(A073832(n)); a(n) < A037074(n+2).

Programs

  • Maple
    A073831 := proc(n)
        A073830(A073832(n)) ;
    end proc:
    seq(A073831(n),n=1..50) ; # R. J. Mathar, Feb 21 2017
  • Mathematica
    f[n_] := Mod[4*((n - 1)! + 1) + n, n*(n + 2)];
    pp = Select[Prime[Range[200]], PrimeQ[# + 2] & ];
    a[n_] := Max[f /@ Range[pp[[n]], pp[[n + 1]]]];
    Array[a, Length[pp] - 1] (* Jean-François Alcover, Feb 22 2018 *)

A073832 k between A001359(n) and A001359(n+1) such that A073830(k) is maximal.

Original entry on oeis.org

4, 7, 13, 23, 37, 53, 67, 97, 103, 131, 139, 173, 181, 193, 223, 233, 263, 277, 307, 337, 409, 421, 457, 509, 563, 593, 613, 631, 653, 797, 811, 823, 853, 877, 1013, 1021, 1039, 1051, 1087, 1129, 1223, 1259, 1283, 1297, 1307, 1423, 1447, 1471, 1483, 1601
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2002

Keywords

Comments

A073830(a(n)) = A073831(n).

Programs

  • Maple
    A073832 := proc(n)
        local k,kmx,a ;
        kmx := 0 ;
        a := A001359(n)+1 ;
        for k from A001359(n)+1 to A001359(n+1)-1 do
            if A073830(k) > kmx then
                a := k ;
                kmx := A073830(k) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A073832(n),n=1..50) ; # R. J. Mathar, Feb 21 2017
  • Mathematica
    f[n_] := Mod[4*((n - 1)! + 1) + n, n*(n + 2)];
    pp = Select[Prime[Range[300]], PrimeQ[# + 2] & ];
    a[n_] := MaximalBy[Range[pp[[n]], pp[[n + 1]]], f];
    Array[a, Length[pp] - 1] // Flatten (* Jean-François Alcover, Feb 22 2018 *)
  • Python
    from math import factorial
    from itertools import islice, pairwise
    from sympy import isprime, nextprime, primerange
    def f(n): return (4*(factorial(n-1) + 1) + n)%(n*(n + 2))
    def bgen(): # generator of A001359
        p, q = 2, 3
        while True:
            if q - p == 2: yield p
            p, q = q, nextprime(q)
    def agen(): # generator of terms
        for p, q in pairwise(bgen()):
            yield max((f(k), k) for k in range(p+1, q))[1]
    print(list(islice(agen(), 80))) # Michael S. Branicky, Aug 13 2024

A134100 Primes p > 3 such that neither p-2 nor p-4 are prime.

Original entry on oeis.org

29, 37, 53, 59, 67, 79, 89, 97, 127, 137, 149, 157, 163, 173, 179, 191, 211, 223, 239, 251, 257, 263, 269, 277, 293, 307, 331, 337, 347, 359, 367, 373, 379, 389, 397, 409, 419, 431, 439, 449, 457, 479, 487, 499, 509, 521, 541, 547, 557, 563, 569, 577, 587
Offset: 1

Views

Author

Enoch Haga, Oct 08 2007

Keywords

Comments

Upper primes after a prime gap of 6 or larger (Union of A031925, A031927, A031929, ...) - R. J. Mathar, Mar 15 2012

Examples

			29 is a term because 29 follows the odd nonprime 27 which in turn follows the odd nonprime 25.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[5,1000,2],PrimeQ[#]&&!PrimeQ[#-2]&&!PrimeQ[#-4]&] (* Vladimir Joseph Stephan Orlovsky, Feb 03 2012 *)
  • PARI
    forprime(p=5,600,if(!isprime(p-2) && !isprime(p-4), print1(p,", "))); \\ Joerg Arndt, Oct 27 2021
    
  • PARI
    list(lim)=my(v=List(),p=23); forprime(q=29,lim, if(q-p>4, listput(v,q)); p=q); Vec(v) \\ Charles R Greathouse IV, Oct 27 2021

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Oct 27 2021

Extensions

Name corrected by Michel Marcus and Amiram Eldar, Oct 27 2021

A073829 a(n) = 4*((n-1)! + 1) + n.

Original entry on oeis.org

9, 10, 15, 32, 105, 490, 2891, 20172, 161293, 1451534, 14515215, 159667216, 1916006417, 24908083218, 348713164819, 5230697472020, 83691159552021, 1422749712384022, 25609494822912023, 486580401635328024, 9731608032706560025, 204363768686837760026
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2002

Keywords

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 192.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 112.

Crossrefs

See A073830 for motivation.
Cf. A038507.

Programs

  • Magma
    [4*(Factorial(n-1)+1)+n: n in [1..20]]; // Vincenzo Librandi, May 04 2014
    
  • Mathematica
    Table[(4 ((n - 1)! + 1) + n), {n, 1, 20}] (* Vincenzo Librandi, May 04 2014 *)
  • Sage
    [4*(factorial(n-1) + 1) + n for n in range(1,22)] # Stefano Spezia, Apr 21 2025

A383485 a(n) = 2*(2*(n - 1)! + n + 2) (mod n*(n + 2)).

Original entry on oeis.org

1, 4, 3, 12, 5, 16, 0, 20, 31, 24, 11, 28, 0, 32, 49, 36, 17, 40, 0, 44, 67, 48, 0, 52, 54, 56, 85, 60, 29, 64, 0, 68, 70, 72, 109, 76, 0, 80, 121, 84, 41, 88, 0, 92, 139, 96, 0, 100, 102, 104, 157, 108, 0, 112, 114, 116, 175, 120, 59, 124, 0, 128, 130, 132, 199, 136, 0, 140
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Apr 28 2025

Keywords

Comments

Fixed points are the lesser of twin primes A001359.
Positions of zeros are primes p such that p + 2 is not a prime A067774.

Crossrefs

Programs

  • Mathematica
    Table[Mod[2(2(n - 1)! + n + 2), n(n + 2)], {n, 68}]

Formula

a(A001359(n)) = n.
a(A067774(n)) = 0.
Showing 1-5 of 5 results.