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-5 of 5 results.

A034699 Largest prime power factor of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 7, 8, 9, 5, 11, 4, 13, 7, 5, 16, 17, 9, 19, 5, 7, 11, 23, 8, 25, 13, 27, 7, 29, 5, 31, 32, 11, 17, 7, 9, 37, 19, 13, 8, 41, 7, 43, 11, 9, 23, 47, 16, 49, 25, 17, 13, 53, 27, 11, 8, 19, 29, 59, 5, 61, 31, 9, 64, 13, 11, 67, 17, 23, 7, 71, 9, 73, 37, 25, 19, 11, 13, 79
Offset: 1

Views

Author

Keywords

Comments

n divides lcm(1, 2, ..., a(n)).
a(n) = A210208(n,A073093(n)) = largest term of n-th row in A210208. - Reinhard Zumkeller, Mar 18 2012
a(n) = smallest m > 0 such that n divides A003418(m). - Thomas Ordowski, Nov 15 2013
a(n) = n when n is a prime power (A000961). - Michel Marcus, Dec 03 2013
Conjecture: For all n between two consecutive prime numbers, all a(n) are different. - I. V. Serov, Jun 19 2019
Disproved with between p=prime(574) = 4177 and prime(575) = 4201, a(4180) = a(4199) = 19. See A308752. - Michel Marcus, Jun 19 2019
Conjecture: For any N > 0, there exist numbers n and m, N < n < n+a(n) <= m, such that all n..m are composite and a(n) = a(m). - I. V. Serov, Jun 21 2019
Conjecture: For all n between two consecutive prime numbers, all (-1)^n*a(n) are different. Checked up to 5*10^7. - I. V. Serov, Jun 23 2019
Disproved: between p = prime(460269635) = 10120168277 and p = prime(460269636) = 10120168507 the numbers n = 10120168284 and m = 10120168498 form a pair such that (-1)^n*a(n) = (-1)^m*a(m) = 107. - L. Joris Perrenet, Jan 05 2020
a(n) = cardinality of smallest set on which idempotence of order n+1 (f^{n+1} = f) differs from idempotence of order e for 2 <= e <= n (see von Eitzen link for proof); derivable from A245501. - Mark Bowron, May 22 2025

Crossrefs

