login
A267016
Numbers that satisfy: (isqrt(n)-1)! = isqrt(n)-1 mod isqrt(n).
1
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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 121, 122, 123, 124, 125, 126, 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
OFFSET
1,2
COMMENTS
Numbers n such that A000196(n) is in A008578 (i.e. is either 1 or prime). - Robert Israel, Jan 09 2016
LINKS
EXAMPLE
For n = 26 it follows:
i = isqrt(26) = 5
(i-1)! = 24
(i-1)! = i-1 mod i
24 = 4 mod 5
MAPLE
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
MATHEMATICA
Select[Range@ 181, Function[n, Mod[(# - 1)!, #] == # - 1 &@ IntegerPart@ Sqrt@ n]] (* Michael De Vlieger, Jan 09 2016 *)
PROG
(Sidef)
10000.times { |n|
var i = n.isqrt;
if ((i-1)! % i == i-1) {
say n
}
}
(PARI) lista(nn) = for(n=1, nn, if(Mod((sqrtint(n)-1)!, sqrtint(n)) == sqrtint(n)-1, print1(n, ", "))); \\ Altug Alkan, Jan 12 2016
CROSSREFS
Sequence in context: A084688 A194898 A331271 * A023769 A023796 A032950
KEYWORD
nonn,easy
AUTHOR
Daniel Suteu, Jan 08 2016
STATUS
approved