- 
                Notifications
    You must be signed in to change notification settings 
- Fork 85
Erdős problem #1074 #1125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            smmercuri
  wants to merge
  4
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
erdos-1074
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Erdős problem #1074 #1125
Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            4 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| /- | ||
| Copyright 2025 The Formal Conjectures Authors. | ||
|  | ||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|  | ||
| https://www.apache.org/licenses/LICENSE-2.0 | ||
|  | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| -/ | ||
|  | ||
| import FormalConjectures.Util.ProblemImports | ||
|  | ||
| /-! | ||
| # Erdős Problem 1074 | ||
|  | ||
| *Reference:* [erdosproblems.com/1074](https://www.erdosproblems.com/1074) | ||
| -/ | ||
|  | ||
| open scoped Nat | ||
|  | ||
| /-- The EHS numbers (after Erdős, Hardy, and Subbarao) are those $m\geq 1$ such that there | ||
| exists a prime $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$.-/ | ||
| abbrev Nat.EHSNumbers : Set ℕ := { m | 1 ≤ m ∧ ∃ p, ¬ p ≡ 1 [MOD m] ∧ p ∣ m ! + 1} | ||
|         
                  smmercuri marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved         
                  smmercuri marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| /-- The Pillai primes are those primes $p$ such that there exists an $m$ with | ||
| $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$-/ | ||
| abbrev Nat.PillaiPrimes : Set ℕ := {p | p.Prime ∧ ∃ m, ¬p ≡ 1 [MOD m] ∧ p ∣ m ! + 1} | ||
|  | ||
| namespace Erdos1074 | ||
|  | ||
| open Nat | ||
|  | ||
| /-- Let $S$ be the set of all $m\geq 1$ such that there exists a prime $p\not\equiv 1\pmod{m}$ such | ||
| that $m! + 1 \equiv 0\pmod{p}$. Does | ||
| $$ | ||
| \lim\frac{|S\cap[1, x]|}{x} | ||
| $$ | ||
| exist? What is it? -/ | ||
| @[category research open, AMS 11] | ||
| theorem erdos_1074.parts.i : (∃ c, EHSNumbers.HasDensity c) ↔ answer(sorry) := by | ||
| sorry | ||
|         
                  smmercuri marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
|  | ||
| /-- Similarly, if $P$ is the set of all primes $p$ such that there exists an $m$ with | ||
| $p\not\equiv 1\pmod{m}$ such that $m! + 1 \equiv 0\pmod{p}$, then does | ||
| $$ | ||
| \lim\frac{|P\cap[1, x]|}{\pi(x)} | ||
| $$ | ||
| exist? What is it?-/ | ||
| @[category research open, AMS 11] | ||
| theorem erdos_1074.parts.ii : (∃ c, PillaiPrimes.HasDensity c {p | p.Prime}) ↔ answer(sorry) := by | ||
| sorry | ||
|  | ||
| /-- Pillai [Pi30] raised the question of whether there exist any primes in $P$. This was answered | ||
| by Chowla, who noted that, for example, $14! + 1 \equiv 18! + 1 \equiv 0 \pmod{23}$.-/ | ||
| @[category test, AMS 11] | ||
| theorem erdos_1074.variants.mem_pillaiPrimes : 23 ∈ PillaiPrimes := by | ||
| norm_num | ||
| exact ⟨14, by decide⟩ | ||
|  | ||
| /-- Erdős, Hardy, and Subbarao proved that $S$ is infinite. -/ | ||
| @[category research solved, AMS 11] | ||
| theorem erdos_1074.variants.EHSNumbers_infinite : EHSNumbers.Infinite := by | ||
| sorry | ||
|  | ||
| /-- Erdős, Hardy, and Subbarao proved that $P$ is infinite. -/ | ||
| @[category research solved, AMS 11] | ||
| theorem erdos_1074.variants.PillaiPrimes_infinite : PillaiPrimes.Infinite := by | ||
| sorry | ||
|  | ||
| /-- The sequence $S$ begins $8, 9, 13, 14, 15, 16, 17, ...$ -/ | ||
| @[category test, AMS 11] | ||
| theorem erdos_1074.variants.EHSNumbers_init : | ||
| nth EHSNumbers '' (Set.Icc 0 6) = {8, 9, 13, 14, 15, 16, 17} := by | ||
| sorry | ||
|  | ||
| /-- The sequence $P$ begins $23, 29, 59, 61, 67, 71, ...$ -/ | ||
| @[category test, AMS 11] | ||
| theorem erdos_1074.variants.PillaiPrimes_init : | ||
| nth PillaiPrimes '' (Set.Icc 0 5) = {23, 29, 59, 61, 67, 71} := by | ||
| sorry | ||
|  | ||
| /-- Regarding the first question, Hardy and Subbarao computed all EHS numbers up to $2^{10}$, and | ||
| write '...if this trend conditions we expect [the limit] to be around 0.5, if it exists.` -/ | ||
| @[category research open, AMS 11] | ||
| theorem erdos_1074.variants.EHSNumbers_one_half : EHSNumbers.HasDensity (1 / 2) := by | ||
| sorry | ||
|  | ||
| end Erdos1074 | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.