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-10 of 16 results. Next

A360169 Numbers k such that the partition number p(k) = A000041(k) is a term of A057109, i.e., it is not a divisor of the factorial of its greatest prime factor.

Original entry on oeis.org

14, 19, 24, 28, 118
Offset: 1

Views

Author

Pontus von Brömssen, Jan 28 2023

Keywords

Comments

There are no more terms below 3000.

Examples

			p(14) = 3^3 * 5, but 5! has only one factor 3.
p(19) = 2 * 5 * 7^2, but 7! has only one factor 7.
p(24) = 3^2 * 5^2 * 7, but 7! has only one factor 5.
p(28) = 2 * 11 * 13^2, but 13! has only one factor 13.
p(118) = 11 * 197 * 827^2, but 827! has only one factor 827.
		

Crossrefs

A002034 Kempner numbers: smallest positive integer m such that n divides m!.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 7, 4, 6, 5, 11, 4, 13, 7, 5, 6, 17, 6, 19, 5, 7, 11, 23, 4, 10, 13, 9, 7, 29, 5, 31, 8, 11, 17, 7, 6, 37, 19, 13, 5, 41, 7, 43, 11, 6, 23, 47, 6, 14, 10, 17, 13, 53, 9, 11, 7, 19, 29, 59, 5, 61, 31, 7, 8, 13, 11, 67, 17, 23, 7, 71, 6, 73, 37, 10, 19, 11, 13, 79, 6, 9, 41, 83, 7
Offset: 1

Views

Author

Keywords

Comments

Sometimes named after Florentin Smarandache, although studied 60 years earlier by Aubrey Kempner and 35 years before that by Lucas.
Kempner originally defined a(1) to be 0, and there are good reasons to prefer that (see Hungerbühler and Specker), but we shall stay with the by-now traditional value a(1) = 1. - N. J. A. Sloane, Jan 02 2021
Kempner gave an algorithm to compute a(n) from the prime factorization of n. Partial solutions were given earlier by Lucas in 1883 and Neuberg in 1887. - Jonathan Sondow, Dec 23 2004
a(n) is the degree of lowest degree monic polynomial over Z that vanishes identically on the integers mod n [Newman].
Smallest k such that n divides product of k consecutive integers starting with n + 1. - Amarnath Murthy, Oct 26 2002
If m and n are any integers with n > 1, then |e - m/n| > 1/(a(n) + 1)! (see Sondow 2006).
Degree of minimal linear recurrence satisfied by Bell numbers (A000110) read modulo n. [Lunnon et al.] - N. J. A. Sloane, Feb 07 2009

Examples

			1! = 1, but clearly 8 does not divide 1.
2! = 2, but 8 does not divide 2.
3! = 6, but 8 does not divide 6.
4! = 24, and 8 does divide 24. Hence a(8) = 4.
However, 9 does not divide 24.
5! = 120, but 9 does not divide 120.
6! = 720, and 9 does divide 720. Hence a(9) = 6.
		

References

  • E. Lucas, Question Nr. 288, Mathesis 3 (1883), 232.
  • R. Muller, Unsolved problems related to Smarandache Function, Number Theory Publishing Company, Phoenix, AZ, ISBN 1-879585-37-5, 1993.
  • J. Neuberg, Solutions des questions proposées, Question Nr. 288, Mathesis 7 (1887), 68-69.
  • Donald J. Newman, A Problem Seminar. Problem 17, Springer-Verlag, 1982.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Florentin Smarandache, A Function in the Number Theory, Analele Univ. Timisoara, Fascicle 1, Vol. XVIII, 1980, pp. 79-88; Smarandache Function J., Vol. 1, No. 1-3 (1990), pp. 3-17.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Exercise 2.5.18 on page 77.

Crossrefs

