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

A067362 a(n) = p - n!^2, where p is the smallest prime > n!^2+1.

Original entry on oeis.org

2, 3, 5, 11, 7, 11, 11, 13, 23, 17, 13, 59, 23, 31, 23, 41, 59, 67, 29, 31, 103, 389, 59, 107, 47, 127, 67, 181, 101, 97, 409, 37, 61, 43, 61, 47, 263, 109, 53, 199, 167, 337, 47, 131, 127, 73, 181, 257, 191, 101, 83, 79, 181, 167, 229, 859, 421, 433, 107, 971
Offset: 1

Views

Author

Frank Buss (fb(AT)frank-buss.de), Jan 19 2002

Keywords

Comments

The first 157 terms are primes. Are all terms prime? For n!^i, with 0
The first 200 terms are primes. - Jon Perry and Christ van Willegen, Mar 07 2003
The first 3003 terms are primes. - Dana Jacobsen, May 13 2015

Programs

  • Mathematica
    a[n_] := For[i=2, True, i++, If[PrimeQ[n!^2+i], Return[i]]]
    Table[p = NextPrime[(x = (n!)^2) + 1]; p - x, {n, 60}] (* Jayanta Basu, Aug 10 2013 *)
  • MuPAD
    for n from 1 to 50 do f := n!^2:a := nextprime(f+2)-f:print(a) end_for
    
  • PARI
    for(n=1,500,f=n!^2;print1(nextprime(f+2)-f, ", ")) \\  Dana Jacobsen, May 10 2015
    
  • Perl
    use ntheory ":all"; use Math::GMP qw/:constant/; for my $n (1..500) { my $f=factorial($n)**2; say "$n ",next_prime($f+1)-$f; } # Dana Jacobsen, May 10 2015

Extensions

Edited by Dean Hickerson, Mar 02 2002

A067364 a(n)=p-n!^4, where p is the smallest prime > n!^4+1.

Original entry on oeis.org

2, 3, 5, 5, 7, 29, 19, 29, 181, 19, 31, 173, 79, 43, 379, 61, 101, 127, 101, 83, 37, 29, 271, 233, 109, 233, 293, 1039, 137, 241, 173, 197, 613, 1933, 277, 71, 503, 449, 1667, 53, 67, 163, 179, 211, 53, 613, 1171, 1069, 359, 199, 839, 433, 1523, 463, 677
Offset: 1

Author

Frank Buss (fb(AT)frank-buss.de), Jan 19 2002

Keywords

Comments

The first 102 terms are primes. Are all terms prime? For n!^i, with 0
The first 1865 terms are primes. - Dana Jacobsen, May 13 2015

Programs

  • Mathematica
    a[n_] := For[i=2, True, i++, If[PrimeQ[n!^4+i], Return[i]]]
  • MuPAD
    for n from 1 to 50 do f := n!^4:a := nextprime(f+2)-f:print(a) end_for
    
  • PARI
    for(n=1, 500, f=n!^4; print1(nextprime(f+2)-f, ", ")) \\ Dana Jacobsen, May 13 2015
    
  • Perl
    use ntheory ":all"; use Math::GMP qw/:constant/; for my $n (1..500) { my $f=factorial($n)**4; say "$n ", next_prime($f+1)-$f; } # Dana Jacobsen, May 13 2015

Extensions

Edited by Dean Hickerson, Mar 02 2002

A067365 a(n) = p-n!^5, where p is the smallest prime > n!^5+1.

Original entry on oeis.org

2, 5, 13, 13, 7, 7, 11, 71, 23, 19, 197, 17, 101, 53, 17, 47, 73, 97, 53, 433, 251, 251, 47, 263, 281, 353, 53, 61, 179, 41, 53, 401, 449, 79, 89, 1283, 367, 2011, 139, 227, 1597, 1657, 1123, 397, 131, 727, 137, 167, 89, 379, 421, 653, 223, 373, 2221, 1447
Offset: 1

Author

Frank Buss (fb(AT)frank-buss.de), Jan 19 2002

Keywords

Comments

The first 60 terms are primes. Are all terms prime? For n!^i, with 0
The first 1592 terms are primes. - Dana Jacobsen, May 13 2015

Programs

  • Mathematica
    a[n_] := For[i=2, True, i++, If[PrimeQ[n!^5+i], Return[i]]]
    spf[n_]:=Module[{c=(n!)^5},NextPrime[c+1]-c]; Array[spf,60] (* Harvey P. Dale, Feb 24 2015 *)
  • MuPAD
    for n from 1 to 50 do f := n!^5:a := nextprime(f+2)-f:print(a) end_for
    
  • PARI
    for(n=1, 100, f=n!^5; print1(nextprime(f+2)-f, ", ")) \\ Dana Jacobsen, May 13 2015
    
  • Perl
    use ntheory ":all"; use Math::GMP qw/:constant/; for my $n (1..500) { my $f=factorial($n)**5; say "$n ", next_prime($f+1)-$f; } # Dana Jacobsen, May 13 2015

Extensions

Edited by Dean Hickerson, Mar 02 2002
Showing 1-3 of 3 results.