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.

Previous Showing 11-12 of 12 results.

A155896 Least positive integer such that a(n)! starts with n, both written in base 6.

Original entry on oeis.org

1, 2, 5, 4, 8, 3, 9, 26, 52, 18, 25, 10, 33, 53, 32, 15, 13, 20, 30, 5, 17, 42, 7, 4, 23, 43, 78, 50, 28, 113, 8, 44, 19, 334, 59, 100, 195, 27, 22, 14, 91, 172, 371, 16, 93, 9, 12, 102, 66, 26, 46, 95, 279, 303, 69, 331, 272, 52, 286, 79, 264, 298, 18, 21, 190, 104, 47, 138, 255
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2009

Keywords

Examples

			a(3) = 5 since 5!=120 is the least factorial to start with digit "3" when written in base 6. a(8) = 26 since 8 = 12[6] (i.e. written in base 6) and 26! is the smallest factorial to start with digits "12" when written in base 6.
		

Crossrefs

Programs

  • PARI
    A155896(n)={ local( F=1,k=1 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=6)); k}

A197423 Smallest integer m such that !m begins with n in base 10.

Original entry on oeis.org

1, 0, 3, 14, 5, 25, 69, 16, 20, 4, 34, 28, 41, 9, 8, 53, 73, 12, 7, 38, 46, 81, 13, 18, 120, 138, 6, 156, 186, 52, 31, 33, 14, 166, 98, 97, 96, 104, 35, 105, 27, 22, 93, 146, 5, 48, 55, 249, 15, 91, 37, 42, 187, 77, 90, 124, 352, 25, 110, 394, 89, 280, 69, 147
Offset: 0

Views

Author

Michel Lagneau, Oct 14 2011

Keywords

Comments

!n is a subfactorial number (A000166).

Examples

			Subfactorial(0) = 1 begins with 1, so a(1) = 0 ;
Subfactorial(3) = 2 begins with 2, so a(2) = 3 ;
Subfactorial(14) = 32071101049 begins with 3, so a(3) = 14.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 100 do:l1:=length(n):i:=0:for m from 1 to 400 while(i=0)do:
    s:=0:for j from 0 to m do: s:=s+m!*(((-1)^j)*1/j!) :od:x:=s:l:=length(x):y:=floor(x/(10^(l-l1))):if y=n and l>=l1 then i:=1: printf ( "%d %d \n",n,m): else fi:od:od:
  • Mathematica
    f[n_] := Block[{k = 0, m}, While[m = Max[0, Floor@Log[10, Subfactorial[k]] - Floor@Log[10, n]]; (Subfactorial[k] - Mod[Subfactorial[k], 10^m])/10^m! = n, k++]; k]; Array[f, 67] (* program from David W. Wilson - see A018799 Nov 05 2010 *)

Extensions

a(0)=1 prepended by Alois P. Heinz, Feb 02 2017
Previous Showing 11-12 of 12 results.