List of proteins by number of amino acids / chain length
You can find the data you need in the Protein Data Bank.


  Since 1971, the Protein Data Bank archive (PDB) has served as the
  single repository of information about the 3D structures of proteins,
  nucleic acids, and complex assemblies.
  
  The Worldwide PDB (wwPDB) organization manages the PDB archive and
  ensures that the PDB is freely and publicly available to the global
  community.


Each of the PDB member organisations provides the same data with a different interface:


PDBe,
PDBj,
RCSB.


In general, you either query the database through one of the web interfaces, or you download all the data and search it locally. In this case, the RCSB website has the option you asked about (sorting by the residue count):



Alternatively, you could download:
ftp://ftp.wwpdb.org/pub/pdb/derived_data/pdb_seqres.txt
and parse it and sort it as you wish.
This file has sequences of all chains in the PDB entries.

But since your goal is to find the relationship between the sequence and the folded structure, you should probably start from reading about the protein folding problem and about methods used in protein structure prediction.