cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A001128 Reverse digits of previous term and multiply by previous term.

This page as a plain text file.
%I A001128 #17 Mar 18 2017 05:17:43
%S A001128 2,4,16,976,662704,269896807264,124883600543123110859968,
%T A001128 108643488775144622666209173128243503963147630528
%N A001128 Reverse digits of previous term and multiply by previous term.
%H A001128 John Cerkan, <a href="/A001128/b001128.txt">Table of n, a(n) for n = 1..12</a>
%F A001128 a(n) = A061205(a(n-1)) for n>1, with a(1) = 2. - _Michel Marcus_, Mar 18 2017
%t A001128 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 *)
%o A001128 (PARI) a(n) = if (n==1, 2, prev = a(n-1); prev*fromdigits(Vecrev(digits(prev)))); \\ _Michel Marcus_, Mar 18 2017
%o A001128 (Python) def a(n): return 2 if n<2 else a(n - 1) * int(str(a(n - 1))[::-1]) # _Indranil Ghosh_, Mar 18 2017
%Y A001128 Cf. A061205.
%K A001128 nonn,base
%O A001128 1,1
%A A001128 _N. J. A. Sloane_