This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A308948 #18 Jul 21 2024 03:45:55 %S A308948 0,1,1,1,3,1,6,5,1,3,10,1,8,13,4,9,16,1,18,9,13,21,1,13,18,5,1,13,12, %T A308948 19,30,17,10,33,6,1,31,37,25,29,32,13,1,21,19,1,46,25,48,43,16,25,1,1, %U A308948 21,41,37,17,58,49,1,61,55,33,18,43,66,33,1,41,70,37 %N A308948 a(n) = A006190(A322907(n)+1) mod n. %C A308948 A322907(n) is the smallest k > 0 such that n divides A006190(k). %C A308948 Let M = [{3, 1}, {1, 0}], I = [{1, 0}, {0, 1}] is the 2 X 2 identity matrix, then A322907(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. %C A308948 A322906(n) is the multiplicative order of a(n) modulo n, which can only take value 1, 2 or 4. %H A308948 Amiram Eldar, <a href="/A308948/b308948.txt">Table of n, a(n) for n = 1..10000</a> %F A308948 Also a(n) = A006190(A322907(n)-1) mod n. %F A308948 a(2^e) = 1 if e = 1, 2, 2^(e-1) + 1 if e >= 3; a(p^e) = a(p)^(p^(e-1)) mod p^e for odd primes p. %F A308948 For odd primes p, a(p^e) = 1 if and only if A322907(p) == 2 (mod 4); a(p^e) = p^e - 1 if and only if 4 divides A322907(p). %e A308948 For n = 7, {A006190(n) mod 7 : n > 0} = {1, 3, 3, 5, 4, 3, 6, 0, 6, ...}, so a(7) = 6. Also, A322907(7) = 8, and M^8 mod 7 = [{6, 0}, {0, 6}], so a(7) = 6. %t A308948 a[n_] := For[k = 1, True, k++, If[Divisible[Fibonacci[k, 3], n], Return[ Mod[Fibonacci[k + 1, 3], n]]]]; %t A308948 Array[a, 100] (* _Jean-François Alcover_, Jul 05 2019 *) %o A308948 (PARI) a(n) = my(M=[3, 1; 1, 0]); for(k=1, 12*n/7, if((Mod(M,n)^k)[2,1]==0, return(lift((Mod(M,n)^k)[1,1])))) %Y A308948 Cf. A006190, A322906, A322907. %Y A308948 Similar sequences: A217036, A308947. %K A308948 nonn %O A308948 1,5 %A A308948 _Jianing Song_, Jul 02 2019