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 A276574 #37 Oct 26 2016 15:10:38 %S A276574 0,3,8,6,15,11,24,21,18,16,35,32,30,27,48,45,43,40,38,63,59,56,53,51, %T A276574 80,78,75,72,70,67,64,99,96,93,90,88,85,83,120,117,115,112,108,105, %U A276574 102,143,139,136,134,131,128,126,123,168,165,162,160,158,155,152,149,147,144,195,192,189,186,183,179,176,173,171 %N A276574 The infinite trunk of least squares beanstalk with reversed subsections. %H A276574 Antti Karttunen, <a href="/A276574/b276574.txt">Table of n, a(n) for n = 0..10028</a> %F A276574 a(0) = 0; a(1) = 3; for n > 1, let k = A255131(a(n-1)). If k+1 is not a square, then a(n) = k, otherwise a(n) = A000290(2+A000196(k+1)) - 1. %e A276574 This can be viewed as an irregular table, where after 0, each row has A260734(n) = 1, 2, 2, 4, 4, 5, 5, 7, ... terms: %e A276574 0; %e A276574 3; %e A276574 8, 6; %e A276574 15, 11; %e A276574 24, 21, 18, 16; %e A276574 35, 32, 30, 27; %e A276574 48, 45, 43, 40, 38; %e A276574 63, 59, 56, 53, 51; %e A276574 80, 78, 75, 72, 70, 67, 64; %e A276574 99, 96, 93, 90, 88, 85, 83; %e A276574 120, 117, 115, 112, 108, 105, 102; %e A276574 ... %e A276574 Each row begins with (n^2)-1 (see A005563), and each successive term is obtained by subtracting A002828(k) from the previous term k, until ((n-1)^2)-1 would be encountered, which is not listed second time (as it already occurs as the first term of the previous row), but instead, the current row is finished and the next row is started with the term ((n+1)^2)-1. %o A276574 (Scheme) %o A276574 (definec (A276574 n) (cond ((zero? n) n) ((= 1 n) 3) (else (let ((maybe_next (A255131 (A276574 (- n 1))))) (if (zero? (A010052 (+ 1 maybe_next))) maybe_next (+ -1 (A000290 (+ 2 (A000196 (+ 1 maybe_next)))))))))) %Y A276574 Cf. A005563 (left edge), A277023 (right edge). %Y A276574 Cf. A000196, A000290, A002828, A010052, A255131, A260734, A262689, A276572. %Y A276574 Used to construct A276573. %Y A276574 Cf. A277015 (tells which rows end with squares, listed in A277016). %K A276574 nonn,tabf %O A276574 0,2 %A A276574 _Antti Karttunen_, Sep 07 2016 %E A276574 Example section added and the formula rewritten to a simpler form (which is now correct) - _Antti Karttunen_, Oct 16 2016