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-9 of 9 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

A345992 Let m = A344005(n) = smallest m such that n divides m*(m+1); a(n) = gcd(n,m).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 5, 1, 1, 2, 1, 4, 3, 2, 1, 8, 1, 2, 1, 7, 1, 5, 1, 1, 11, 2, 7, 4, 1, 2, 3, 5, 1, 6, 1, 11, 9, 2, 1, 3, 1, 2, 17, 4, 1, 2, 5, 7, 3, 2, 1, 15, 1, 2, 9, 1, 5, 11, 1, 4, 23, 14, 1, 8, 1, 2, 3, 19, 7, 6, 1, 5, 1, 2, 1, 4, 17, 2, 29, 8, 1, 9, 13, 23, 3, 2, 19, 32, 1, 2, 11, 4, 1, 17
Offset: 1

Views

Author

Keywords

Comments

By definition, a(n)*A345993(n) = n.
a(n) is even iff n/2 is in A344000. This is true, but essentially trivial, and does not provide any insight into either sequence.
Empirical: For n >= 3, a(n) <= n/3, and a(n) = n/3 iff n is in 3*{2^odd, primes == -1 mod 6}.
If n = 2*p^k where p is an odd prime then m = A344005(n) = p^k - 1 and a(n) = 2. Conversely, it appears that if a(n) = 2 then n is twice an odd prime power. (Corrected by Antti Karttunen, Jun 14 2022)
a(n) = 1 if n is a prime power. - Chai Wah Wu, Jun 01 2022
From Antti Karttunen, Jun 14 2022: (Start)
Conversely, if a(n) = 1 [i.e., A345993(n) = n] then n is a power of prime. (This follows from N. J. A. Sloane's Jul 11 2021 theorem given in A344005).
Apparently, a(n) = 3 iff n = A354984(k) = 3*A137827(k), for some k >= 1.
(End)

Crossrefs

Cf. A011772, A137827, A182665, A344000, A344005, A345993, A345994, A345995, A354930, A354931 (the least occurrence of each n=1..), A354984.
Cf. also A007528, A051119, A284600.

Programs

  • Maple
    # load Findm from A344005
    ans:=[];
    for n from 1 to 40 do t1:=Findm(n)[1]; ans:=[op(ans), igcd(n,t1)]; od:
    ans;
  • Mathematica
    smd[n_]:=Module[{m=1},While[Mod[m(m+1),n]!=0,m++];GCD[n,m]]; Array[smd,110] (* Harvey P. Dale, Jan 07 2022 *)
  • PARI
    f(n) = my(m=1); while ((m*(m+1)) % n, m++); m; \\ A344005
    a(n) = gcd(n,f(n)); \\ Michel Marcus, Aug 06 2021
    (Python 3.8+)
    from math import gcd, prod
    from itertools import combinations
    from sympy import factorint
    from sympy.ntheory.modular import crt
    def A345992(n):
        if n == 1:
            return 1
        plist = tuple(p**q for p, q in factorint(n).items())
        return 1 if len(plist) == 1 else gcd(n,int(min(min(crt((m, n//m), (0, -1))[0], crt((n//m, m), (0, -1))[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l))))) # Chai Wah Wu, Jun 01 2022

Formula

a(n) = gcd(n, A182665(n)) = gcd(A182665(n), A344005(n)). - Antti Karttunen, Jun 13 2022

A345993 Let m = A344005(n) = smallest m such that n divides m*(m+1); a(n) = gcd(n,m+1).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

By definition, a(n) <= n and a(n)*A345992(n) = n.
a(n) is even iff n/2 is in A344001. This is true, but essentially trivial, and does not provide any insight into either sequence.
Empirical: For n >= 3, a(n) >= 3, and a(n) = 3 iff n in 3*{2^odd, primes == -1 mod 6}.

Crossrefs

Programs

  • Maple
    # load Findm from A344005
    ans:=[];
    for n from 1 to 40 do t1:=Findm(n)[1]+1; ans:=[op(ans), igcd(n,t1)]; od:
    ans;
  • PARI
    f(n) = my(m=1); while ((m*(m+1)) % n, m++); m; \\ A344005
    a(n) = gcd(n, f(n)+1); \\ Michel Marcus, Aug 06 2021
    
  • Python
    from math import gcd, prod
    from itertools import combinations
    from sympy import factorint
    from sympy.ntheory.modular import crt
    def A345993(n):
        if n == 1:
            return 1
        plist = tuple(p**q for p, q in factorint(n).items())
        return n if len(plist) == 1 else gcd(n,1+int(min(min(crt((m, n//m), (0, -1))[0], crt((n//m, m), (0, -1))[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l))))) # Chai Wah Wu, Jun 16 2022

A302776 a(1) = 1; for n>1, a(n) = n/(largest Fermi-Dirac factor of n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 4, 3, 2, 1, 6, 1, 2, 3, 4, 1, 6, 1, 2, 3, 2, 5, 4, 1, 2, 3, 8, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 6, 5, 8, 3, 2, 1, 12, 1, 2, 7, 4, 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, 7, 4, 3, 2, 5, 6, 1, 2, 9, 4, 1, 6, 1, 8, 15
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

For n > 1, a(n) = the smallest positive number d such that n/d is a "Fermi-Dirac prime", a term of A050376.

Crossrefs

Cf. A084400 (gives the positions of 1's).
Cf. also A052126, A284600.

Programs

  • Mathematica
    f[p_, e_] := p^(2^Floor[Log2[e]]); a[n_] := n / Max @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 26 2020 *)
  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A302777(n) = A209229(isprimepower(n));
    A302776(n) = if(1==n,n,fordiv(n, d, if(A302777(n/d), return(d))));

Formula

a(n) = n / A223491(n).
a(n) = A302023(A052126(A302024(n))).

A345994 Let m = A344005(n) = smallest m such that n divides m*(m+1); a(n) = min(gcd(n,m), gcd(n,m+1)).

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, 5, 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, 4, 1, 2, 7, 1, 5, 6, 1, 4, 3, 5, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 4, 5, 2, 3, 8, 1, 9, 7, 4, 3, 2, 5
Offset: 1

Views

Author

Keywords

Comments

This is the minimum of A345992 and A345993.

Crossrefs

A307616 a(n) is the smallest k with the property that i / gcd(i, k) is a prime power (or 1) for i = 1..n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 120, 120, 120, 120, 120, 120, 120, 360, 360, 360, 360, 360, 360, 360
Offset: 1

Views

Author

Jack Zhang, Apr 18 2019

Keywords

Comments

Conjecture: For n >= 20, a(n) = a(n-1)*A284600(a(n-1)/gcd(a(n-1),n)). - Charlie Neder, Jun 10 2019

Crossrefs

Cf. A284600.

Programs

  • Mathematica
    A307616[x_]:=(For[i=1,Length[Select[PrimeNu[Range[x]/GCD[Range[x],i]],#>1&]]>0,i++];i)
    Map[A307616,Range[100]]
  • PARI
    ispp(k) = (k==1) || isprimepower(k);
    isok(k, n) = {for (i=1, n, if (! ispp(i/gcd(i, k)), return (0); )); return (1); }
    a(n) = my(k=1); while (! isok(k,n), k++); k; \\ Michel Marcus, Jun 11 2019

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

A303759 Number of times the largest prime power factor of n (A034699) is largest prime power factor for numbers <= n; a(1) = 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 30 2018

Keywords

Comments

Ordinal transform of A034699.

Crossrefs

Cf. A000961 (positions of ones), A034699.
Cf. also A078899, A284600, A302789.

Programs

  • Maple
    b:= proc() 0 end:
    a:= proc(n) option remember; local t;
          t:= max(1, seq(i[1]^i[2], i=ifactors(n)[2]));
          b(t):= b(t)+1
        end:
    seq(a(n), n=1..120);  # Alois P. Heinz, Apr 30 2018
  • Mathematica
    f[n_] := Max[Power @@@ FactorInteger[n]];
    b[_] = 0;
    a[n_] := With[{t = f[n]}, b[t] = b[t]+1];
    Array[a, 105] (* Jean-François Alcover, Jan 03 2022 *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    A034699(n) = if(1==n,n,fordiv(n, d, if(isprimepower(n/d), return(n/d))));
    v303759 = ordinal_transform(vector(up_to,n,A034699(n)));
    A303759(n) = v303759[n];

A304404 If n = Product (p_j^k_j) then a(n) = Product (n/p_j^k_j).

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 1, 1, 1, 10, 1, 12, 1, 14, 15, 1, 1, 18, 1, 20, 21, 22, 1, 24, 1, 26, 1, 28, 1, 900, 1, 1, 33, 34, 35, 36, 1, 38, 39, 40, 1, 1764, 1, 44, 45, 46, 1, 48, 1, 50, 51, 52, 1, 54, 55, 56, 57, 58, 1, 3600, 1, 62, 63, 1, 65, 4356, 1, 68, 69, 4900, 1, 72, 1, 74, 75
Offset: 1

Views

Author

Ilya Gutkovskiy, May 12 2018

Keywords

Examples

			a(60) = a(2^2*3*5) = (60/2^2) * (60/3) * (60/5) = 15 * 20 * 12 = 3600.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ (n/#[[1]]^#[[2]] & /@ FactorInteger[n]); Table[a[n], {n, 75}]
    Table[n^(PrimeNu[n] - 1), {n, 75}]
  • PARI
    A304404(n) = (n^(omega(n)-1)); \\ Antti Karttunen, Aug 06 2018
    
  • Python
    from sympy.ntheory.factor_ import primenu
    def A304404(n): return int(n**(primenu(n)-1)) # Chai Wah Wu, Jul 12 2023

Formula

a(n) = n^(omega(n)-1), where omega() = A001221.
a(n) = A062509(n)/n.
Showing 1-9 of 9 results.