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.

A240751 a(n) is the smallest k such that in the prime power factorization of k! there exists at least one exponent n.

Original entry on oeis.org

2, 6, 4, 6, 12, 15, 8, 10, 21, 12, 14, 50, 27, 30, 16, 18, 36, 20, 22, 85, 45, 24, 26, 100, 28, 30, 57, 60, 182, 63, 32, 34, 135, 36, 38, 78, 150, 40, 42, 81, 44, 46, 175, 90, 93, 48, 50, 99, 52, 54, 210, 215, 56, 58, 114, 60, 62, 120, 123, 364, 126, 129, 64
Offset: 1

Views

Author

Vladimir Shevelev, Apr 12 2014

Keywords

Comments

For n = 1, 2, 3, etc., a(n)! contains 2^1, 3^2, 2^3, 2^4, 3^5, 3^6, 2^7, etc.
Note that for number N and for sufficiently large k=k(N), in interval (k/(N+1), k/N] there exists a prime, and in case sqrt(k) < k/(N+1), p^N || k!. Therefore the sequence is infinite.
Sum_{i>=1} n*(p-1)/p^i = n and Sum_{i=1..m} floor(n*(p-1)/p^i) < n where m = floor(log(n*(p-1))/log(p)). Therefore, we can test exponents of primes in k! to see if the exponent of p is n, where k is the least k > n*(p-1) and p|k. - David A. Corneth, Mar 21 2017
Record k's are 2, 6, 12, 15, 21, 50, 85, 100, 182, 210, 215, 364, 553, 560, 854, 931, 1120, etc., at indices 1, 2, 5, 6, 9, 12, 20, 24, 29, 51, 52, 60, 91, 92, 141, 154, 185, 186, 342, 403, 441, 447, 635, 765, 1035, 1092, 1378, 1435, 1540, 2015, 2553, 2740, 2808, 2865, 3265, 4922, 5322, 7209, etc. - Robert G. Wilson v, Apr 13 2017

Examples

			a(2)=6, since 6!=2^4*3^2*5, and there is no k<6 such that the factorization of k! contains a power p^2, where p is prime.
From _David A. Corneth_, Mar 21 2017: (Start)
To compute a(5) we first see if there is a factorial k! such that 2^5||k!. I.e., p = 2. The next multiple of p = 2 and larger than n * (p-1) = 5 is 6. The exponent of 2 in 6! Is 3 + 1 = 4 < 5. Therefore, we try the next multiple of p = 2 and larger than 6 which is 8. 8 has three factors 2. Therefore, 8! has 4 + 3 = 7 > 5 factors 2 and no factorial exists that properly divides 2^5.
So we try the next prime larger than 2, which is p = 3. We start with the next multiple of p and larger than n * (p - 1) = 10, which is 12. The exponent of 3 in 12! is floor(12/3) + floor(4/3) = 5. Therefore, 12! is properly divisible by 3^5 and 12 is the least k such that k! has 5 as an exponent in the prime factorization. (End)
		

Crossrefs

Programs

  • Mathematica
    fi[n_]:=fi[n]=FactorInteger[n!]; A240751={2}; Do[AppendTo[A240751, NestWhile[#+1 &,n+1,!MemberQ[Last[Transpose[fi[#]]],n]&]], {n,2,100}]; A240751 (* Peter J. C. Moses, Apr 12 2014 *)
    Table[k = 2; While[! MemberQ[FactorInteger[k!][[All, -1]], n], k++]; k, {n, 63}] (* Michael De Vlieger, Mar 24 2017 *)
    f[n_] := Block[{k = 0, p = 2, s}, While[True, While[s = Plus @@ Rest@ NestWhileList[ Floor[#/p] &, (p -1)n +k, # > 0 &]; s < n, k++]; If[s == n, Goto[fini]]; k = 0; p = NextPrime@ p]; Label[fini]; (p -1)n +k]; Array[f, 70] (* Robert G. Wilson v, Apr 15 2017, revised Apr 16 2017 and Apr 19 2017 *)
  • PARI
    hasexp(k, n)=f = factor(k!); for (i=1, #f~, if (f[i, 2] == n, return (1));); return (0);
    a(n) = {k = 2; while (!hasexp(k, n), k++); k;} \\ Michel Marcus, Apr 12 2014
    
  • PARI
    a(n)=my(r = 0, m, p = 2, cn, cm); while(1,cn = n * (p-1); m = p*(cn\p+1); r = 0; cm = m; while(cm, r+=cm\=p); while(r < n, m += p; r += valuation(m, p)); if(r==n, return(m)); p = nextprime(p + 1)) \\ David A. Corneth, Mar 20 2017
    
  • PARI
    valp(n,p)=my(s=n); while(n\=p, s+=n); s
    findLower(f, n, lower, upper)=my(lV=f(lower),uV,m,mV); if(lV>=n, return(if(lV==n, lower, oo))); uV=f(upper); if(uV1, m=(lower+upper)\2; mV=f(m); if(mVvalp(k,p), n, t, logint(t,p)+t); if(t!=oo, return(t*p))) \\ Charles R Greathouse IV, Jul 27 2017

Formula

a(n) <= n*t, where t is such that t*(1-1300/log^4(t))/log(t) >= n+1. Cf. Shevelev, Greathouse IV, and Moses link, Proposition 6.
a(n) = A284050(n)*n + A284051(n). - Robert G. Wilson v, Apr 15 2017

Extensions

More terms from Michel Marcus, Apr 12 2014

A284051 a(n) = A240751(n) mod n, where A240751(n) = the smallest k such that in the prime power factorization of k! there exists at least one exponent n.

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 2, 2, 3, 5, 3, 2, 3, 4, 3, 4, 3, 4, 8, 3, 1, 2, 3, 2, 3, 6, 2, 2, 3, 1, 3, 4, 3, 2, 3, 2, 3, 3, 3, 4, 6, 7, 3, 4, 4, 4, 5, 4, 5, 4, 4, 5, 1, 2, 5, 2, 3, 5, 4, 2, 3, 6, 3, 4, 6, 7, 7, 2, 3, 2, 3, 4, 8, 3, 3, 4, 7
Offset: 1

Views

Author

David A. Corneth, Mar 19 2017

Keywords

Examples

			A240751(5) = 12 so a(5) = 12 mod 5 == 2.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 2; While[! MemberQ[FactorInteger[k!][[All, -1]], n], k++]; Mod[k, n], {n, 87}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    a(n) = A240751(n)%n \\ (For computation of A240751(n), see A240751)

Formula

A240751(n) = n*A284050(n) + a(n). - Antti Karttunen, Mar 22 2017
Showing 1-2 of 2 results.