OFFSET
1,1
COMMENTS
Additional rule: If there are fewer than k=4 digits in the sequence so far, then it is "extended to the left" with the first digit (i.e., that digit is repeated as often as necessary).
Apart from the trivial cycles (0) (cf. A239616) and (1) (entered for initial values 1 or 11 or 111 or 1111+x*10^5) and the cycle (128) considered here, the rule also allows the "constant" cycles (175) and (384), cf. A239721-A239722. These seem to be the only cycles allowed for this rule.
See A238984 for further information, including a link to Eric Angelini's SeqFan post motivating this sequence.
PROG
(PARI) is(n) = A238984(99, n, 4)==128 \\ The "99" here should be large enough to reach the cycle (128) for small initial values n. It might be necessary to increase this value in other cases.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Bob Selcoe, Aug 05 2014
STATUS
approved