login
a(n) is the number of eigensequences (including eigenvalues, where they exist) of the Fibonacci recurrence in Zp where p is prime(n).
1

%I #9 Jan 05 2025 19:51:42

%S 0,0,1,0,2,1,1,2,0,3,2,1,3,0,2,1,2,5,0,2,1,2,0,9,1,3,0,2,5,5,0,2,1,4,

%T 5,4,1,0,0,1,2,3,2,1,1,10,6,0,0,3,17,2,3,2,1,2,5,2,1,11,0,1,6,2,1,1,4,

%U 1,2,3,5,2,0,1,2,0,5,1,5,3,2,21,2,1,2,0

%N a(n) is the number of eigensequences (including eigenvalues, where they exist) of the Fibonacci recurrence in Zp where p is prime(n).

%C It appears that the indices m where a(m) = 0 give A270532.

%H M. Aoki, Y. Sakai, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Aoki/aoki4.html">On Equivalence Classes of Generalized Fibonacci Sequences</a>, JIS vol 19 (2016) # 16.2.6

%H H. Sedaghat, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/52-1/Sedaghat.pdf">Zero-Avoiding Solutions of the Fibonacci Recurrence Modulo A Prime</a>, Fibonacci Quart. 52 (2014), no. 1, 39-45. See p. 44.

%F a(n) = E(p)/(p-1) where p is prime(n) and E(p) = 4 if p=5; (p-1)^2/ep(n) + p - 1 if p==1 or 4 (mod 5); (p^2-1)/ep(n) + 1 - p if p==2 or 3 (mod 5), where ep(n) = A001602(n).

%p A344309 := proc(i)

%p local p,F ;

%p p := ithprime(i) ;

%p for n from 1 do

%p F := combinat[fibonacci](n) ;

%p if modp(F,p) =0 then

%p if modp(p,5) in {2,3} then

%p return (p+1)/n-1 ;

%p elif modp(p,5) in {1,4} then

%p return (p-1)/n+1 ;

%p else

%p return 1 ;

%p end if;

%p end if;

%p end do:

%p end proc;

%p seq(A344309(n),n=1..55) ; # _R. J. Mathar_, Feb 27 2023

%o (PARI) ep(n) = if(n==3, 5, my(p=prime(n)); fordiv(p^2-1, d, if(fibonacci(d)%p==0, return(d)))); \\ A001602

%o a(n) = {my(p=prime(n), mp = p % 5); my(x=if ((mp==0), 4, if ((mp==1) || (mp==4), (p-1)^2/ep(n) + p - 1, (p^2-1)/ep(n) + 1 - p))); x/(p-1);}

%Y Cf. A001602, A270532.

%K nonn

%O 1,5

%A _Michel Marcus_, May 14 2021