|
|
A001128
|
|
Reverse digits of previous term and multiply by previous term.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
a[n_]:=If[n<2, 2, a[n - 1] * FromDigits[Reverse[IntegerDigits[a[n - 1]]]]]; Table[a[n], {n, 10}] (* Indranil Ghosh, Mar 18 2017 *)
|
|
PROG
|
(PARI) a(n) = if (n==1, 2, prev = a(n-1); prev*fromdigits(Vecrev(digits(prev)))); \\ Michel Marcus, Mar 18 2017
(Python) def a(n): return 2 if n<2 else a(n - 1) * int(str(a(n - 1))[::-1]) # Indranil Ghosh, Mar 18 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|