Find all Perrin pseudoprimes less than 100 million
Ruby, 183

require'Prime'
f=-&gt;a{a=a.flat_map{|n|String===n ? n : n&lt;3?%w[3 0 2][n]:[n-2,n-3]} until a.all?{|x|String===x}
a.map(&amp;:to_i).inject :+}
n=1
p n if f[[n+=1]]%n==0&amp;&amp;!n.prime? while n&lt;1e8


Technically works but runs in an unreasonable amount of time. Try setting the lower bound to 271435 and upper bound to 271450.