(MAGMAMagma) I:=[1, 1, 2, 5, 17, 260, 797, 1854, 2651, 4505, 137801, 142306, 280107, 702520, 2387667, 36517525, 111940242, 260398009, 372338251, 632736260]; [n le 20 select I[n] else 140452*Self(n-10)-Self(n-20): n in [1..40]]; // Vincenzo Librandi, Dec 18 2013