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

A212552 Smallest prime factor of p^p - 1 that is congruent to 1 modulo p where p = prime(n).

Original entry on oeis.org

3, 13, 11, 29, 15797, 53, 10949, 109912203092239643840221, 461, 59, 568972471024107865287021434301977158534824481, 149, 83, 173, 1693, 107, 709, 977, 269, 105649, 293, 317, 2657, 179, 389, 607, 1237, 137122213, 2617, 227, 509, 1049, 1097, 557, 1193, 2417, 86351
Offset: 1

Views

Author

Michel Lagneau, May 20 2012

Keywords

Comments

Subset of A187023.
If p is a prime, then p^p-1 has at least a prime factor that is congruent to 1 modulo p.
Also smallest prime factor of (p^p - 1)/(p - 1). - Jianing Song, Nov 03 2019

Examples

			a(4) = 29 because prime(4) = 7 and 7^7 -1 = 823542 = 2 * 3 * 29 * 4733 => 29 == 1 (mod 7).
		

Crossrefs

Cf. A187023.

Programs

  • Maple
    with(numtheory): for n from 1 to 34 do:i:=0:p:=ithprime(n):x:=p^p -1:y:=factorset(x):n1:=nops(y):for k from 1 to n1 while(i=0) do:z:=y[k]:if irem(z,p)=1 then i:=1: printf ( "%d %d \n",n,z):else fi:od:od:
  • Mathematica
    Table[p=First/@FactorInteger[Prime[n]^Prime[n]-1]; Select[p, Mod[#1, Prime[n]] == 1 &, 1][[1]], {n, 1, 10}]

A187025 a(n) is the least number k such that k*n+1 is a prime dividing n^n-1.

Original entry on oeis.org

1, 4, 1, 2, 1, 4, 2, 2, 1, 1436, 1, 4, 501969, 4, 1, 644, 1, 5784852794328402307380, 2, 2, 1, 20, 3, 4, 36, 4, 1, 2, 1, 18353950678197027912484562396837972855962080, 8, 2, 3, 8, 1, 4, 5, 4, 1, 2, 1, 4, 2, 4, 1, 36, 2, 4, 3, 128, 1, 2, 5, 85840, 2, 4, 1, 12, 1, 16, 273
Offset: 2

Views

Author

Michel Lagneau, Mar 02 2011

Keywords

Comments

The smallest prime factor of n^n-1 of the form k*n+1 is A187023(n).

Examples

			7^7-1 = 2*3*29*4733; the smallest prime divisor of the form k*n+1 is 29 = 4*7+1, hence a(7) = 4.
		

Crossrefs

Programs

  • Magma
    A187025:=function(n); for d in PrimeDivisors(n^n-1) do if d mod n eq 1 then return (d-1)/n; end if; end for; return 0; end function; [ A187025(n): n in [2..50] ]; // Klaus Brockhaus, Mar 02 2011
  • Mathematica
    Table[p=First/@FactorInteger[n^n-1]; (Select[p, Mod[#1, n] == 1 &, 1][[1]] - 1)/n, {n, 2, 40}]

A216487 Smallest prime factor of n^(2n) - 1 having the form k*n+1.

Original entry on oeis.org

3, 7, 5, 11, 7, 29, 17, 19, 11, 23, 13, 53, 29, 31, 17, 10949, 19, 108301, 41, 43, 23, 47, 73, 101, 53, 109, 29, 59, 31, 373, 257, 67, 103, 71, 37, 149, 191, 79, 41, 83, 43, 173, 89, 181, 47, 659, 97, 197, 101, 103, 53, 107, 109, 881, 113, 229, 59, 709, 61, 977
Offset: 2

Views

Author

Michel Lagneau, Sep 11 2012

Keywords

Comments

The corresponding values of k are in A216506.

Examples

			a(7) = 29 because 7^14 - 1 = 2 ^ 4 * 3 * 29 * 113 * 911 * 4733 and the smallest prime divisor of the form k*n+1 is 29 = 4*7+1.
		

Crossrefs

Programs

  • Mathematica
    Table[p=First/@FactorInteger[n^(2*n)-1]; Select[p, Mod[#1, n] == 1 &, 1][[1]], {n, 2, 41}]
    a[n_] := Module[{m = n + 1}, While[!PrimeQ[m] || PowerMod[n, 2*n, m] != 1, m += n]; m]; Array[a, 100, 2] (* Amiram Eldar, May 17 2024 *)
  • PARI
    a(n) = {my(m = n + 1); while(!isprime(m) || Mod(n, m)^(2*n) != 1, m += n); m;} \\ Amiram Eldar, May 17 2024

Formula

a(n) = Min{A187022(n), A187023(n)}.

Extensions

Data corrected by Amiram Eldar, May 17 2024

A216506 Least number k such that k*n+1 is a prime dividing n^(2n) - 1.

Original entry on oeis.org

1, 2, 1, 2, 1, 4, 2, 2, 1, 2, 1, 4, 2, 2, 1, 644, 1, 5700, 2, 2, 1, 2, 3, 4, 2, 4, 1, 2, 1, 12, 8, 2, 3, 2, 1, 4, 5, 2, 1, 2, 1, 4, 2, 4, 1, 14, 2, 4, 2, 2, 1, 2, 2, 16, 2, 4, 1, 12, 1, 16, 273, 2, 3, 2, 1, 4, 2, 2, 1, 246, 1, 4, 2, 2, 16, 8, 1, 4, 15, 2, 1, 2, 4, 12
Offset: 2

Views

Author

Michel Lagneau, Sep 11 2012

Keywords

Comments

The corresponding prime factors of n^(2n)-1 of the form k*n+1 is in A216487.

Examples

			a(7) = 4 because 7^14 - 1 = 2 ^ 4 * 3 * 29 * 113 * 911 * 4733 and the smallest prime divisor of the form k*n+1 is 29 = 4*7+1 => k = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[p=First/@FactorInteger[n^(2*n)-1]; (Select[p, Mod[#1, n] == 1 &, 1][[1]]-1)/n, {n, 2, 50}]
    a[n_] := Module[{m = n + 1}, While[!PrimeQ[m] || PowerMod[n, 2*n, m] != 1, m += n]; (m - 1)/n]; Array[a, 100, 2] (* Amiram Eldar, May 17 2024 *)
  • PARI
    a(n) = {my(m = n + 1); while(!isprime(m) || Mod(n, m)^(2*n) != 1, m += n); (m - 1)/n;} \\ Amiram Eldar, May 17 2024

Extensions

Data corrected and extended by Amiram Eldar, May 17 2024
Showing 1-4 of 4 results.