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.

A204697 Final nonzero digit of n^n in base 3.

This page as a plain text file.
%I A204697 #12 May 13 2013 01:50:02
%S A204697 1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,2,
%T A204697 1,2,1,1,1,1,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,
%U A204697 1,2,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1
%N A204697 Final nonzero digit of n^n in base 3.
%t A204697 f[0]=1;f[n_]:=Module[{m=n^n},While[Mod[m,3]==0,m=m/3];Mod[m,3]];Table[f[i],{i,0,84}]
%o A204697 (PARI) a(n)=lift(Mod(n/3^valuation(n,3),3)^n) \\ _Charles R Greathouse IV_, Jan 23 2012
%K A204697 nonn,base,easy
%O A204697 0,6
%A A204697 _José María Grau Ribas_, Jan 18 2012