Graph isn't suitable for this, the implementation requires more memory than tree and it doesn't provide any additional features in this case.
Prefix trees? These are very efficient for search but memory representation isn't optimized for size. They're in fact very memory inefficient. They can also be used to compress data and write it to disk but memory representation takes much more memory than the data itself.
If you arrange by groups so only 3 last digits would be stored in the tree-like struct it'd be 3x4 + 1 bytes for each number anyway (3x4 byte pointer + 1 byte for data). ~78 GB just for 3 last digits of each number (if i remember the implementation details correctly). Which will require 64 bit pointers instead of 32b... so ~140GB of ram.
So the problem (in my opinion) is that for tree for each suffix in each group you still need at least one 32 bit pointer (which will probably turn out to be 64 bits because you'd need to allocate > 4GB for the data).
In my opinion most efficient way will be an array or 12000 pointers to structure like
so prefix, eg. 43333 suffix eg.
19821982 => number is 4333319821982 (n_count -> count of numbers)
You store the numbers without separators to save space, one suffix after the other (eg. number 1 is suffixes+0, number 2 is suffixes+1) and you can search efficiently too, if you have it sorted.
This way it'd take just 4(DWORD)*6 billion suffixes = 24GB of memory + size of 12k pointers + prefixes which is irrelevant
So instead of (at least!) 6 billion 64 bit pointers you'd just have (at most!) 6b of 32 bit suffixes.
But probably the numbers are continuous, so you can try array of (start_suffix, end_suffix) instead of just storing all suffixes should take much less.