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 51-60 of 72 results. Next

A118813 Primes of the form (2n)! - n! - 1.

Original entry on oeis.org

3628679, 87178286159, 20922789847679, 265252859812191058635000805631999
Offset: 1

Views

Author

Keywords

Comments

The term a(7) (2407 digits) is too large to include even in the b-file.
All the numbers end in 9.
For all n, (2n)! - n! - 1 has exactly A027868(n) trailing 9s. - Rick L. Shepherd, Feb 16 2014
Generated by n = 5, 7, 8, 15, 103, 179, .... - R. J. Mathar, Sep 20 2012 (now A238011)

Examples

			For n=5, (2*5)! - 5! - 1 = 3628800 - 120 - 1 = 3628679, which is prime.
		

References

  • G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 159.

Crossrefs

Cf. A238011 (corresponding n), A118812, A237443.

Programs

  • Maple
    PFACT:=proc(N) local i,r; for i from 1 by 1 to N do r:=(2*i)!-i!-1; if isprime(r) then print(i); fi; od; end: PFACT(100);

A137581 Number of inner zeros in decimal representation of n!.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 2, 2, 0, 1, 1, 1, 2, 3, 3, 3, 4, 1, 2, 3, 2, 3, 4, 1, 2, 0, 3, 1, 4, 1, 2, 4, 8, 4, 0, 6, 4, 4, 3, 3, 6, 1, 4, 4, 7, 6, 6, 5, 6, 5, 4, 7, 4, 6, 5, 12, 6, 7, 6, 5, 8, 7, 10, 6, 4, 9, 7, 19, 7, 7, 6, 14, 7, 11, 8, 8, 9, 11, 8, 16, 8, 7, 8, 14, 7, 8, 8, 11, 16, 10, 14, 4, 13
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 27 2008

Keywords

Crossrefs

Programs

  • Haskell
    a137581 = a055641 . a004154  -- Reinhard Zumkeller, Apr 01 2015
  • Maple
    A137581:= proc(n) uses StringTools;
    CountCharacterOccurrences(TrimRight(SubstituteAll(
        convert(n!,string),"0"," "))," ")
    end proc; # Robert Israel, May 07 2012
  • Mathematica
    f[n_] := f[n] = Block[{a = n!}, While[Mod[a, 10] == 0, a = a/10]; Count[ IntegerDigits@a, 0]]; Table[f@n, {n, 0, 98}] (* Robert G. Wilson v, Jan 28 2008 *)
    Table[DigitCount[n!/10^IntegerExponent[n!,10],10,0],{n,0,100}] (* Harvey P. Dale, Apr 10 2023 *)

Formula

a(n) = A027869(n) - A027868(n);
a(A137582(n)) = 0.
a(n) = A055641(A004154(n)). - Reinhard Zumkeller, Apr 01 2015

A173345 Number of trailing zeros of the superfactorial of n (A000178).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 4, 5, 7, 9, 11, 13, 15, 18, 21, 24, 27, 30, 34, 38, 42, 46, 50, 56, 62, 68, 74, 80, 87, 94, 101, 108, 115, 123, 131, 139, 147, 155, 164, 173, 182, 191, 200, 210, 220, 230, 240, 250, 262, 274, 286, 298, 310, 323, 336, 349, 362, 375, 389, 403, 417
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Z10[i], {i, n}]; Z10[n_]:= Floor[Sum[Floor[n/5^i], {i, 1, Floor[Log[5, n]]}]]; Join[{0},Table[a[n], {n, 2, 200}]]
    a[0] := 1; a[1] := 1; a[n_] := n!*a[n - 1];IntegerExponent[Table[a[n], {n, 1, 100}]] (* Stefano Spezia, Jan 26 2023 *)
  • PARI
    a(n)=my(t=0);sum(k=5,n,t+=valuation(k,5)) \\ Charles R Greathouse IV, Jun 10 2011

Formula

a(n) = Sum_{k=1..n} A027868(k). - Charles R Greathouse IV, Jun 10 2011

A181576 Primes whose factorials end with a prime number of trailing 0's.

Original entry on oeis.org

11, 13, 17, 19, 31, 59, 83, 127, 151, 173, 179, 197, 199, 223, 293, 367, 397, 421, 439, 449, 461, 463, 557, 569, 607, 617, 619, 631, 659, 733, 773, 797, 853, 919, 941, 967, 1013, 1039, 1061, 1063, 1087, 1097, 1123, 1181, 1259, 1399, 1423, 1447, 1543, 1567
Offset: 1

Views

Author

Lekraj Beedassy, Nov 02 2010

Keywords

Comments

For the corresponding prime number of trailing end 0's, see A181577.

Examples

			The factorial 2! = 2 ends with 0 zeros, so the prime 2 is not in the sequence because 0 is not a prime.
