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.

A087472 Number of iterations required for the function f(n) to reach a single digit, where f(n) is the product of the two numbers formed from the alternating digits of n.

This page as a plain text file.
%I A087472 #10 Feb 14 2017 15:04:10
%S A087472 0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,1,1,1,1,2,
%T A087472 2,2,2,2,3,1,1,1,2,2,2,2,3,2,3,1,1,2,2,2,3,2,3,2,3,1,1,2,2,2,2,3,2,3,
%U A087472 3,1,1,2,2,3,3,2,4,3,3,1,1,2,2,2,2,3,3,3,3,1,1,2,3,3,3,3,3,3,2,1,1,1,1,1,1
%N A087472 Number of iterations required for the function f(n) to reach a single digit, where f(n) is the product of the two numbers formed from the alternating digits of n.
%C A087472 A087471(n) gives the final digit reached by successive iterations of Murthy's function, f(n). A087473(n) gives the smallest number that requires n iterations of Murthy's function to reach a single digit. The n-th row of triangle A087474 gives the n successive iterations of Murthy's function on A087473(n).
%C A087472 Differs from A031346 first at n=110. [From _R. J. Mathar_, Sep 11 2008]
%H A087472 Robert Israel, <a href="/A087472/b087472.txt">Table of n, a(n) for n = 1..10000</a>
%e A087472 a(1234)= 3 since f(1234)=13*24=312, f(312)=32*1=32 and
%e A087472 f(32)=3*2=6.
%p A087472 murthy:= proc(n) local L,d;
%p A087472   L:= convert(n,base,10);
%p A087472   d:= nops(L);
%p A087472   add(L[2*i+1]*10^i,i=0..(d-1)/2)*add(L[2*i+2]*10^i,i=0..(d-2)/2)
%p A087472 end proc:
%p A087472 A087472:= proc(n) option remember;
%p A087472   if n < 10 then  0 else 1+procname(murthy(n)) fi
%p A087472 end proc:
%p A087472 map(A087472, [$1..200]); # _Robert Israel_, Feb 14 2017
%Y A087472 Cf. A087471, A087473, A087474.
%K A087472 nonn,base
%O A087472 1,25
%A A087472 _Amarnath Murthy_ and _Paul D. Hanna_, Sep 11 2003