Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Dec 27 2024 00:57:40
%S 1,3,4,6,9,12,12,10,16,21,10,22,18,36,20,22,24,18,18,52,14,30,36,22,
%T 49,60,52,44,14,60,30,46,38,24,76,22,54,18,46,58,30,36,64,30,92,36,24,
%U 22,80,147,66,74,76,52,18,44,70,42,58,118,42,30,44,94,102,114,96
%N a(n) is the least k such that all possible modular classes a Fibonacci number can take mod n is seen in the Fibonacci numbers Fibonacci(1)..Fibonacci(k).
%C In verifying if k is in A367420 we only need to look from 1 to a(n) to see if there is a Fibonacci number f that has a remainder of k when dividing by 2*k.
%e The remainders of Fibonacci numbers mod 4 (starting at Fibonacci(1) = 1) are 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3. The distinct values are {0, 1, 2, 3}. The least k such that the remainders of Fibonacci numbers mod 4 contain all these values is 6 as the first 6 remainders are 1, 1, 2, 3, 1, 0.
%o (PARI)
%o a(n) = {if(n == 1, return(1));
%o my(rems = vector(n^2), v = [1,1]);
%o rems[1] = 1;
%o for(i = 2, n^2,
%o rems[i] = v[2];
%o v = [v[2], v[1]+v[2]]%n;
%o if(v == [1,1],
%o break
%o )
%o );
%o s = Set(rems);
%o for(i = 1, #rems,
%o s = setminus(s, Set(rems[i]));
%o if(#s == 0,
%o return(i)
%o )
%o )
%o }
%Y Cf. A000045, A001175, A001177, A189768, A367420.
%K nonn
%O 1,2
%A _David A. Corneth_, Nov 19 2023