login
A133933
a(n) = (1 + n * (n - 2) + (n - 1)!) mod (4*n).
1
1, 2, 6, 15, 0, 1, 0, 1, 28, 1, 0, 25, 0, 1, 16, 33, 0, 1, 0, 41, 64, 1, 0, 49, 76, 1, 28, 57, 0, 1, 0, 65, 100, 1, 36, 73, 0, 1, 40, 81, 0, 1, 0, 89, 136, 1, 0, 97, 148, 1, 52, 105, 0, 1, 56, 113, 172, 1, 0, 121, 0, 1, 64, 129, 196, 1, 0, 137, 208, 1, 0, 145, 0, 1, 76, 153
OFFSET
1,2
REFERENCES
Adalbert Kerber, Applied Finite Group Actions, Springer, 2nd Revised and Expanded Edition, p. 114.
LINKS
FORMULA
a(n) = 0 if n >= 5 is prime.
For composite n > 8, a(n) = n * ((n-2) mod 4) + 1. - Ivan Neretin, Jun 25 2015
MAPLE
seq((1 + n*(n-2)+(n-1)!) mod (4*n), n = 1 .. 1000); # Robert Israel, Jun 25 2015
MATHEMATICA
Table[Mod[1 + n (n - 2) + (n - 1)!, 4 n], {n, 80}] (* Michael De Vlieger, Jul 01 2015 *)
PROG
(PARI) vector(80, n, (1 + n*(n - 2) + (n - 1)!) % (4*n)) \\ Michel Marcus, Jun 25 2015
(Magma) [(1+n*(n-2)+Factorial(n-1)) mod (4*n): n in [1..80]]; // Vincenzo Librandi, Feb 18 2018
(GAP) List([1..80], n -> (1+n*(n-2)+Factorial(n-1)) mod (4*n)); # Muniru A Asiru, Feb 18 2018
CROSSREFS
Sequence in context: A131518 A222201 A130642 * A297574 A349984 A375005
KEYWORD
nonn
AUTHOR
Neven Juric, Feb 04 2010
STATUS
approved