A188380 Balanced ternary Keith numbers.
3, 49, 73, 88, 97, 198, 840, 1479, 2425, 5277, 18799
Offset: 1
Examples
The number 49 in balanced ternary is {1, -1, -1, 1, 1}. The pentanacci-like sequence continues 1, 1, 3, 7, 13, 25, 49, thus 49 is a Keith number in balanced ternary.
Programs
-
Mathematica
(* First run program at A065363 to define balTernDigits *) keithFromListQ[n_Integer, digits_List] := Module[{seq = digits, curr = digits[[-1]], ord = Length[digits]}, While[curr < n, curr = Plus@@Take[seq, -ord]; AppendTo[seq, curr]]; Return[seq[[-1]] == n]]; Select[Range[3, 19683], Plus@@balTernDigits[#] > 0 && keithFromListQ[#, balTernDigits[#]] &]
Comments