|
|
A131184
|
|
Table T(n,m): the length of the sequence b(1)=n, b(2)=m, b(i) = b(i-1)*b(i-2) mod 10 up to the end of b's first cycle.
|
|
1
|
|
|
1, 7, 6, 4, 2, 2, 6, 7, 3, 8, 6, 8, 6, 3, 6, 8, 6, 8, 6, 7, 6, 7, 2, 7, 6, 7, 6, 5, 6, 8, 3, 3, 3, 8, 6, 5, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 6, 8, 3, 3, 1, 8, 6, 5, 6, 7, 6, 7, 2, 7, 6, 7, 6, 8, 6, 8, 6, 3, 6, 8, 6, 8, 3, 7, 6, 4, 2, 4, 6, 7, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
For each of the rows 1<=n<=9 and columns 1<=m<=9 of the table, an auxiliary sequence b(.) is initialized with n and m. Further terms of b are defined by the last digit of the product of the previous two terms of b(.).
Each of these 81 sequences b(.) enters a cycle, and the length of b(.) measured up to the end of the first cycle defines T(n,m).
|
|
LINKS
|
|
|
EXAMPLE
|
For n=1, m=8, the sequence is b(.) = 1, 8, 8, 4, 2, 8, 6, [8, 8, 4, 2, 8, 6, ...], with T(1,8) = 7 numbers prior to the re-entering the cycle (cycle in brackets).
|
|
MAPLE
|
cyc := proc(L) for i from 2 to nops(L) do for j from 1 to i-1 do if op(j, L) = op(i, L) and op(j+1, L) = op(i+1, L) then return i-1 ; end if; end do: end do; return -1 ; end proc:
A131184 := proc(n, m) b := [n, m] ; for i from 3 to 30 do b := [op(b), (op(-1, b)*op(-2, b)) mod 10] ; end do: return cyc(b) ; end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,fini,full,tabf,nonn,less
|
|
AUTHOR
|
Philippe Lallouet (philip.lallouet(AT)orange.fr), Oct 20 2007
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|