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.
%I A131836 #20 Oct 09 2017 00:04:44 %S A131836 0,0,2,2,3,2,2,4,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1, %T A131836 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, %U A131836 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 %N A131836 Multiplicative persistence of the Sierpinski numbers of the first kind (n^n + 1). %C A131836 Question: Are there any terms larger than 1 after a(22) = 2? In other words, do all terms of A014566 contain zero somewhere in their decimal representation after A014566(22) = 341427877364219557396646723585? - _Antti Karttunen_, Oct 08 2017 %H A131836 Antti Karttunen, <a href="/A131836/b131836.txt">Table of n, a(n) for n = 1..2048</a> %F A131836 a(n) = A031346(A014566(n)). - _Michel Marcus_, Oct 08 2017 %e A131836 For n=4 we have A014566(4) = Sierpinski number 257 --> 2*5*7 = 70 --> 7*0 = 0 thus persistence = 2, and a(4) = 2. - Edited by _Antti Karttunen_, Oct 08 2017 %p A131836 P:=proc(n) local i,k,w,ok,cont; for i from 1 by 1 to n do w:=1; k:=i^i+1; ok:=1; if k<10 then print(0); else cont:=1; while ok=1 do while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w<10 then ok:=0; print(cont); else cont:=cont+1; k:=w; w:=1; fi; od; fi; od; end: P(100); %t A131836 Table[-1 + Length@ NestWhileList[Times @@ IntegerDigits@ # &, If[n == 0, 2, n^n + 1], # > 9 &], {n, 105}] (* _Michael De Vlieger_, Oct 08 2017 *) %o A131836 (Scheme) %o A131836 ;; The whole program follows: %o A131836 (define (A131836 n) (A031346 (A014566 n))) %o A131836 (define (A014566 n) (+ 1 (expt n n))) %o A131836 (define (A031346 n) (let loop ((n n) (k 0)) (if (< n 10) k (loop (A007954 n) (+ 1 k))))) %o A131836 (define (A007954 n) (if (zero? n) n (let loop ((n n) (m 1)) (if (zero? n) m (let ((d (modulo n 10))) (loop (/ (- n d) 10) (* d m))))))) %o A131836 ;; _Antti Karttunen_, Oct 08 2017 %Y A131836 Cf. A014566, A031346. %K A131836 easy,nonn,base %O A131836 1,3 %A A131836 _Paolo P. Lava_ and _Giorgio Balzarotti_, Jul 20 2007