Prime triangle: Difference between revisions

m
Add link to OEIS
m (syntax highlighting fixup automation)
m (Add link to OEIS)
Line 2:
 
You will require a function f which when given an integer S will return a list of the arrangements of the integers 1 to S such that g<sub>1</sub>=1 g<sub>S</sub>=S and generally for n=1 to n=S-1 g<sub>n</sub>+g<sub>n+1</sub> is prime. S=1 is undefined. For S=2 to S=20 print f(S) to form a triangle. Then again for S=2 to S=20 print the number of possible arrangements of 1 to S meeting these requirements.
 
 
;See also
:* [[oeis:A036440|OEIS:A036440]]
 
 
=={{header|ALGOL 68}}==
2,392

edits