

A301317


a(n) = (n1)! + 1 mod n^3.


2



0, 2, 3, 7, 25, 121, 35, 433, 226, 881, 495, 1, 676, 1233, 2701, 2049, 4420, 1, 4009, 1, 2647, 6425, 4945, 1, 626, 15393, 1, 1, 13137, 1, 21731, 1, 13069, 2041, 1, 1, 23532, 19153, 50194, 1, 14104, 1, 41237, 1, 1, 76729, 86433, 1, 1, 1, 78031, 1, 77645
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

There is no known number n > 1 for which a(n)=0.
For a(n) to equal 1, (n1)! must be divisible by n^3 which tends to be the most frequent case for large n. For example, all n which are a product of three or more distinct primes belong to this category. So do all proper powers of primes except 2^2, 2^3, 2^4, 3^2, and 5^2.
Obviously, when a(n) = 1, then also A055976(n) = 1 and A301316(n) = 1.
If n is prime, a(n) is divisible by n.  Robert Israel, Mar 20 2018


LINKS

Stanislav Sykora, Table of n, a(n) for n = 1..10000
Wikipedia, Wilson prime


FORMULA

a(n) = ((n1)! + 1) mod n^3.  Jon E. Schoenfield, Mar 18 2018
a(n) = A038507(n1) mod A000578(n).  Michel Marcus, Mar 20 2018


EXAMPLE

From Muniru A Asiru, Mar 20 2018: (Start)
((11)! + 1) mod 1^3 = (0! +1) mod 1 = 2 mod 1 = 0.
((21)! + 1) mod 2^3 = (1! +1) mod 8 = 2 mod 8 = 2.
((31)! + 1) mod 3^3 = (2! +1) mod 27 = 3 mod 27 = 3.
((41)! + 1) mod 4^3 = (3! +1) mod 64 = 7 mod 64 = 7.
((51)! + 1) mod 5^3 = (4! +1) mod 125 = 25 mod 125 = 25.
... (End)


MAPLE

seq((factorial(n1)+1) mod n^3, n=1..60); # Muniru A Asiru, Mar 20 2018


MATHEMATICA

Array[Mod[(#  1)! + 1, #^3] &, 53] (* Michael De Vlieger, Mar 19 2018 *)


PROG

(PARI) a(n) = ((n1)! + 1) % n^3; \\ Michel Marcus, Mar 18 2018
(GAP) List([1..60], n>(Factorial(n1)+1) mod n^3); # Muniru A Asiru, Mar 20 2018


CROSSREFS

Cf. A000578, A038507, A055976, A301316.
Sequence in context: A094697 A095910 A074189 * A325125 A091230 A063852
Adjacent sequences: A301314 A301315 A301316 * A301318 A301319 A301320


KEYWORD

nonn


AUTHOR

Stanislav Sykora, Mar 18 2018


STATUS

approved



