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.
%I A275151 #68 Jul 10 2025 10:43:48 %S A275151 8,25,128,729,4232,24649,143648,837225,4879688,28440889,165765632, %T A275151 966152889,5631151688,32820757225,191293391648,1114939592649, %U A275151 6498344164232,37875125392729,220752408192128,1286639323760025,7499083534368008,43707861882448009,254748087760320032,1484780664679472169 %N A275151 a(1) = 8; a(n) = 3*a(n-1) + 2*sqrt(2*a(n-1)*(a(n-1)-7)) - 7 for n > 1. %C A275151 Related to A055997. %C A275151 If we solve X^2 + (X+7)^2 = (X+N)^2 over the positive integers we find that the solutions belong to three sequences: %C A275151 1) The first is a(1) = 7; a(n) = 3*a(n-1) + 2*sqrt(2*a(n-1)*(a(n-1)-7)) - 7 for n > 1: 7, 14, 63, 350, 2023, 11774, 68607, 399854, 2330503, 13583150, 79168383, 461427134, ... We observe that a(n) = 7*A055997(n). %C A275151 2) The second is this sequence. %C A275151 3) The third is a(1) = 9; a(n) = 3*a(n-1) + 2*sqrt(2*a(n-1)*(a(n-1)-7))-7 for n > 1: 9, 32, 169, 968, 5625, 32768, 190969, 1113032, 6487209, 37810208, 220374025, 1284433928, 7486229529, 43632943232, 254311429849, 1482235635848, ... %C A275151 There is a property of the formula: %C A275151 If y = 3*x + 2*sqrt(2*x*(x-q)) - q then x = 3*y - 2*sqrt(2*y*(y-q)) - q. %C A275151 Let F(X) = 3*x - 2*sqrt(2*x*(x-7)) - 7. %C A275151 Let us use this function: %C A275151 With the 1st sequence: With the 2nd: With the 3rd: %C A275151 F(2023)=350 F(729)=128 F(968)=169 %C A275151 F(350)=63 F(128)=25 F(169)=32 %C A275151 F(63)=14 F(25)=8 F(32)=9 %C A275151 F(14)=7 F(8)=9 F(9)=8 %C A275151 F(7)=14 F(9)=8 F(8)=9 %H A275151 G. C. Greubel, <a href="/A275151/b275151.txt">Table of n, a(n) for n = 1..1000</a> %H A275151 Yurii S. Bystryk, Vitalii L. Denysenko, and Volodymyr I. Ostryk, <a href="http://dx.doi.org/10.13140/RG.2.2.16511.73129">Lune and Lens Sequences</a>, ResearchGate preprint, 2024. See pp. 54, 56. %H A275151 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-7,1). %F A275151 a(n) = 3*a(n-1) + 2*sqrt(2*a(n-1)*(a(n-1)-7)) - 7, for n > 1, with a(1)=8. %F A275151 Conjectures from _Colin Barker_, Jul 19 2016: (Start) %F A275151 a(n) = (14 + (11-6*sqrt(2))*(3+2*sqrt(2))^n + (3-2*sqrt(2))^n*(11+6*sqrt(2)))/4. %F A275151 a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3) for n > 3. %F A275151 G.f.: x*(8 - 31*x + 9*x^2) / ((1-x)*(1 - 6*x + x^2)). (End) %p A275151 a:= proc(n) option remember; `if`(n=1, 8, %p A275151 3*a(n-1)+2*isqrt(2*a(n-1)*(a(n-1)-7))-7) %p A275151 end: %p A275151 seq(a(n), n=1..25); %t A275151 NestList[3 # + 2 Sqrt[2 # (# - 7)] - 7 &, 8, 23] (* _Michael De Vlieger_, Jul 18 2016 *) %o A275151 (PARI) m=30; v=concat([8], vector(m-1)); for(n=2, m, v[n] = floor(3*v[n-1] +2*sqrt(2*v[n-1]*(v[n-1]-7))-7)); v \\ _G. C. Greubel_, Oct 07 2018 %o A275151 (Magma) I:=[8]; [n le 1 select I[n] else Floor(3*Self(n-1) +2*Sqrt(2*Self(n-1)*(Self(n-1) - 7)) -7): n in [1..30]]; // _G. C. Greubel_, Oct 07 2018 %Y A275151 Cf. A055997. %K A275151 nonn %O A275151 1,1 %A A275151 _Manuel López Holgueras_, Jul 17 2016