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 A141031 #27 Jun 25 2019 02:51:48 %S A141031 1,4,8,16,32,33,63,124,136,244,276,480,560,561,944,1135,1140,1856, %T A141031 2298,2316,3649,4705,7174,9398,9558,9559,14104,18984,19415,27728, %U A141031 38320,39432,39457,54512,77298,80075,80163,107168,155823,162583,162863,162864,210687,313927,330878,414200,632080,669872,814296,1271960,1600864 %N A141031 Nonprimes in the triangle A141020. %C A141031 From _Petros Hadjicostas_, Jun 22 2019: (Start) %C A141031 This is a dynamically defined sequence. Since the nonprimes from each row are mixed with the nonprimes of previous rows and then sorted, the value of a(n) may change each time we add a new row. %C A141031 For a modification of _R. J. Mathar_'s program below so that nonprimes are sorted only within each row (so as to get a uniquely defined sequence) see the documentation of sequences A141064, A141065, A141066, A141067, A141068, and A141069. %C A141031 (End) %H A141031 Juri-Stepan Gerasimov, <a href="/A140998/a140998.jpg">Stepan's triangles and Pascal's triangle are connected by the recurrence relation ...</a> %e A141031 Scanning rows of A141020 or A141021 and sorting new nonprimes into the list we get: %e A141031 1 yields a(1) = 1. %e A141031 1 1 yields no new member. %e A141031 1 2 1 yields no new member. %e A141031 1 4 2 1 yields a(2) = 4. %e A141031 1 8 4 2 1 yields a(3) = 8. %e A141031 1 16 8 4 2 1 yields a(4) = 16. %e A141031 1 32 16 8 4 2 1 yields a(5) = 32. %e A141031 1 63 33 16 8 4 2 1 yields a(6) = 33 and a(7) = 63. %e A141031 1 124 67 33 16 8 4 2 1 yields a(8) = 124. %e A141031 1 244 136 67 33 16 8 4 2 1 yields a(9) = 136 and a(10) = 244. %e A141031 1 480 276 136 67 33 16 8 4 2 1 yields a(11) = 276 and a(12) = 480. %e A141031 1 944 560 276 136 67 33 16 8 4 2 1 yields a(13) = 560 and a(14) = 944. %e A141031 ... %e A141031 From _Petros Hadjicostas_, Jun 22 2019: (Start) %e A141031 In the above example, we only sort the nonprimes up to row 11; we get the same output from _R. J. Mathar_'s program below if we say A141031(11). If, however, we include more rows in the program, the indexing of the nonprimes changes. %e A141031 For example, the nonprimes in the data above come from the nonprimes of 22 rows. If we include more rows, then the indexing again changes and the value of each a(n) may not stay the same. %e A141031 (End) %p A141031 A141020 := proc(n,k) option remember ; if k<0 or k>n then 0 ; elif k=0 or k=n then 1 ; elif k=n-1 then 2 ; elif k=n-2 then 4 ; elif k=n-3 then 8 ; elif k=n-4 then 16 ; else procname(n-1,k)+procname(n-2,k)+procname(n-3,k)+procname(n-4,k) +procname(n-5,k)+procname(n-5,k-1) ; fi; end: %p A141031 A141031 := proc(nmax) local a,n,k ; a := [] ; for n from 0 to nmax do for k from 0 to n do a141020 := A141020(n,k) ; if not isprime(a141020) and not a141020 in a then a := [op(a),a141020] ; fi; od: od: RETURN(sort(a)) ; end: A141031(30) ; # _R. J. Mathar_, Sep 19 2008 %Y A141031 Cf. A007318, A140993, A140994, A140995, A140996, A140997, A140998, A141020, A141021, A141064, A141065, A141066, A141067, A141068, A141069. %K A141031 nonn %O A141031 1,2 %A A141031 _Juri-Stepan Gerasimov_, Jul 12 2008 %E A141031 Partially edited by _N. J. A. Sloane_, Jul 18 2008 %E A141031 Simplified definition, corrected values by _R. J. Mathar_, Sep 19 2008