Cf. A000142, A001113, A006530, A007672, A046022, A057109, A064759, A084945, A094371, A094372, A094404, A122378, A122379, A122416, A122417, A248937 (Fermi-Dirac analog: use unique representation of n > 1 as a product of distinct terms of A050376).
See A339594-A339596 for higher-dimensional generalizations.

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a002034 1 = 1
    a002034 n = fromJust (a092495 n `elemIndex` a000142_list)
    -- Reinhard Zumkeller, Aug 24 2011
    
  • Maple
    a:=proc(n) local b: b:=proc(m) if type(m!/n, integer) then m else fi end: [seq(b(m),m=1..100)][1]: end: seq(a(n),n=1..84); # Emeric Deutsch, Aug 01 2005
    g:= proc(p,u)
      local i,t;
      t:= 0;
      for i from 1 while t < u do
        t:= t + 1 + padic[ordp](i,p);
      od;
      p*(i-1)
    end;
    A002034:= x -> max(map(g@op, ifactors(x)[2])); # Robert Israel, Apr 20 2014
  • Mathematica
    Do[m = 1; While[ !IntegerQ[m!/n], m++ ]; Print[m], {n, 85}] (* or for larger n's *)
    Kempner[1] := 1; Kempner[n_] := Max[Kempner @@@ FactorInteger[n]]; Kempner[p_, 1] := p; Kempner[p_, alpha_] := Kempner[p, alpha] = Module[{a, k, r, i, nu, k0 = alpha(p - 1)}, i = nu = Floor[Log[p, 1 + k0]]; a[1] = 1; a[n_] := (p^n - 1)/(p - 1); k[nu] = Quotient[alpha, a[nu]]; r[nu] = alpha - k[nu]a[nu]; While[r[i] > 0, k[i - 1] = Quotient[r[i], a[i - 1]]; r[i - 1] = r[i] - k[i - 1]a[i - 1]; i-- ]; k0 + Plus @@ k /@ Range[i, nu]]; Table[ Kempner[n], {n, 85}] (* Eric W. Weisstein, based on a formula of Kempner's, May 17 2004 *)
    With[{facts = Range[100]!}, Flatten[Table[Position[facts, ?(Divisible[#, n] &), {1}, 1], {n, 90}]]] (* _Harvey P. Dale, May 24 2013 *)
  • PARI
    a(n)=if(n<0,0,s=1; while(s!%n>0,s++); s)
    
  • PARI
    a(n)=my(s=factor(n)[,1],k=s[#s],f=Mod(k!,n));while(f, f*=k++); k \\ Charles R Greathouse IV, Feb 28 2012
    
  • PARI
    valp(n,p)=my(s);while(n\=p,s+=n);s
    K(p,e)=if(e<=p,return(e*p));my(t=e*(p-1)\p*p);while(valp(t+=p,p)Charles R Greathouse IV, Jul 30 2013
    
  • Python
    from sympy import factorial
    def a(n):
        m=1
        while True:
            if factorial(m)%n==0: return m
            else: m+=1
    [a(n) for n in range(1, 101)] # Indranil Ghosh, Apr 24 2017
    
  • Python
    from sympy import factorint
    def valp(n, p):
        s = 0
        while n: n //= p; s += n
        return s
    def K(p, e):
        if e <= p: return e*p
        t = e*(p-1)//p*p
        while valp(t, p) < e: t += p
        return t
    def A002034(n):
        return 1 if n == 1 else max(K(p, e) for p, e in factorint(n).items())
    print([A002034(n) for n in range(1, 85)]) # Michael S. Branicky, Jun 09 2022 after Charles R Greathouse IV

Formula

A000142(a(n)) = A092495(n). - Reinhard Zumkeller, Aug 24 2011
From Joerg Arndt, Jul 14 2012: (Start)
The following identities were given by Kempner (1918):
a(1) = 1.
a(n!) = n.
a(p) = p for p prime.
a(p1 * p2 * ... * pu) = pu if p1 < p2 < ... < pu are distinct primes.
a(p^k) = p * k for p prime and k <= p.
Let n = p1^e1 * p2^e2 * ... * pu^eu be the canonical factorization of n, then a(n) = max( a(p1^e1), a(p2^e2), ..., a(pu^eu) ).
(End)
Clearly a(n) >= P(n), the largest prime factor of n (= A006530). a(n) = P(n) for almost all n (Erdős and Kastanas 1994, Ivic 2004). The exceptions are A057109. a(n) = P(n) if and only if a(n) is prime because if a(n) > P(n) and a(n) were prime, then since n divides a(n)!, n would also divide (a(n)-1)!, contradicting minimality of a(n). - Jonathan Sondow, Jan 10 2005
If p is prime then a(p^k) = k*p for 0 <= k <= p. Hence it appears also that if n = 2^m * p(1)^e(1) * ... * p(r)^e(r) and if there exists b, 1 <= b <= r, such that Max(2 * m + 2, p(i) * e(i), 1 <= i <= r) = p(b) * e(b) with e(b) <= p(b) then a(n) = e(b) * p(b). E.g.: a(2145986896455317997802121296896) = a(2^10 * 3^3 * 7^9 * 11^9 * 13^8) = 13 * 8 = 104, since 8 * 13 = Max (2 * 10 + 2, 3 * 3, 7 * 9, 11 * 9, 13 * 8) and 8 <= 13. - Benoit Cloitre, Sep 01 2002
It appears that a(2^m - 1) is the largest prime factor of 2^m - 1 (A005420).
a(n!) = n for all n > 0 and a(p) = p if p is prime. - Jonathan Sondow, Dec 23 2004
Conjecture: a(n) = 1 + n - Sum_{k=1..n} Sum_{m=1..n} cos(-2*Pi*k/n*m!)/n. Formula verified for the first 500 terms. - Mats Granvik, Feb 26 2021
Limit_{n->oo} (1/n) * Sum_{k=2..n} log(a(k))/log(k) = A084945 (Finch, 1999). - Amiram Eldar, Jul 04 2021

Extensions

Error in 45th term corrected by David W. Wilson, May 15 1997

A070003 Numbers divisible by the square of their largest prime factor.

Original entry on oeis.org

4, 8, 9, 16, 18, 25, 27, 32, 36, 49, 50, 54, 64, 72, 75, 81, 98, 100, 108, 121, 125, 128, 144, 147, 150, 162, 169, 196, 200, 216, 225, 242, 243, 245, 250, 256, 288, 289, 294, 300, 324, 338, 343, 361, 363, 375, 392, 400, 432, 441, 450, 484, 486, 490, 500, 507
Offset: 1

Views

Author

Labos Elemer, May 07 2002

Keywords

Comments

Numbers n such that P(phi(n)) - phi(P(n)) = 1, where P(x) is the largest prime factor of x. P(phi(n)) - phi(P(n)) = A006530(A000010(n)) - A000010(A006530(n)).
Numbers n such that the value of the commutator of phi and P functions at n is -1.
Equivalently, n such that n and phi(n) have the same largest prime factor since Phi(p) = p-1 if p is prime. - Benoit Cloitre, Jun 08 2002
Since n is divisible by P(n)^2, n cannot divide P(n)! and so A057109 is a supersequence. Hence all A002034(a(n)) are composite. - Jonathan Sondow, Dec 28 2004
A225546 defines a self-inverse bijection between this sequence and A335740, considered as sets. - Peter Munn, Jul 19 2020

Crossrefs

Subsequence of A057109, A122145.
Complement within A020725 of A102750.
Related to A335740 via A225546.
A195212 is a subsequence.
Cf. A319988 (characteristic function). Positions of odd terms > 1 in A122111.

Programs

  • Maple
    isA070003 := proc(n)
        if modp(n,A006530(n)^2) = 0 then # code re-use
            true;
        else
            false;
        end if;
    end proc:
    A070003 := proc(n)
        option remember ;
        if n =1 then
            4;
        else
            for a from procname(n-1)+1 do
                if isA070003(a) then
                    return a
                end if;
            end do:
        end if;
    end proc:
    seq( A070003(n),n=1..80) ; # R. J. Mathar, Jun 27 2024
  • Mathematica
    p[n_] := FactorInteger[n][[-1, 1]]; ep[n_] := EulerPhi[n]; fQ[n_] := p[ep[n]] == 1 + ep[p[n]]; Select[ Range[ 510], fQ] (* Robert G. Wilson v, Mar 26 2012 *)
    Select[Range[500], FactorInteger[#][[-1,2]] > 1 &] (* T. D. Noe, Dec 06 2012 *)
  • PARI
    for(n=3,1000,if(component(component(factor(n),1),omega(n))==component(component(factor(eulerphi(n)),1),omega(eulerphi(n))),print1(n,",")))
    
  • PARI
    is(n)=my(f=factor(n)[,2]);f[#f]>1 \\ Charles R Greathouse IV, Mar 21 2012
    
  • PARI
    sm(lim,mx)=if(mx==2,return(vector(log(lim+.5)\log(2)+1,i,1<<(i-1))));my(v=[1]);forprime(p=2,min(mx,lim),v=concat(v,p*sm(lim\p,p)));vecsort(v)
    list(lim)=my(v=[]);forprime(p=2,sqrt(lim),v=concat(v,p^2*sm(lim\p^2,p)));vecsort(v) \\ Charles R Greathouse IV, Mar 27 2012
    
  • Python
    from sympy import factorint
    def ok(n): f = factorint(n); return f[max(f)] >= 2
    print(list(filter(ok, range(4, 508)))) # Michael S. Branicky, Apr 08 2021

Formula

Erdős proved that there are x * exp(-(1 + o(1))sqrt(log x log log x)) members of this sequence up to x. - Charles R Greathouse IV, Mar 26 2012

Extensions

New name from Jonathan Sondow and Charles R Greathouse IV, Mar 27 2012

A102068 a(n) = P(n)!, where P(n) is the largest prime factor of n (with a(1) = 1).

Original entry on oeis.org

1, 2, 6, 2, 120, 6, 5040, 2, 6, 120, 39916800, 6, 6227020800, 5040, 120, 2, 355687428096000, 6, 121645100408832000, 120, 5040, 39916800, 25852016738884976640000, 6, 120, 6227020800, 6, 5040, 8841761993739701954543616000000, 120
Offset: 1

Views

Author

Jonathan Sondow, Dec 28 2004

Keywords

Comments

P(n)! is a multiple of n, for almost all n. The exceptions are A057109.

Examples

			P(12)! = 3! = 6.
		

Crossrefs

Programs

  • Mathematica
    Table[FactorInteger[n][[-1,1]]!,{n,30}] (* Harvey P. Dale, Jan 29 2014 *)
  • PARI
    a(n) = if (n==1, 1, vecmax(factor(n)[,1])!); \\ Michel Marcus, Sep 24 2022

Formula

a(n) = A000142(A006530(n)) = A000040(A061395(n))!.

A122378 Numbers m such that m^2 > S(m)!, where S(m)! is the smallest factorial divisible by m.

Original entry on oeis.org

2, 3, 6, 8, 12, 15, 20, 24, 30, 36, 40, 45, 48, 60, 72, 80, 84, 90, 105, 112, 120, 126, 140, 144, 168, 180, 210, 224, 240, 252, 280, 288, 315, 320, 336, 360, 384, 420, 448, 480, 504, 560, 576, 630, 640, 648, 672, 720, 756, 810, 840, 864, 896, 945, 960, 1008, 1080
Offset: 1

Views

Author

Jonathan Sondow, Sep 03 2006

Keywords

Comments

It is conjectured that m^2 < S(m)! for almost all m.
For each k > 1, at most tau(k!)/2 = A000005(k!)/2 are in the sequence because of that k. So at most Sum_{k = 1..m} tau(k!)/(2*m!) of the numbers up to m! are terms. This tends to 0 as m tends to infinity. - David A. Corneth, Dec 29 2019

Examples

			15^2 = 225 > 120 = 5! = S(15)!, so 15 is a member.
		

Crossrefs

Programs

  • Mathematica
    nmax = 1100;
    Do[m = 1; While[!IntegerQ[m!/n], m++]; S[n] = m, {n, 1, nmax}];
    Select[Range[nmax], #^2 > S[#]!&] (* Jean-François Alcover, Dec 04 2018 *)
  • PARI
    upto(n) = {my(res = List(), maxf = 1, olddiv, newdiv, n2 = n^2, cf = 1); while(maxf! < n2, maxf++); maxf--; olddiv = divisors(0!); newdiv = divisors(1!); for(i = 2, maxf, olddiv = newdiv; cf*=i; newdiv = divisors(cf); cans = setminus(Set(newdiv), Set(olddiv)); for(j = 1, #cans, if(cans[j]^2 > cf, if(cans[j] <= n, listput(res, cans[j]) , next(2) ); ) ) ); listsort(res); res } \\ David A. Corneth, Dec 29 2019

A122379 Numbers n such that S(n)! > n^2 > P(n)!, where S(n)! is the smallest factorial divisible by n and P(n) is the greatest prime factor of n.

Original entry on oeis.org

4, 9, 16, 18, 25, 27, 32, 50, 54, 64, 75, 81, 96, 98, 100, 108, 125, 128, 135, 147, 150, 160, 162, 175, 189, 192, 196, 200, 216, 225, 243, 245, 250, 256, 270, 294, 300, 324, 343, 350, 375, 378, 392, 400, 405, 432, 441, 450, 486, 490, 500, 512, 525, 540, 567
Offset: 1

Views

Author

Jonathan Sondow, Sep 03 2006

Keywords

Comments

It is conjectured that n^2 < P(n)! for almost all n. It is known that S(n) = P(n) for almost all n. Clearly, S(n) >= P(n) for all n > 1.

Examples

			S(9)! = 6! = 720 > 81 = 9^2 > 6 = 3! = P(9)!, so 9 is a member.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := For[k = 1, True, k++, If[Divisible[k!, n], Return[k]]];
    p[n_] := FactorInteger[n][[-1, 1]];
    okQ[n_] := s[n]! > n^2 > p[n]!;
    Select[Range[1000], okQ] (* Jean-François Alcover, Jan 27 2019 *)

A362333 Least nonnegative integer k such that (gpf(n)!)^k is divisible by n, where gpf(n) is the greatest prime factor of n.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Apr 16 2023

Keywords

Comments

First differs from A088388 at n = 40.

Examples

			For n = 12, gpf(n)! = 3! = 6 is not divisible by 12, but (3!)^2 = 36 is divisible by 12, so a(12) = 2.
		

Crossrefs

Programs

  • Python
    from sympy import factorint
    def A362333(n):
        f = factorint(n)
        gpf = max(f,default=None)
        a = 0
        for p in f:
            m = gpf
            v = 0
            while m >= p:
                m //= p
                v += m
            a = max(a,-(-f[p]//v))
        return a

Formula

a(n) > 1 if and only if n is in A057109.
a(n) <= A051903(n).
a(n) = ceiling(A371148(n)/A371149(n)). - Pontus von Brömssen, Mar 16 2024

A048839 Numbers k dividing P(k)!, where P(k) is the largest prime factor of k.

Original entry on oeis.org

2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 20, 21, 22, 23, 26, 28, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94
Offset: 1

Views

Author

Charles T. Le (charlestle(AT)yahoo.com)

Keywords

Comments

Solutions to Diophantine equation P(k) = K(k), where P(k) is the largest prime which divides k and K(k) is the Kempner function A002034.

References

  • P. Erdős and C. Ashbacher, Thoughts of Pal Erdos on Some Smarandache Notions, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 220-224.

Crossrefs

Complement is A057109.

Programs

  • Mathematica
    Select[Range[2, 100], Divisible[FactorInteger[#][[-1, 1]]!, #] &] (* Amiram Eldar, May 23 2024 *)
  • PARI
    is(n)=my(s=factor(n)[, 1]); s[#s]!%n==0 \\ Charles R Greathouse IV, Sep 20 2012

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 20 2012

Extensions

Corrected and extended by Naohiro Nomoto, Jul 14 2001

A057108 Difference between the smallest number S(n) with S(n)! a multiple of n and the largest prime factor of n [taking a(1)=0].

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Aug 08 2000

Keywords

Examples

			a(12)=1 since 12 is a factor of 4!, 3 is the largest prime factor of 12 and 4-3=1
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 284-292.

Crossrefs

Programs

Formula

a(n) = A002034(n) - A006530(n).

Extensions

More terms from James Sellers, Aug 22 2000

A102067 Numbers k such that k does not divide P(k)! even though P(k)^2 is not a factor of k, where P(k) is the largest prime factor of k.

Original entry on oeis.org

12, 24, 45, 48, 80, 90, 96, 135, 160, 175, 180, 189, 192, 224, 240, 270, 320, 350, 360, 378, 384, 405, 448, 480, 525, 539, 540, 567, 637, 640, 672, 700, 720, 756, 768, 810, 875, 896, 945, 960, 1050, 1078, 1080, 1120, 1134, 1215, 1274, 1280, 1344, 1375, 1400, 1440
Offset: 1

Views

Author

Jonathan Sondow, Dec 28 2004

Keywords

Comments

Clearly, if P(k)^2 is a factor of k, then k does not divide P(k)!. Each member shows that the converse is false.
k is a member if and only if k is in A057109 but not in A070003.

Examples

			12 does not divide P(12)! = 3! and 3^2 is not a factor of 12.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{p = FactorInteger[n][[-1, 1]]}, !Divisible[n, p^2] && !Divisible[p!, n]]; Select[Range[1500], q] (* Amiram Eldar, Mar 30 2021 *)
  • PARI
    isok(n) = {my(f = factor(n)); my(P = f[#f~,1]); (P! % n) && (n % P^2);} \\ Michel Marcus, Sep 16 2015

Extensions

More terms from Michel Marcus, Sep 16 2015
Showing 1-10 of 16 results. Next