A001128 Reverse digits of previous term and multiply by previous term.
2, 4, 16, 976, 662704, 269896807264, 124883600543123110859968, 108643488775144622666209173128243503963147630528
Offset: 1
Links
- John Cerkan, Table of n, a(n) for n = 1..12
Crossrefs
Cf. A061205.
Programs
-
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 *)
-
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
Formula
a(n) = A061205(a(n-1)) for n>1, with a(1) = 2. - Michel Marcus, Mar 18 2017
Comments