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.

A084749 Numbers m such that m! + p is a prime, where p is the smallest prime > m.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 10, 33, 44, 48, 52, 64, 73, 92, 119, 182, 487, 603, 987, 4884, 6822, 8070, 11079, 13659, 17659
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 16 2003

Keywords

Comments

Next term, if it exists, is >4800. - Ryan Propper, Jan 02 2007
From Farideh Firoozbakht, Oct 21 2009: (Start)
Numbers corresponding to a(19)-a(24) are probable primes.
There is no further term up to 8300. (End)

Examples

			727 = 6! + 7 is a prime but 8! + 11 is composite hence 6 is a member but 8 is not.
7 is in the sequence because 7!=5040, nextprime(7)=11 and 5040+11 is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[k!+NextPrime[k]], Print[k]], {k, 0, 1525}] (* Farideh Firoozbakht, Feb 26 2004 *)
    Select[Range[0,500],PrimeQ[#!+NextPrime[#]]&] (* The program generates the first 19 terms of the sequence. *) (* Harvey P. Dale, Jul 16 2025 *)

Extensions

More terms from Farideh Firoozbakht, Feb 26 2004
Edited by N. J. A. Sloane at the suggestion of Artur Jasinski, Apr 14 2008
a(22)-a(24) from Farideh Firoozbakht, Oct 21 2009
a(25) from Michael S. Branicky, Aug 05 2024
a(26)-a(27) from Michael S. Branicky, May 25 2025

A092067 a(n) is the smallest number m such that m > 1 and m divides n^m + 1.

Original entry on oeis.org

2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89, 2, 7, 2, 3, 2, 5, 2, 97
Offset: 1

Views

Author

Farideh Firoozbakht, Mar 28 2004

Keywords

Comments

a(n)=2 iff n is odd. If n is even then every prime factor of n+1 is a solution of the equation (n^x + 1) mod x = 0, and if n is odd, the smallest prime factor of n+1 (2) is a solution of (n^x + 1) mod x = 0, so for each n, a(n) is not greater than the smallest prime factor of n+1.
Conjecture 1: All terms of this sequence are primes. We know if n is odd a(n) is the smallest prime factor of n+1.
Conjecture 2: For each n, a(n) is the smallest prime factor of n+1 or a(n)=A020639(n+1).
From Charlie Neder, Jun 16 2019: (Start)
Theorem: a(n) = A020639(n+1).
Proof: If a(n) is composite (kp, say) then n^(kp) == -1 (mod p), but then n^k is also congruent to -1 (mod p) by Fermat's little theorem, contradicting the assumption that a(n) was minimal. Thus, a(n) must be prime, and using Fermat's little theorem again shows that n^p == -1 (mod p) iff n == -1 (mod p), and A020639(n+1) gives the least p such that this is the case. (End)
The theorem plus the conjecture 2 in A092028 imply a(n) = A092028(n+2). - R. J. Mathar, Mar 21 2023

Examples

			a(6)=7 because 7 divides 6^7 + 1 and there doesn't exist m such that 1 < m < 7 and m divides 6^m + 1.
		

Crossrefs

Row n=2 of A333429.

Programs

  • Mathematica
    a[n_] := (For[k=2, Mod[n^k+1, k]>0, k++ ];k); Table[a[n], {n, 100}]
    snm[n_]:=Module[{m=2},While[PowerMod[n,m,m]!=m-1,m++];m]; Array[snm,100] (* Harvey P. Dale, Jul 31 2021 *)

A115976 Numbers k that divide 2^(k-2) + 1.

Original entry on oeis.org

1, 3, 49737, 717027, 9723611, 21335267, 32390921, 38999627, 43091897, 86071337, 101848553, 102361457, 228911411, 302948067, 370219467, 393664027, 455781089, 483464027, 1040406177, 1272206987, 2371678553, 2571052241, 2648052857, 3054713937, 3597613307, 3782971499, 3917903851, 4005163577, 5419912241
Offset: 1

Views

Author

Max Alekseyev, Mar 15 2006

Keywords

Comments

Some larger terms: 4465786944074559659, 1440261542571735083956640176981881665928575750093930787551969

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[ If[ PowerMod[2, 2n - 3, 2n - 1] == 2n - 2, AppendTo[lst, 2n - 1]], {n, 10^9}]; lst (* Robert G. Wilson v, Apr 04 2006 *)

Extensions

More terms from Robert G. Wilson v, Apr 04 2006
Terms a(24) onward from Max Alekseyev, Feb 03 2015
b-file corrected and extended by Max Alekseyev, Oct 27 2018
Showing 1-3 of 3 results.