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.

A191699 Numbers k such that k*(k-1)^k - (k-1)*k^(k-1) - 1 is prime.

Original entry on oeis.org

3, 4, 6, 9, 31, 187, 632, 2972
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 12 2011

Keywords

Comments

a(9) > 20000. - Michael S. Branicky, Apr 13 2025

Examples

			a(1)=3 because 3*2^3-2*3^2-1=5 is prime, a(2)=4 because 4*3^4-3*4^3-1=131 is prime, a(3)=6 because 6*5^6-5*6^5-1=54869 is prime, a(4)=9 because 9*8^9-8*9^8-1=863585783 is prime.
		

Crossrefs

Cf. A191409 (associated primes).

Programs

  • Python
    from sympy import isprime
    def afind(limit, startk=1):
        for k in range(startk, limit+1):
            if isprime(k*(k-1)**k - (k-1)*k**(k-1) - 1):
                print(k, end=", ")
    afind(200) # Michael S. Branicky, Jan 10 2022

Extensions

a(8) from Michael S. Branicky, Jan 10 2022

A191715 Nonprime numbers of the form n*(n-1)^n - (n-1)*n^(n-1) + 1.

Original entry on oeis.org

1, 133, 54871, 1253659, 31438345, 863585785, 25867844011, 840625753991, 29488048443085, 1111334648458165, 44804977347486175, 1924820469011714611, 87800711122303545361, 4238935318038328143857, 11582179256389013503203871, 652184749150919163867112021
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 12 2011

Keywords

Comments

If n=3, then 3*2^3-2*3^2+1=7 is prime, so 7 is not in this sequence. If n=5, then 5*4^5-4*5^4+1=2621 is prime.

Crossrefs

Programs

  • Magma
    [ a: n in [2..40] | not IsPrime(a) where a is n*(n-1)^n-(n-1)*n^(n-1)+1 ]; // Vincenzo Librandi, Jun 13 2011
    
  • Mathematica
    Union[Select[Table[n(n-1)^n-(n-1)n^(n-1)+1,{n,30}],!PrimeQ[#]&]] (* Harvey P. Dale, Jun 19 2011 *)
  • PARI
    for(n=1,1e3,if(!ispseudoprime(k=n*(n-1)^n-(n-1)*n^(n-1)+1),print1(k", ")))
Showing 1-2 of 2 results.