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

A284600 a(n) = n/(largest prime power dividing n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 4, 3, 2, 1, 3, 1, 2, 1, 4, 1, 6, 1, 1, 3, 2, 5, 4, 1, 2, 3, 5, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 2, 5, 7, 3, 2, 1, 12, 1, 2, 7, 1, 5, 6, 1, 4, 3, 10, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 12, 5, 2, 3, 8, 1, 10
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 30 2017

Keywords

Comments

a(n) = smallest positive number k such that n/k is a prime power.

Examples

			a(12) = 3 because 12 = 2^2*3 therefore 12/(largest prime power dividing 12) = 12/4 = 3.
		

Crossrefs

Has same beginning as A052128 and A114536 but is strictly different from those two sequences.

Programs

  • Maple
    f:= n ->  n /max(map(t -> t[1]^t[2], ifactors(n)[2])):
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Apr 09 2017
  • Mathematica
    Join[{1}, Table[n/Last[Select[Divisors[n], PrimePowerQ[#1] &]], {n, 2, 90}]]
  • Python
    from sympy import lcm
    def a003418(n): return 1 if n<1 else lcm(range(1, n + 1))
    def a(n):
        m=1
        while True:
            if a003418(m)%n==0: return m
            else: m+=1
    print([n//a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 04 2017

Formula

a(n) = n/A034699(n).
a(n) = 1 if n is a prime power (A000961).
a(n) = 2 if n is a twice odd prime power (A278568).

A076388 a(n) = minimum of y-x such that x <= y, x*y = n and gcd(x,y)=1.

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 6, 7, 8, 3, 10, 1, 12, 5, 2, 15, 16, 7, 18, 1, 4, 9, 22, 5, 24, 11, 26, 3, 28, 1, 30, 31, 8, 15, 2, 5, 36, 17, 10, 3, 40, 1, 42, 7, 4, 21, 46, 13, 48, 23, 14, 9, 52, 25, 6, 1, 16, 27, 58, 7, 60, 29, 2, 63, 8, 5, 66, 13, 20, 3, 70, 1, 72, 35, 22, 15, 4, 7, 78, 11, 80, 39
Offset: 1

Views

Author

T. D. Noe, Oct 11 2002

Keywords

Comments

If n is a prime or a power of a prime, a(n) = n-1. Similar to A056737, which does not have the gcd(x,y)=1 condition.

Examples

			a(12) = 1 because of the possible (x,y) pairs, (1,12), (2,6), (3,4), the pair (3,4) yields the minimum difference and satisfies gcd(x,y)=1.
		

Crossrefs

Differs from |A354988(n)| for the first time at n=60, where a(60) = 7, while A354988(60) = -11.

Programs

  • Mathematica
    nMax = 100; Table[dvs = Divisors[n]; i = 1; j = 1; While[n/dvs[[i]] > dvs[[i]], If[GCD[n/dvs[[i]], dvs[[i]]] == 1, j = i]; i++ ]; n/dvs[[j]] - dvs[[j]], {n, 2, nMax}]
  • PARI
    A076388(n) = fordiv(n,d,if((d>=(n/d)) && 1==gcd(d,n/d), return(d-(n/d)))); \\ Antti Karttunen, Jun 16 2022

Formula

a(n) = A354933(n) - A052128(n). - Corrected by Antti Karttunen, Jun 16 2022

Extensions

Definition formally changed from x < y to x <= y, to accommodate the prepended term a(1)=0 - Antti Karttunen, Jun 16 2022

A354933 a(1) = 1; for n > 1, a(n) = n / the largest divisor of n that is coprime to a larger divisor 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, 6, 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, 12, 61, 31, 9, 64, 13, 11, 67, 17, 23, 10, 71, 9, 73, 37, 25, 19, 11, 13, 79, 16, 81, 41, 83, 12, 17, 43
Offset: 1

Views

Author

Antti Karttunen, Jun 16 2022

Keywords

Comments

a(n) is the smallest divisor d of n such that d >= sqrt(n) and that gcd(d,n/d) = 1. For the proof see A052128. - Jianing Song, Sep 28 2022

Crossrefs

Differs from A346596 for the first time at n=60, where a(60) = 12, while A346596(60) = 15.

Programs

  • Mathematica
    a[n_] := SelectFirst[Divisors[n], # >= n/# && CoprimeQ[#, n/#] &]; Array[a, 100] (* Amiram Eldar, Jun 16 2022 *)
  • PARI
    A354933(n) = fordiv(n,d,if((d>=(n/d)) && 1==gcd(d,n/d), return(d)));

Formula

a(n) = n / A052128(n).
a(n) = A052128(n) + A076388(n).

Extensions

Definition rewritten by Jianing Song, Sep 28 2022

A081805 a(n) = n minus (largest prime power in n factorization); a(1) = 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 0, 0, 0, 5, 0, 8, 0, 7, 10, 0, 0, 9, 0, 15, 14, 11, 0, 16, 0, 13, 0, 21, 0, 25, 0, 0, 22, 17, 28, 27, 0, 19, 26, 32, 0, 35, 0, 33, 36, 23, 0, 32, 0, 25, 34, 39, 0, 27, 44, 48, 38, 29, 0, 55, 0, 31, 54, 0, 52, 55, 0, 51, 46, 63, 0, 63, 0, 37, 50, 57, 66, 65, 0, 64, 0, 41, 0
Offset: 1

Views

Author

Benoit Cloitre, Apr 10 2003

Keywords

Comments

a(n) = 0 when n is a prime power (A000961). - Michel Marcus, Dec 03 2013

Crossrefs

Programs

  • Mathematica
    f[n_] := (n - (#[[1]]^#[[2]]) & /@ {FactorInteger[n][[-1]] })[[1]]; Array[f, 80] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    A081805(n) = if(1==n,0,my(f = factor(n)); n - vecmax(vector(#f~, k, f[k, 1]^f[k, 2]))); \\ Michel Marcus Jul 24 2017 & Antti Karttunen, Aug 06 2018

Formula

a(n) = n - A034699(n). - Michel Marcus, Jul 24 2017

Extensions

Term a(1) = 0 prepended by Antti Karttunen, Aug 06 2018
Showing 1-5 of 5 results.