/All/
|
index
catalog
recent
update
post
|
/math/
/tech/
/misc/
/free/
/meta/
/test/
|
Guide
light
mod
Log
P12225
Thu 2022-09-22 20:24:07
link
reply
Observe that
[tex:
(2 − 1)! + 1 = 2
^
1
]
,
[tex:
(3 − 1)! + 1 = 3
^
1
]
,
[tex:
(5 − 1)! + 1 = 5
^
2
]
.
Are there any other primes p such that (p − 1)! + 1 is a power of p?
P12234
Thu 2022-09-22 21:51:02
link
reply
The only natural numbers with this property up to 10000 are 2, 3 and 5. I was too lazy to only test primes.
[code]
(define (logt x b)
(/ (log x) (log b)))
(define (! n)
(let loop ((n n) (acc 1))
(if (= n 0)
acc
(loop (- n 1) (* acc n)))))
(define (range a b)
(let loop ((b b) (acc '()))
(if (> a b)
acc
(loop (- b 1) (cons b acc)))))
(define err 1.0e-10)
(define (test a b)
(filter (lambda (entry)
(< (abs (- (cadr entry) (round (cadr entry)))) err))
(map (lambda (n)
(list n (logt (+ (! (- n 1)) 1) n)))
(range a b))))
(display (test 1 10000))
(newline)
[/code]
Output:
[code]
((2 1.0) (3 1.0) (5 2.0))
[/code]
Referenced by:
P12237
P12286
Fri 2022-09-23 11:47:36
link
reply
26930a94544028391620acaab114a48b9277fddb1f435fca9ca22f0be4c61e3d.jpg
232 KiB 1200x1669
At the very least, for p>3, the exponent has to be even.
Referenced by:
P12289
P12304
Fri 2022-09-23 18:31:44
link
reply
We can prove fairly easily that composite numbers can't have this property. If n is a composite number, there is some prime number p less than n which divides n. Since (n-1)! is a multiple of p, (n-1)! + 1 cannot be a multiple of p, which means it cannot be a power of n.
Referenced by:
P12457
Mod Controls:
x
Reason: