Jacobsthal numbers: Difference between revisions

m
Line 1,322:
 
# jacobsthalish :: (Int, Int) -> [Int]
def jacobsthalish(abxy):
'''Infinite sequence of jacobsthal-type series
beginning with a, b
'''
def go(xsab):
a, *tb = xsab
return a, t[b, + [2 * a + t[0]b]
 
return unfoldr(go)(list(ab)xy)
 
 
9,655

edits