login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A059955 a(n) = floor( prime(n)!/lcm(1..prime(n)) ) modulo prime(n). 1

%I #11 Sep 08 2022 08:45:03

%S 1,2,5,10,3,10,4,3,28,17,18,30,20,41,42,14,19,30,37,63,50,7,12,83,30,

%T 91,19,69,91,97,56,22,80,39,137,44,9,154,19,37,141,141,168,126,183,

%U 200,205,136,55,95,204,126,213,230,68,63,158,202,162,102,182,104,38,165

%N a(n) = floor( prime(n)!/lcm(1..prime(n)) ) modulo prime(n).

%C a(n) gives also the smallest coefficient for which the multiple M of lcm(1 through p(n)-1) satisfies p(n) divides M + 1. This computes the solution of the puzzle requiring the smallest number such that grouping in 2's, 3's, etc. up to the n-th prime,all leave a remainder of one except the last which leaves no remainder.

%e a(2)=1 because prime(2)=3 and floor(3!/lcm(1,2,3)) mod 3 = 1 mod 3 = 1;

%e a(3)=2 because prime(3)=5 and floor(5!/lcm(1,2,3,4,5)) mod 5 = 2 mod 5 = 2;

%e a(4)=5 because prime(4)=7 and floor(7!/lcm(1,2,3,4,5,6,7)) mod 7 = 12 mod 7 = 5;

%e a(7)=10 because prime(7)=17 and floor(17!/lcm(1,2,...,17)) mod 17 = 29030400 mod 17 = 10.

%p for n from 2 to 150 do printf(`%d,`, floor(ithprime(n)!/ilcm(i $ i=1..ithprime(n))) mod ithprime(n) ); od:

%o (Magma) [Floor( Factorial(p)/Lcm([1..p]) ) mod p: p in PrimesInInterval(3,400)]; // _Bruno Berselli_, Feb 08 2015

%Y Cf. A003418, A025527, A099796.

%K nonn

%O 2,2

%A _Lekraj Beedassy_, Mar 13 2001

%E More terms from _James A. Sellers_, Mar 15 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 6 19:40 EDT 2024. Contains 375718 sequences. (Running on oeis4.)