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.

A386277 For n >= 0, a(n) is the least Fibonacci number F_i (A000045) such that for some k >= 0, F_i = (n + 1)*(n + 2*k)/2, or a(n) = -1 if no such k exists.

This page as a plain text file.
%I A386277 #62 Aug 09 2025 14:41:07
%S A386277 0,1,3,34,55,21,21,-1,144,55,55,-1,377,987,6765,2584,2584,-1,2584,610,
%T A386277 987,6765,46368,-1,75025,377,14930352,-1,317811,6765,832040,14930352,
%U A386277 6765,-1,102334155,-1,4181,-1,317811,-1,6765,987,701408733,-1,1548008755920,-1,2178309,-1,225851433717
%N A386277 For n >= 0, a(n) is the least Fibonacci number F_i (A000045) such that for some k >= 0, F_i = (n + 1)*(n + 2*k)/2, or a(n) = -1 if no such k exists.
%C A386277 n even: F_i exists for all even n. Proof: For n even we have (n*(n + 1)/2) mod (n + 1) = 0. The residue 0 is among the residues of the Pisano period of (Fibonacci sequence mod (n + 1)) for all  n.
%C A386277 n odd: F_i exists only if the residue (n*(n + 1)/2) mod (n + 1) = (n + 1)/2 is among the residues of the Pisano period of (Fibonacci sequence mod (n + 1)).
%C A386277 Computational result: it looks like a(2*A367420(n) - 1) = -1, checked for n from [1, 2000].
%C A386277 The lower bound for nonnegative a(n) is n*(n + 1)/2.
%C A386277 Empirical observation: for a(n) = F_i, i = t*A001177(n + 1), t is from {1/3, 1/2, 2/3, 1, 3/2, 2}.
%H A386277 Michel Marcus, <a href="/A386277/b386277.txt">Table of n, a(n) for n = 0..3643</a>
%H A386277 Ctibor O. Zizka, <a href="/A386277/a386277.png">Ratio of i/Z(n+1) vs. n for n = 1 to 500. Z(n+1) = A001177(n+1)</a>
%e A386277 For n = 3: (3 + 1)*(3 + 2*k)/2 = 6 + 4*k is a Fibonacci number at first for k = 7. Thus a(3) = 34.
%e A386277 For n = 7: (7 + 1)*(7 + 2*k)/2 = 28 + 8*k. (Fib_i congruent to 4 mod 8) has no solution because the Fibonacci sequence modulo 8 has a period of 12: (1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0), the residues are {0, 1, 2, 3, 5, 7} and 4 is not among them. Thus a(7) = -1.
%e A386277 For n = 11: (11 + 1)*(11 + 2*k)/2 = 66 + 12*k . (Fib_i congruent to 6 mod 12) has no solution because the Fibonacci sequence modulo 12 has a period of 24: (1, 1, 2, 3, 5, 8, 1, 9, 10, 7, 5, 0, 5, 5, 10, 3, 1, 4, 5, 9, 2, 11, 1, 0), the residues are {0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11} and 6 is not among them. Thus a(11) = -1.
%o A386277 (PARI) isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));
%o A386277 row(n) = {my(L=List([0]), X=Mod([1, 1; 1, 0], n), I=Mod([1, 0; 0, 1], n), M=X); while(M<>I, M*=X; listput(L, lift(M[2, 2]))); Vec(L);} \\ A161553
%o A386277 a(n) = my(p=(n + 1)*(n + 2*k)/2, x=polcoef(p, 1, 'k), y = polcoef(p, 0, 'k), v=row(x)); if (!vecsearch(Set(v),y % x), return(-1)); my(j=0); while ((denominator(jj=((2*fibonacci(j) - n*(n+1))/(2*(n+1)))) != 1) || (numerator(jj)<0), j++); fibonacci(j); \\ _Michel Marcus_, Jul 19 2025
%Y A386277 Cf. A000045, A000217, A001175, A001177, A161553, A367420.
%K A386277 sign
%O A386277 0,3
%A A386277 _Ctibor O. Zizka_, Jul 17 2025
%E A386277 Corrected and extended by _Michel Marcus_, Jul 19 2025