A346466 The least common multiple of all divisors d of n-1 such that d+1 is a prime divisor of n; a(1) = 1.
1, 1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 2, 1, 22, 1, 4, 1, 2, 1, 28, 1, 30, 1, 2, 1, 1, 1, 36, 1, 2, 1, 40, 1, 42, 1, 4, 1, 46, 1, 6, 1, 2, 1, 52, 1, 1, 1, 2, 1, 58, 1, 60, 1, 2, 1, 4, 1, 66, 1, 2, 1, 70, 1, 72, 1, 2, 1, 1, 1, 78, 1, 2, 1, 82, 1, 4, 1, 2, 1, 88, 1, 6, 1, 2, 1, 1, 1, 96, 1, 2, 1, 100, 1, 102, 1, 4
Offset: 1
Keywords
Examples
From _M. F. Hasler_, Nov 23 2021: (Start) For n = 2, the only prime factor of n is p = 2, and p-1 = 1 divides n-1 = 1, therefore a(2) = LCM { 1 } = 1. For n = 35, the prime factors of n are p = 5 and p = 7; but neither 5-1 = 4 nor 7-1 = 6 divides n-1 = 34, therefore a(35) = LCM {} = 1. (End)
Links
Programs
-
PARI
A346466(n) = lcm(apply(p->if((n-1)%(p-1),1,(p-1)), factor(n)[, 1]));
-
PARI
A346466(n) = if(1==n,n,my(m=1); fordiv(n-1,d,if(isprime(1+d)&&!(n%(1+d)),m = lcm(m,d))); (m));
-
PARI
apply( {A346466(n)=lcm([p-1|p<-factor(n)[,1],(n-1)%(p-1)==0])}, [1..99]) \\ M. F. Hasler, Nov 23 2021
Formula
a(n) = LCM_{p-1|n-1, p|n, p prime} (p-1).
a(n) = p-1 for prime powers n = p^e, e >= 1; a(n) = 1 for any even n = 2k. - M. F. Hasler, Nov 23 2021