|
|
|
|
0, 1, 2, 1, 2, 5, 1, 1, 8, 9, 10, 5, 5, 1, 11, 1, 16, 17, 18, 1, 8, 21, 1, 1, 7, 25, 26, 1, 12, 11, 1, 1, 32, 33, 29, 17, 31, 37, 14, 1, 1, 29, 42, 21, 26, 1, 1, 1, 1, 49, 16, 1, 30, 53, 21, 1, 56, 57, 58, 41, 50, 1, 8, 1, 8, 65, 66, 33, 47, 29, 1, 1, 72, 73
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Let M = [{2, 1}, {1, 0}], I = [{1, 0}, {0, 1}] is the 2 X 2 identity matrix, then A214028(n) is the smallest k > 0 such that M^k == r*I (mod n) for some r such that 0 <= r < n, and a(n) gives the value r.
A214027(n) is the multiplicative order of a(n) modulo n, which can only take value 1, 2 or 4.
|
|
LINKS
|
|
|
FORMULA
|
a(2^e) = 1; a(p^e) = a(p)^(p^(e-1)) mod p^e for odd primes p.
For odd primes p, a(p^e) = 1 if and only if A214028(p) == 2 (mod 4); a(p^e) = p^e - 1 if and only if 4 divides A214028(p).
|
|
EXAMPLE
|
For n = 7, {A000129(n) mod 7 : n > 0} = {1, 2, 5, 5, 1, 0, 1, ...}, so a(7) = 1. Also, A214028(7) = 6, and M^6 mod 7 = [{1, 0}, {0, 1}], so a(7) = 1.
|
|
MATHEMATICA
|
a[n_] := For[k = 1, True, k++, If[Divisible[Fibonacci[k, 2], n], Return[ Mod[ Fibonacci[k+1, 2], n]]]];
|
|
PROG
|
(PARI) a(n) = my(M=[2, 1; 1, 0]); for(k=1, 4*n/3, if((Mod(M, n)^k)[2, 1]==0, return(lift((Mod(M, n)^k)[1, 1]))))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|