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!)
A267016 Numbers that satisfy: (isqrt(n)-1)! = isqrt(n)-1 mod isqrt(n). 1

%I #20 Feb 13 2016 17:17:33

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25,26,27,28,29,30,31,32,33,34,35,

%T 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,121,122,123,124,125,126,

%U 127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,169,170,171,172,173,174,175,176,177,178,179,180,181

%N Numbers that satisfy: (isqrt(n)-1)! = isqrt(n)-1 mod isqrt(n).

%C Numbers n such that A000196(n) is in A008578 (i.e. is either 1 or prime). - _Robert Israel_, Jan 09 2016

%H Daniel Suteu, <a href="/A267016/b267016.txt">Table of n, a(n) for n = 1..20000</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Wilson&#39;s_theorem">Wilson's theorem</a>

%e For n = 26 it follows:

%e i = isqrt(26) = 5

%e (i-1)! = 24

%e (i-1)! = i-1 mod i

%e 24 = 4 mod 5

%p seq(`if`(t=1 or isprime(t),seq(i,i=t^2..(t+1)^2-1), NULL), t=1..100); # _Robert Israel_, Jan 09 2016

%t Select[Range@ 181, Function[n, Mod[(# - 1)!, #] == # - 1 &@ IntegerPart@ Sqrt@ n]] (* _Michael De Vlieger_, Jan 09 2016 *)

%o (Sidef)

%o 10000.times { |n|

%o var i = n.isqrt;

%o if ((i-1)! % i == i-1) {

%o say n

%o }

%o }

%o (PARI) lista(nn) = for(n=1, nn,if(Mod((sqrtint(n)-1)!, sqrtint(n)) == sqrtint(n)-1, print1(n, ", "))); \\ _Altug Alkan_, Jan 12 2016

%Y Cf. A000196, A000578.

%K nonn,easy

%O 1,2

%A _Daniel Suteu_, Jan 08 2016

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 April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)