cp's OEIS Frontend

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.

A367477 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).

This page as a plain text file.
%I A367477 #17 Dec 27 2024 00:57:40
%S A367477 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 A367477 49,60,52,44,14,60,30,46,38,24,76,22,54,18,46,58,30,36,64,30,92,36,24,
%U A367477 22,80,147,66,74,76,52,18,44,70,42,58,118,42,30,44,94,102,114,96
%N A367477 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 A367477 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 A367477 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 A367477 (PARI)
%o A367477 a(n) = {if(n == 1, return(1));
%o A367477 	my(rems = vector(n^2), v = [1,1]);
%o A367477 	rems[1] = 1;
%o A367477 	for(i = 2, n^2,
%o A367477 		rems[i] = v[2];
%o A367477 		v = [v[2], v[1]+v[2]]%n;
%o A367477 		if(v == [1,1],
%o A367477 			break
%o A367477 		)
%o A367477 	);
%o A367477 	s = Set(rems);
%o A367477 	for(i = 1, #rems,
%o A367477 		s = setminus(s, Set(rems[i]));
%o A367477 		if(#s == 0,
%o A367477 			return(i)
%o A367477 		)
%o A367477 	)
%o A367477 }
%Y A367477 Cf. A000045, A001175, A001177, A189768, A367420.
%K A367477 nonn
%O A367477 1,2
%A A367477 _David A. Corneth_, Nov 19 2023