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.

A136701 Final nonzero digit of n! in base 15.

Original entry on oeis.org

1, 1, 2, 6, 9, 8, 3, 6, 3, 12, 3, 3, 6, 3, 12, 12, 12, 9, 12, 3, 9, 9, 3, 9, 6, 9, 9, 3, 9, 6, 12, 12, 9, 12, 3, 12, 12, 9, 12, 3, 3, 3, 6, 3, 12, 6, 6, 12, 6, 9, 12, 12, 9, 12, 3, 6, 6, 12, 6, 9, 6, 6, 12, 6, 9, 9, 9, 3, 9, 6, 3, 3, 6, 3, 12, 9, 9, 3, 9, 6, 12, 12, 9, 12, 3, 12, 12, 9, 12, 3, 3, 3, 6
Offset: 0

Views

Author

Carl R. White, Jan 16 2008

Keywords

Comments

From Robert Israel, Jun 08 2018: (Start)
For n >= 6, a(n) is 3, 6, 9 or 12.
For k >= 2, a(5*k) = a(5*k+1) = a(5*k+3). (End)

Examples

			6! = 720 decimal = 330 quindecimal, so a(6) = 3.
		

Crossrefs

Programs

  • Maple
    a:= 1: b:= 0: R[0]:= 1:
    for n from 1 to 100 do
       alpha:= padic:-ordp(n,3);
       beta:= padic:-ordp(n,5);
       a:= a * n/3^alpha/5^beta;
       b:= b + alpha - beta;
       R[n]:= a * 3 &^ b mod 15;
    od:
    seq(R[n],n=0..100); # Robert Israel, Jun 08 2018
  • Mathematica
    nzd[x_]:=If[x[[-1,1]]==0,x[[-2,1]],x[[-1,1]]]; Table[nzd[Split[IntegerDigits[n!,15]]],{n,0,100}] (* Harvey P. Dale, Jul 11 2023 *)