A378943 Numbers obtained from the tribonacci triangle formed by the number of connection points in the paths obtained by Pell walk on the square grid.
2, 3, 7, 13, 25, 46, 86, 158, 292, 537, 989, 1819, 3347, 6156, 11324, 20828, 38310, 70463, 129603, 238377, 438445, 806426, 1483250, 2728122, 5017800, 9229173, 16975097, 31222071, 57426343, 105623512, 194271928, 357321784, 657217226, 1208810939, 2223349951, 4089378117
Offset: 1
Examples
For n = 4 a(4) = a(3) + a(2) + a(1) + 1 = 2 + 3 + 7 + 1 = 13. For n = 5 a(5) = a(4) + a(3) + a(2) + 2 = 3 + 7 + 13 + 2 = 25.
References
- T. Koshy, Pell and Pell-Lucas Numbers with Applications, Springer Science-Business Media New York, 2014, 227-253.
Links
- E. Namlı, Tribonacci ve lucas sayılarının üreteç fonksiyonları yardımıyla oluşan bazı özdeşlikler, Master's thesis, Bursa Uludag University (Turkey), 2020, 2-16.
- Index entries for linear recurrences with constant coefficients, signature (1,2,0,-1,-1).
Programs
-
Mathematica
LinearRecurrence[{1, 2, 0, -1, -1}, {2, 3, 7, 13, 25}, 36] (* Hugo Pfoertner, Jan 09 2025 *)
-
Python
def a(n, memo={}): if n == 1: return 2 elif n == 2: return 3 elif n == 3: return 7 if n in memo: return memo[n] if n % 2 == 1: memo[n] = a(n - 3, memo) + a(n - 2, memo) + a(n - 1, memo) + 2 else: memo[n] = a(n - 3, memo) + a(n - 2, memo) + a(n - 1, memo) + 1 return memo[n] sequence = [a(n) for n in range(1, n)] print(sequence)
Formula
a(1)=2, a(2)=3, a(3)=7, and a(n+3) = a(n)+a(n+1)+a(n+2)+2 if n is odd, a(n+3) = a(n)+a(n+1)+ a(n+2)+1 if n is even.
Extensions
Edited - N. J. A. Sloane, Jan 23 2025
Comments