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 A059417 #18 Sep 10 2016 19:56:17 %S A059417 1,1,3,2,4,6,5,25,27,26,676,678,677,458329,458331,458330,210066388900, %T A059417 210066388902,210066388901,44127887745906175987801, %U A059417 44127887745906175987803,44127887745906175987802 %N A059417 Start with 1; square; add 2; subtract 1; repeat. %C A059417 a(22) has 46 digits. %D A059417 Seen on a quiz. %H A059417 Harry J. Smith, <a href="/A059417/b059417.txt">Table of n, a(n) for n = 0..36</a> %F A059417 a(1+3k) = A004019(k+1), a(2+3k) = A004019(k+1)+2, a(3+3k) = A004019(k+1)+1, k>=0. - _Yuriy Sibirmovsky_, Sep 04 2016 %t A059417 Flatten@ NestList[# + {0, 2, 1} &[Last[#]^2] &, {1}, 7] (* _Michael De Vlieger_, Sep 06 2016 *) %o A059417 (PARI) { for (n = 0, 36, if (n==0, a=1, if (n%3 == 1, a*=a, if (n%3==2, a+=2, if (n%3==0, a-=1)))); write("b059417.txt", n, " ", a); ) } \\ _Harry J. Smith_, Jun 26 2009 %Y A059417 Cf. A004019. %K A059417 easy,nonn %O A059417 0,3 %A A059417 Jonathan Scharff (jonscharff(AT)home.com), Jan 30 2001 %E A059417 More terms from Larry Reeves (larryr(AT)acm.org), Jan 31 2001