The factorial 5! = 120 ends with 1 zero, so the prime 5 is not in the sequence because 1 is not a prime.
The factorial 11! = 39916800 ends with 2 zeros, so the prime 11 is in the sequence because 2 is a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[ Prime@ Range@ 250, PrimeQ@ IntegerExponent[ #! ] &] (* Robert G. Wilson v, Nov 06 2010 *)
  • PARI
    is(p) = isprime(p) && isprime((p - sumdigits(p, 5))/4); \\ Amiram Eldar, May 03 2024

Formula

A027868(a(n)) = A181577(n). - Amiram Eldar, May 03 2024

Extensions

More terms from Robert G. Wilson v, Nov 06 2010

A181577 Prime number of trailing end 0's associated with p! where p = A181576(n).

Original entry on oeis.org

2, 2, 3, 3, 7, 13, 19, 31, 37, 41, 43, 47, 47, 53, 71, 89, 97, 103, 107, 109, 113, 113, 137, 139, 149, 151, 151, 157, 163, 181, 191, 197, 211, 227, 233, 239, 251, 257, 263, 263, 269, 271, 277, 293, 313, 347, 353, 359, 383, 389, 401, 421, 421, 433, 443, 463, 499
Offset: 1

Views

Author

Lekraj Beedassy, Nov 02 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Select[ IntegerExponent[ #! ] & /@ Prime@ Range@ 310, PrimeQ] (* Robert G. Wilson v, Nov 06 2010 *)
  • PARI
    lista(pmax) = {my(tz); forprime(p = 1, pmax, tz = (p - sumdigits(p, 5))/4; if(isprime(tz), print1(tz, ", ")));} \\ Amiram Eldar, May 03 2024

Formula

a(n) = A027868(A181576(n)). - Amiram Eldar, May 03 2024

Extensions

More terms from Robert G. Wilson v, Nov 06 2010

A181579 Smallest number m such that m! ends in exactly n trailing 0's (or 0 if no such m exists).

Original entry on oeis.org

0, 5, 10, 15, 20, 0, 25, 30, 35, 40, 45, 0, 50, 55, 60, 65, 70, 0, 75, 80, 85, 90, 95, 0, 100, 105, 110, 115, 120, 0, 0, 125, 130, 135, 140, 145, 0, 150, 155, 160, 165, 170, 0, 175, 180, 185, 190, 195, 0, 200, 205, 210, 215, 220, 0, 225, 230, 235, 240, 245, 0, 0, 250
Offset: 0

Views

Author

Lekraj Beedassy, Nov 02 2010

Keywords

Comments

The sequence locates the first occurrence of n in A027868.
Entries are zero if n is an element of A000966.

Crossrefs

Formula

a(n) = 5*A181578(n).

A301861 a(n) is the sum of the decimal digits of (n!)!.

Original entry on oeis.org

1, 1, 2, 9, 81, 783, 7164, 69048, 711009, 7961040, 95935761, 1242436185, 17235507996
Offset: 0

Views

Author

Jon E. Schoenfield, Mar 28 2018

Keywords

Comments

Presumably, lim_{n->oo} a(n)/A008906(n!) = 9/2.

Examples

			a(0) = digitsum((0!)!) = digitsum(1!) = digitsum(1) = 1.
a(1) = digitsum((1!)!) = digitsum(1!) = digitsum(1) = 1.
a(2) = digitsum((2!)!) = digitsum(2!) = digitsum(2) = 2.
a(3) = digitsum((3!)!) = digitsum(6!) = digitsum(720) = 7+2 = 9.
a(4) = digitsum((4!)!) = digitsum(24!) = digitsum(620448401733239439360000) = 6+2+0+4+4+8+4+0+1+7+3+3+2+3+9+4+3+9+3+6+0+0+0+0 = 81.
		

Crossrefs

Cf. A000142 (factorial numbers), A000197 ((n!)!), A004152 (sum of digits of n!), A007953 (sum of digits of n), A008906 (number of digits in n! excluding trailing zeros), A027868 (number of trailing zeros in n!), A034886 (number of digits in n!), A063979 (number of digits in (n!)!).

Programs

  • Magma
    [&+Intseq(Factorial(Factorial(n))): n in [0..10]]; // Vincenzo Librandi, Mar 29 2018
    
  • Maple
    a:= n-> add(i, i=convert(n!!, base, 10)):
    seq(a(n), n=0..8);  # Alois P. Heinz, Oct 27 2021
  • Mathematica
    Table[Plus@@IntegerDigits[(n!)!], {n, 0, 10}] (* Vincenzo Librandi, Mar 29 2018 *)
  • PARI
    a(n) = sumdigits(n!!); \\ Michel Marcus, Mar 28 2018
    
  • Python
    from math import factorial
    def A301861(n):
        return sum(int(d) for d in str(factorial(factorial(n)))) # Chai Wah Wu, Mar 31 2018
    # faster program for larger values of n
    from gmpy2 import mpz, digits, fac
    def A301861(n): return int(sum(mpz(d) for d in digits(fac(fac(n))))) # Chai Wah Wu, Oct 24 2021

Formula

a(n) = A007953(A000197(n)). - Michel Marcus, Mar 28 2018
a(n) = A004152(A000142(n)). - Altug Alkan, Mar 28 2018

Extensions

a(11) from Chai Wah Wu, Mar 31 2018
a(12) from Chai Wah Wu, Apr 01 2018

A080066 First differences of A000966 (number of zeros that n! will never end in).

Original entry on oeis.org

6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 1, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 1, 6
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 24 2003

Keywords

Comments

All terms in this sequence are either 1 or 6. - Charles R Greathouse IV, Jan 30 2023
The positions of 1 in this sequence are A000966, the sequence from which the differences were obtained. - Paul C Abbott, May 12 2025

Examples

			E.g. A000966(5)=29, A000966(4)=23, so a(4)=29-23=6.
		

Crossrefs

Formula

a(n) = A000966(n+1) - A000966(n).

Extensions

More terms from Sascha Kurz, Jan 27 2003

A116898 Numbers k such that k! is turned into a prime number by changing its trailing 0's into 1's.

Original entry on oeis.org

2, 10, 34, 499, 1746
Offset: 1

Views

Author

Giovanni Resta, Mar 07 2006

Keywords

Comments

Also numbers k such that n! + R(Z(k)) is prime, where R(t) = (10^t - 1)/9 is the repunit with t digits (A002275) and Z(m) = Sum_{j>=1} floor(m/5^j) is the number of trailing zeros of m! (A027868). The (probable) prime corresponding to a(5)=1746 has 4905 digits. Next term must be greater than 4000.
Next term must be greater than 20000. - Michael S. Branicky, Nov 14 2024

Examples

			10 is a term, since 10! = 3628800 and 3628811 is prime.
		

Crossrefs

Programs

  • Maple
    q:= n-> (f-> isprime(f+(10^padic[ordp](f, 10)-1)/9))(n!):
    select(q, [$1..500])[];  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    tz1Q[n_]:=Module[{idn=Split[IntegerDigits[n!]]},PrimeQ[ FromDigits[ Flatten[ Join[ Most[ idn], Last[idn]/.(0->1)]]]]]; Select[ Range[ 1800],tz1Q] (* Harvey P. Dale, Oct 01 2015 *)
  • Python
    from sympy import isprime
    from math import factorial
    def ok(n):
      s, zeros = str(factorial(n)), 0
      while s[-1] == '0': s = s[:-1]; zeros += 1
      return isprime(int(s + '1'*zeros))
    print([m for m in range(500) if ok(m)]) # Michael S. Branicky, Feb 10 2021

A135710 Positive integers b such that more than one prime factor p of b attains the maximum of (p-1)*v_p(b) where v_p(b) is the valuation of b at p.

Original entry on oeis.org

12, 45, 80, 90, 144, 180, 189, 240, 360, 378, 448, 637, 720, 756, 945, 1274, 1344, 1512, 1625, 1728, 1890, 1911, 2025, 2240, 2548, 2673, 3024, 3185, 3250, 3780, 3822, 4032, 4050, 4875, 5096, 5346, 5733, 6048, 6125, 6370, 6400, 6500, 6517, 6720, 7007, 7560, 7644
Offset: 1

Views

Author

Noam D. Elkies, Nov 25 2007

Keywords

Comments

Given b, the number of trailing zeros at the end of the base-b representation of x! is asymptotic to x/M where M is the maximum over p|b of (p-1)*v_p(b).
Usually only one prime p attains the maximum and then the number is v_p(x!)/v_p(b) for all but finitely many x.
But for b=12,45,80,90,..., at least two v_p(x!) must be computed. For example: if b=12 then for x=2006 there are 998 trailing zeros due to v_3 but for x=2007 there are 999 due to v_2.

Examples

			For b=90 we have (p-1)*v_p(b) = 1, 4, 4 for p = 2, 3, 5 respectively so the maximum of 4 is attained twice (p=3 and p=5).
		

References

  • Eryk LIPKA, Automaticity of the sequence of the last nonzero digits of n! in a fixed base, Journal de Théorie des Nombres de Bordeaux 31 (2019), 283-291. [See Theorem 3.7 on page 290, and consider the complementary sequence.] - Jean-Paul Allouche and Don Reble, Oct 22 2020.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k; for k from 1+
         `if`(n=1, 1, a(n-1)) while (s-> nops(s)<2 or (l->
          l[-2] (p-1)*padic[ordp](k, p),
           s))))([numtheory[factorset](k)[]]) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Oct 23 2020
  • Mathematica
    F[n_] := Module[{f, p, v, vmax}, f = FactorInteger[n]; p = f[[All, 1]]; v = Table[ f[[i, 2]]*(p[[i]]-1), {i, 1, Length[p]}]; vmax = Max[v]; Sum[Boole[v[[i]] == vmax], {i, 1, Length[v]}]]; Reap[For[n = 1, n <= 6400, n++, If[F[n] > 1, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jan 09 2014, translated from PARI *)
  • PARI
    { F(n, f,p,v,vmax)= f=factor(n); p=f[,1]; v=vector(length(p),i,f[i,2]*(p[i]-1)); vmax=vecmax(v); sum(i=1,length(v),v[i]==vmax) } for(n=1,6400,if(F(n)>1,print(n)))
Previous Showing 51-60 of 72 results. Next