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 A296142 #40 Oct 16 2023 04:31:47 %S A296142 2,49,7,2916,54,144,8532241,12,2921,3481,22201,72799221804516,59,149, %T A296142 289,8532246,8561476,12152196,493106436,5299726695343845803536039441, %U A296142 17,2926,3486,4096,22206,23716,86436,72799221804521,72799307127001,73298956913361,147675989144401,243153962155686481 %N A296142 Triangle read by rows: first row is 2; given row k, define the elements of row k+1 as the (sorted) elements derived from row k by two recursion rules: (i.) if x is in row k, then (x+5)^2 is in row k+1; (ii.) if x^2 is in row k, then x is in row k+1. %C A296142 Inspired by problem A1 on the 2017 William Lowell Putnam Mathematical Competition. %C A296142 Every positive integer greater than one will appear, except the multiples of 5. %C A296142 For k > 2, the number of terms in row k is at least the sum of the number of terms in rows k-1 and k-2. %C A296142 3 shows up for the first time no later than row 104. %H A296142 Jeremy F. Alm, <a href="/A296142/b296142.txt">Table of n, a(n) for n = 1..236</a> %H A296142 Jeremy F. Alm, <a href="/A296142/a296142.txt">First 10 rows</a> %e A296142 First few rows are %e A296142 2; %e A296142 49; %e A296142 7, 2916; %e A296142 54, 144, 8532241; %e A296142 12, 2921, 3481, 22201, 72799221804516; %e A296142 59, 149, 289, 8532246, 8561476, 12152196, 493106436, 299726695343845803536039441; %e A296142 17, 2926, 3486, 4096, 22206, 23716, 86436, 72799221804521, 72799307127001, 73298956913361, 147675989144401, 243153962155686481, 28087103045340200593045577229687766576786428563667986916; %t A296142 NestList[Complement[DeleteDuplicates@ Join[# /. s_ /; IntegerQ@ Sqrt@ s :> Sqrt@ s, # /. k_ :> (k + 5)^2], #] &, {2}, 6] // Flatten (* _Michael De Vlieger_, Dec 06 2017 *) %o A296142 (PARI) lista(nn) = my(row = [2], all = row); for (n=1, nn, row = concat(apply(x->(x+5)^2, row), apply(x->sqrtint(x), select(issquare, row))); all = concat(all, vecsort(row,,8));); all; \\ _Michel Marcus_, Oct 16 2023 %K A296142 nonn,tabf %O A296142 1,1 %A A296142 _Jeremy F. Alm_, Dec 05 2017