Programs

  • Haskell
    a034699 = last . a210208_row
    -- Reinhard Zumkeller, Mar 18 2012, Feb 14 2012
    
  • Mathematica
    f[n_] := If[n == 1, 1, Max[ #[[1]]^#[[2]] & /@ FactorInteger@n]]; Array[f, 79] (* Robert G. Wilson v, Sep 02 2006 *)
    Array[Max[Power @@@ FactorInteger@ #] &, 79] (* Michael De Vlieger, Jul 26 2018 *)
  • PARI
    a(n) = if(1==n,n,my(f=factor(n)); vecmax(vector(#f[, 1], i, f[i, 1]^f[i, 2]))); \\ Charles R Greathouse IV, Nov 20 2012, check for a(1) added by Antti Karttunen, Aug 06 2018
    
  • PARI
    A034699(n) = if(1==n,n,fordiv(n, d, if(isprimepower(n/d), return(n/d)))); \\ Antti Karttunen, Aug 06 2018
    
  • Python
    from sympy import factorint
    def A034699(n): return max((p**e for p, e in factorint(n).items()), default=1) # Chai Wah Wu, Apr 17 2023

Formula

If n = p_1^e_1 *...* p_k^e_k, p_1 < ... < p_k primes, then a(n) = Max_i p_i^e_i.
a(n) = A088387(n)^A088388(n). - Antti Karttunen, Jul 22 2018
a(n) = n/A284600(n) = n - A081805(n) = A034684(n) + A100574(n). - Antti Karttunen, Aug 06 2018
a(n) = a(m) iff m = d*a(n), where d is a divisor of A038610(a(n)). - I. V. Serov, Jun 19 2019

A088387 Prime corresponding to largest prime power factor of n, a(1)=1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 28 2003

Keywords

Comments

Most significant prime factor of n: If n = (p_1^e_1)(p_2^e_2)(p_3^e_3)... and max(p_1^e_1,p_2^e_2,...) = p_k^e_k then a(n) = p_k.

Examples

			a(6) = a(2*3) = 3 because 3^1 > 2^1;
a(36) = a((2^2)(3^2)) = 3 because 3^2 > 2^2;
a(12) = a((2^2)*3) = 2 because 2^2 > 3^1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Sort[ {#[[1]]^#[[2]], #[[1]]} & /@ FactorInteger@ n][[ -1, 2]]; Array[f, 85] (* Robert G. Wilson v, Nov 05 2007 *)
    a[n_] := MaximalBy[FactorInteger[n], Power @@ # &][[1, 1]];
    Array[a, 85] (* Jean-François Alcover, Jun 27 2019 *)
  • PARI
    A088387(n) = if(1==n,1,my(f=factor(n),p=0); isprimepower(vecmax(vector(#f[, 1], i, f[i, 1]^f[i, 2])),&p); (p)); \\ Antti Karttunen, Jul 22 2018
    
  • Python
    from sympy import factorint
    def A088387(n): return max(((p**e,p) for p, e in factorint(n).items()), default=(0,1))[1] # Chai Wah Wu, Apr 17 2023

Formula

A034699(n) = a(n)^A088388(n).
a(n*a(n)) = a(n). - Sam Alexander, Dec 15 2003

Extensions

More terms from Ray Chandler, Dec 20 2003
Edited by N. J. A. Sloane at the suggestion of Stefan Steinerberger, Nov 04 2007

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

A381133 If n = (p_1^e_1)*(p_2^e_2)*(p_3^e_3)*... and min(p_1^e_1,p_2^e_2,...) = p_k^e_k then a(n) = e_k, a(1) = 0.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Feb 14 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Table[PrimeOmega[Min @@ (#[[1]]^#[[2]] & /@ FactorInteger[n])], {n, 100}]
  • PARI
    a(n) = if (n==1, 0, my(f=factor(n), v=vector(#f~, k, f[k,1]^f[k,2]), m=vecmin(v), i=select(x->(x==m), v, 1)); f[i[1], 2]); \\ Michel Marcus, Feb 19 2025

A365521 a(1) = 1; for n > 1, a(n) is the prime factor of n that has not appeared for the longest time in {a(1),...,a(n-2),a(n-1)}.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 2, 13, 7, 3, 2, 17, 3, 19, 5, 7, 11, 23, 2, 5, 13, 3, 7, 29, 2, 31, 2, 11, 17, 5, 3, 37, 19, 13, 2, 41, 7, 43, 11, 5, 23, 47, 3, 7, 2, 17, 13, 53, 3, 11, 7, 19, 29, 59, 5, 61, 31, 3, 2, 13, 11, 67, 17, 23, 7, 71, 3, 73, 37, 5, 19
Offset: 1

Views

Author

Jianglin Luo, Sep 08 2023

Keywords

Examples

			a(6)=3 because 6 = 2*3 and 2=a(4) has appeared more recently than 3=a(3).
a(12)=2 because 12 = 2^2*3 and 3=a(9) has appeared more recently than 2=a(8).
a(30)=2 because 30 = 2*3*5 and 3=a(27) and 5=a(25) have appeared more recently than 2=a(24).
		

Crossrefs

Programs

  • PARI
    See PARI link \\ David A. Corneth, Sep 08 2023
  • SageMath
    def hpf_seq(top):
        H=[0,1,2,3]
        for n in range(4,top):
            prime_factors=[part[0] for part in list(factor(n))]
            cursor=-1
            while len(prime_factors)>1:
                if H[cursor] in prime_factors:
                    prime_factors.remove(H[cursor])
                cursor-=1
            hpf=prime_factors[0]
            H.append(hpf)
        return H
    
Showing 1-5 of 5 results.