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.

A370526 Square array read by descending antidiagonals: Define function b(i,n,k) where b(0,n,k) = n, b(1,n,k) = k, b(i,n,k) = A038502(b(i-1,n,k) + b(i-2,n,k)). T(n,k) is the number of steps until reaching the cyclic part of {b(i,n,k)}, or -1 if no cycle exists.

This page as a plain text file.
%I A370526 #32 Apr 13 2025 20:50:47
%S A370526 0,0,0,12,0,4,3,24,13,7,6,0,14,0,1,11,12,11,5,5,18,17,12,23,0,15,4,3,
%T A370526 2,4,19,2,8,5,1,1,17,3,4,24,0,13,12,7,5,4,11,14,10,27,23,10,19,14,5,4,
%U A370526 6,10,0,11,14,9,0,12,1,4,14,13,11,10,22,10,29,15
%N A370526 Square array read by descending antidiagonals: Define function b(i,n,k) where b(0,n,k) = n, b(1,n,k) = k, b(i,n,k) = A038502(b(i-1,n,k) + b(i-2,n,k)). T(n,k) is the number of steps until reaching the cyclic part of {b(i,n,k)}, or -1 if no cycle exists.
%C A370526 b(i,n,k) = (b(i-1,n,k) + b(i-2,n,k))/p^valuation(b(i-1,n,k) + b(i-2,n,k), p), i.e., b(i,n,k) is b(i-1,n,k) + b(i-2,n,k) with all factors of p removed, where p = 3 in this sequence. Therefore, b(i,n,k) is not divisible by 3 for i >= 3.
%C A370526 At least one of b(i,n,k) < b(i-1,n,k) + b(i-2,n,k) and b(i+1,n,k) < b(i-1,n,k) + b(i,n,k) is true for i >= 5.
%C A370526 It appears that all repetends have the form of (1, 1, 2) (the position of 2 possibly changed), multiplied by G = A038502(gcd(n,k)).
%C A370526 Conjecture: T(n,k) >= 0.
%C A370526 This conjecture can be supported by a heuristic argument: Using dynamic programming, we can compute that for p's in A000057, the probability that b(i-1,n,k) + b(i-2,n,k) is not divisible by p is (p-2)/p, and the probability that valuation(b(i-1,n,k) + b(i-2,n,k), p) = x (x >= 1) is 2*(p-1)/p^(x+1). Therefore, the mathematical expectation of a(i) is (a(i-1,n,k) + a(i-2,n,k))*(p-1)/(p+1), which is exactly the average of the earlier two terms when p = 3, and larger when p >= 5.
%H A370526 Yifan Xie, <a href="/A370526/b370526.txt">Rows n = 1..100 of triangle, flattened</a>
%F A370526 T(n,k) = 0 iff n = k, n = 2*k or k = 2*n and gcd(x,y) is not divisible by 3.
%e A370526 Array begins:
%e A370526   n\k|  1   2   3   4   5   6   7
%e A370526   ---+--------------------------------
%e A370526   1  |  0,  0, 12,  3,  6, 11, 17, ...
%e A370526   2  |  0,  0, 24,  0, 12, 12,  4, ...
%e A370526   3  |  4, 13, 14, 11, 23, 19,  4, ...
%e A370526   4  |  7,  0,  5,  0,  2, 24, 10, ...
%e A370526   5  |  1,  5, 15,  8,  0, 27, 11, ...
%e A370526   6  | 18,  4,  5, 13, 23, 14, 10, ...
%e A370526   7  |  3,  1, 12, 10,  9,  7, 29, ...
%e A370526   ...
%e A370526 T(1,4) = 3 because its sequence b begins with b(0) = 1, b(1) = 4, b(2) = A038502(1+4) = 5, b(3) = A038502(4+5) = 1, b(4) = 2, b(5) = 1, b(6) = 1, which has reached the cyclic part of (1, 2, 1) at i=3.
%o A370526 (PARI) T(n, k)={my(i=-1, z=0); while((z != 2*n || z != 2*k) && (n != 2*z || n != 2*k) && (k != 2*n || k != 2*z), z=n; n=k; k=(z+n)/3^(valuation(z+n, 3)); i++); i; };
%Y A370526 Cf. A000057, A038502, A369876.
%K A370526 nonn,tabl
%O A370526 1,4
%A A370526 _Yifan Xie_, Feb 21 2024