A108565 a(0) = 0, a(1) = a(2) = 1, a(3) = 2, a(4) = 4, for n>3: a(n+1) = SORT[ a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4)], where SORT places digits in ascending order and deletes 0's.
0, 1, 1, 2, 4, 8, 16, 13, 34, 57, 128, 248, 48, 155, 366, 459, 1267, 2259, 456, 478, 1499, 5599, 1129, 1169, 4789, 11458, 12444, 3899, 33579, 16669, 4789, 1378, 1346, 15677, 35899, 5899, 1699, 256, 3459, 12247, 2356, 127, 14458, 23467, 25556, 45669, 12779
Offset: 0
Examples
a(8) = SORT[a(3) + a(4) + a(5) + a(6) + a(7)] = SORT[61] = 16.
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Richard I. Hess, Problem 920: sorted Fibonacci sequence, Pi Mu Epsilon Journal, Vol. 10 (Fall 1998) No. 9, pp. 754-755.
Programs
-
Mathematica
nxt[{a_,b_,c_,d_,e_}]:={b,c,d,e,FromDigits[Select[Sort[ IntegerDigits[ a+b+c+d+e]],#!=0&]]}; NestList[nxt,{0,1,1,2,4},50][[All,1]]
Comments