|
|
A195906
|
|
A periodic sequence.
|
|
1
|
|
|
22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6, 54, 27, 22, 11, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Start with a number. If the number is a single-digit number, multiply it by 9. If the number is a multidigit even number, halve it. If it is a multidigit odd number, subtract 5. Continuing this process leads to a repeating cycle of 5 terms.
There are two different 5-term cycles: 5,45,40,20,10 and 6,54,27,22,11. First corresponds to a(1)=5, second to a(1) = all other positive digits. - Zak Seidov, Sep 25 2011
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(22 + 11*x + 6*x^2 + 54*x^3 + 27*x^4)/(1 - x^5). - Chai Wah Wu, Jun 04 2016
|
|
MAPLE
|
seq(coeff(series(x*(22+11*x+6*x^2+54*x^3+27*x^4)/(1-x^5), x, n+1), x, n), n = 1 .. 80); # Muniru A Asiru, Dec 08 2018
|
|
MATHEMATICA
|
f[n_] := If[n < 10, 9n, If[EvenQ[n], n/2, n - 5]]; NestList[f, 22, 100] (* Amiram Eldar, Dec 08 2018 *)
LinearRecurrence[{0, 0, 0, 0, 1}, {22, 11, 6, 54, 27}, 80] (* Vincenzo Librandi, Dec 09 2018 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|