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 A003096 M0894 #75 Jan 09 2025 08:28:31 %S A003096 2,3,8,63,3968,15745023,247905749270528,61457260521381894004129398783, %T A003096 3776994870793005510047522464634252677140721938309041881088 %N A003096 a(n) = a(n-1)^2 - 1, a(0) = 2. %C A003096 After a(0) = 2 and a(1) = 3, this can never be prime, since a(n) = (a(n-1) + 1) * (a(n-1) - 1). Each term is relatively prime to its successor. - _Jonathan Vos Post_, Jun 06 2008 %C A003096 Mensa (see Dutch link below) indicates high intelligence by offering a self test containing a number of problems, one of which is "Complete each series with the element that logically continues the series: 3968, 63, 8, 3". - _David A. Corneth_, May 19 2024 %D A003096 R. K. Guy, How to factor a number, Proc. 5th Manitoba Conf. Numerical Math., Congress. Num. 16 (1975), 49-89. %D A003096 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A003096 G. C. Greubel, <a href="/A003096/b003096.txt">Table of n, a(n) for n = 0..12</a> %H A003096 A. V. Aho and N. J. A. Sloane, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/11-4/aho-a.pdf">Some doubly exponential sequences</a>, Fibonacci Quarterly, Vol. 11, No. 4 (1973), pp. 429-437. %H A003096 A. V. Aho and N. J. A. Sloane, <a href="/A000058/a000058.pdf">Some doubly exponential sequences</a>, Fibonacci Quarterly, Vol. 11, No. 4 (1973), pp. 429-437 (original plus references that F.Q. forgot to include - see last page!) %H A003096 Mensa, <a href="https://www.mensa.nl/start-de-thuistest">self-test indicative for high IQ</a> %H A003096 <a href="/index/Aa#AHSL">Index entries for sequences of form a(n+1)=a(n)^2 + ...</a> %F A003096 a(n-1) = ceiling(c^(2^n)) where c = 1.295553... = A077124. - _Benoit Cloitre_, Nov 29 2002 %p A003096 a := proc(n) local k, v: v := 2: for k from 1 to n do v := v^2-1: od: v: end: %p A003096 seq(a(n), n = 0 .. 8); # _Lorenzo Sauras Altuzarra_, Feb 01 2023 %t A003096 NestList[#^2-1&,2,10] (* _Harvey P. Dale_, Nov 06 2011 *) %o A003096 (PARI) a(n)=if(n<1,2*(n==0),a(n-1)^2-1) %o A003096 (Magma) [n le 1 select 2 else Self(n-1)^2 -1: n in [1..12]]; // _G. C. Greubel_, Oct 27 2022 %o A003096 (SageMath) %o A003096 def A003096(n): return 2 if (n==0) else A003096(n-1)^2 -1 %o A003096 [A003096(n) for n in range(12)] # _G. C. Greubel_, Oct 27 2022 %Y A003096 Cf. A003095, A077124, A139244. %K A003096 nonn,easy,nice %O A003096 0,1 %A A003096 _N. J. A. Sloane_