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.

Showing 1-2 of 2 results.

A068844 Smallest prime with same leading digits as n!.

Original entry on oeis.org

11, 23, 61, 241, 1201, 7207, 504001, 4032029, 36288017, 362880043, 3991680029, 47900160013, 622702080047, 8717829120019, 130767436800073, 2092278988800037, 35568742809600019, 640237370572800041
Offset: 1

Views

Author

Amarnath Murthy, Mar 10 2002

Keywords

Examples

			a(7) = 504011 because this is the smallest prime starting with 7! = 5040.
		

Crossrefs

Cf. A068845.

Programs

  • Maple
    for i from 1 to 40 do a := nextprime(i!*10); b := 1; while(a-i!*10^b>=10^b) do b := b+1; a := nextprime(i!*10^b); end do; c[i] := a; end do:q := seq(c[i],i=1..40);
  • Mathematica
    Table[p = i!; k = 1; While[IntegerDigits[p] != Take[IntegerDigits[x = NextPrime[p*10^k]], IntegerLength[p]], k += 1]; x, {i, 18}] (* Jayanta Basu, Aug 09 2013 *)

Extensions

More terms from Sascha Kurz, Mar 17 2002

A095194 Least number that yields a semiprime when appended to n!.

Original entry on oeis.org

0, 1, 2, 7, 2, 1, 1, 1, 1, 1, 2, 1, 1, 7, 17, 1, 1, 1, 31, 13, 1, 59, 13, 7, 1, 61, 41, 37, 31, 1, 7, 7, 1, 2, 5, 61, 41, 7, 13, 37, 61, 43, 1, 1, 47, 67, 1, 3, 67, 61, 5, 19, 5, 11, 7, 13, 1, 3, 1, 71, 11, 1, 67, 109, 103, 43, 29
Offset: 1

Views

Author

Jason Earls, Jun 21 2004

Keywords

Comments

a(114) would require the factorization of the 190-digit number 1000*114!+181. - Hugo Pfoertner, May 18 2021

Examples

			Refers to the semiprimes 10, 21, 62, 247, 1202, 7201, 50401, 403201, etc.
		

Crossrefs

Programs

  • Maple
    A095194 := proc(n) local nf,i,ns ; nf := convert(n!,base,10) ; for i from 1 do ns := [op(convert(i,base,10)),op(nf)] ; add( op(j,ns)*10^(j-1),j=1..nops(ns)) ; if numtheory[bigomega](%) = 2 then return i ; end if; end do: end proc: # R. J. Mathar, Jun 17 2011
  • Mathematica
    Array[Block[{m = #!, k = 0}, While[PrimeOmega[10^If[k == 0, 1, IntegerLength[k]]*m + k] != 2, k++]; k] &, 40] (* Michael De Vlieger, May 17 2021 *)
  • PARI
    a(n)=for(i=0,1e9,bigomega(eval(Str(n!,i)))==2 & return(i))  \\ M. F. Hasler, Jun 17 2011

Extensions

Corrected and extended by Sean A. Irvine, Jun 16 2011
Showing 1-2 of 2 results.