A358404 Multipliers involving Fibonacci-like sequences and Pythagorean triples.
2, 3, 5, 8, 13, 21, 23, 34, 41, 61, 85, 89, 144, 233, 255, 264, 377, 383, 397, 443, 610, 762, 875, 987
Offset: 1
Examples
m = m(5, 0) = 2, since the Fibonacci-like sequence (G_n) with G_0 = 4 and G_1 = 3 has G_3 = 10 and (m*G_0, m*G_1, G_3) = (8, 6, 10) is a Pythagorean triple. Since m = 2 is the smallest positive integer with this property, m(1) = 2.
Crossrefs
Cf. A000045.
Programs
-
Mathematica
(* Fibonacci entry point *) T[m_] := Module[{fi = FactorInteger[m], lenN, i, fi2, p, e, q, n1, divs, nDivs, d, found, preres, result = 1}, If[m == 1, Return[1]]; len = Length[fi]; {p, e} = fi[[1]]; q = p^e; If[len == 1, If[p == 5, Return[q]]; If[e == 1, result = p - JacobiSymbol[p, 5]; While[EvenQ[result] && Mod[Fibonacci[result], m] == 0, result /= 2]; If[Mod[Fibonacci[result], m] != 0, result *= 2]; fi2 = FactorInteger[result]; If[EvenQ[result], Drop[fi2, 1]]; n1 = Product[fi2[[i, 1]]^fi2[[i, 2]], {i, Length[fi2]}]; divs = Divisors[n1]; nDivs = Length[divs]; found = False; For[i = 2, i <= nDivs && ! found, i++, d = divs[[i]]; If[Mod[Fibonacci[d], m] == 0, found = True; result = d; Return[result]; ]; ], result = p^(e - 1 - If[p == 2 && e > 2, 1, 0])*T[p]; Return[result]; ], result = LCM[T[q], T[m/q]]; ]; result ]; (* Good moduli *) GoodQ[m_] := Module[{fi, len, i, p, t}, If[m < 5, Return[False]]; fi = FactorInteger[m]; len = Length[fi]; For[i = 1, i <= len, i++, p = fi[[i, 1]]; If[Mod[p, 4] != 1, Return[False]]; ]; True ]; (* Great moduli *) GreatQ[m_] := GoodQ[m] && OddQ[T[m]]; (* Fibonacci modular ratio *) R[c_, k_] := Module[{f0 = Fibonacci[k], f1}, If[GCD[f0, c] > 1, Return[$Failed]]; f1 = Fibonacci[k + 1]; Mod[f1*PowerMod[f0, -1, c], c] ]; (* Starting pair for Fibonacci-like sequence *) StartingPair[c_] := Module[{pr, len, i, r0, t, n, r, u, v, g0, g1, preres}, If[! GreatQ[c], Return[$Failed]]; t = T[c]; n = (t + 1)/2; r0 = R[c, n - 1]; pr = PowersRepresentations[c, 2, 2]; len = Length[pr]; For[i = 1, i <= len, i++, {u, v} = pr[[i]]; If[GCD[u, v] == 1, r = Mod[v*PowerMod[u, -1, c], c]; preres = {Abs[u^2 - v^2], 2 u*v}; If[r == c - r0, Return[preres]]; If[r == r0, Return[Reverse[preres]]]; ]; ]; $Failed ]; (* Great modulus multiplier *) M[c_, j_] := Module[{t, n0, n, g0, g1, result}, If[! GreatQ[c], Return[$Failed]]; {g0, g1} = StartingPair[c]; t = T[c]; n0 = (t + 1)/2; n = n0 + j*t; (g0*Fibonacci[n - 1] + g1*Fibonacci[n])/c ]; (* Master table *) MasterTable[mMax_] := Module[{c, j, m, g0, g1, t, n0, n, done, result = {}}, For[c = 5, c <= GoldenRatio*mMax^2, c += 4, While[! GreatQ[c], c += 4]; If[c <= GoldenRatio*mMax^2, {g0, g1} = StartingPair[c]; t = T[c]; n0 = (t + 1)/2; For[j = 0, j <= JMax[mMax, n0], j++, n = n0 + j*t; m = M[c, j]; If[m <= mMax, AppendTo[result, {g0, g1, c, m, n}]]; ]; ]; ]; result ]; (* Multiplier list *) MList[mMax_] := Union[MasterTable[mMax][[All, 4]]];
Formula
Each element of this list has a unique representation of the form m = m(c, j) = G_n / c, where j is an arbitrary nonnegative integer and c is "good", meaning that all of its prime divisors are of the form 4k + 1 and the Fibonacci entry point t of c is odd, in which case n = ((2j + 1)t + 1)/2 and (G_0, G_1, c) is the unique primitive Pythagorean triple such that G_0/G_1 is congruent to F_n/F_{n-1} modulo c.
Comments