A107281 a(0) = 1, a(1) = 1, a(2) = 2 and for n >= 1: a(n+1) = SORT[a(n) + a(n-1) + a(n-2)] where SORT places digits in ascending order and deletes 0's.
1, 1, 2, 4, 7, 13, 24, 44, 18, 68, 13, 99, 18, 13, 13, 44, 7, 46, 79, 123, 248, 45, 146, 349, 45, 45, 349, 349, 347, 145, 148, 46, 339, 335, 27, 17, 379, 234, 36, 469, 379, 488, 1336, 223, 247, 168, 368, 378, 149, 589, 1116, 1458, 1336, 139, 2339, 1348, 2368, 556, 2247
Offset: 0
Examples
a(8) = 18 because a(5) + a(6) + a(7) = 13 + 24 + 44 = 81 and SORT(81) = 18.
Links
- 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_}]:=Module[{d=FromDigits[Sort[IntegerDigits[a+b+c]]]}, {b,c,d}]; Transpose[NestList[nxt,{1,1,2},65]][[1]] (* Harvey P. Dale, Feb 07 2011 *)
Formula
a(0) = 1, a(1) = 1, a(2) = 2 and for n>1: a(n+1) = SORT[a(n) + a(n-1) + a(n-2)] where SORT places digits in ascending order and deletes 0.
Comments