# Please do not post # Daniela Elizondo # Assignment 21 # April 10, 2022 read "C21.txt": ##### Problem 1 ##### # I couldn't get JTseq to work #JTseq(N): The first N terms of the sequence of congruent numbers, those that are areas of right-angled triangle #with rational sides. Shuold be called the Tunnell numbers JTseq:=proc(N) local n,La,Lb,L: print(`Needs more work!`): La:=aSeq(N): Lb:=bSeq(N): L:=[]: for n from 1 to N do if IsSquareFree(n) and La[n] <> 0 then L:=[op(L),n]: fi: od: L: end: ##### Problem 2 ##### IsSquareFree := proc(n) local i,j: for i from 2 to n do: for j from 1 to n do: if i^2 * j = n then return false: fi: od: od: true: end: # This currently returns only the squarefree entries of this sequence <= N #JTseqW(N): All the terms <=N of the sequence of congruent numbers, those that are areas of right-angled triangle #with rational sides. Shuold be called the Tunnell numbers; Using the Wikipedia version JTseqW:=proc(N) local n,L: L:=[]: for n from 1 to N do if IsCon(n) and IsSquareFree(n) then L:=[op(L),n]: fi: od: L: end: