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 13 results. Next

A006530 Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The initial term a(1)=1 is purely conventional: The unit 1 is not a prime number, although it has been considered so in the past. 1 is the empty product of prime numbers, thus 1 has no largest prime factor. - Daniel Forgues, Jul 05 2011
Greatest noncomposite number dividing n, (cf. A008578). - Omar E. Pol, Aug 31 2013
Conjecture: Let a, b be nonzero integers and f(n) denote the maximum prime factor of a*n + b if a*n + b <> 0 and f(n)=0 if a*n + b=0 for any integer n. Then the set {n, f(n), f(f(n)), ...} is finite of bounded size. - M. Farrokhi D. G., Jan 10 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.
  • H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 210.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A020639 (smallest prime divisor), A034684, A028233, A034699, A053585.
Cf. A046670 (partial sums), A104350 (partial products).
See A385503 for "popular" primes.

Programs

  • Magma
    [ #f eq 0 select 1 else f[ #f][1] where f is Factorization(n): n in [1..86] ]; // Klaus Brockhaus, Oct 23 2008
    
  • Maple
    with(numtheory,divisors); A006530 := proc(n) local i,t1,t2,t3,t4,t5; t1 := divisors(n); t2 := convert(t1,list); t3 := sort(t2); t4 := nops(t3); t5 := 1; for i from 1 to t4 do if isprime(t3[t4+1-i]) then return t3[t4+1-i]; fi; od; 1; end;
    # alternative
    A006530 := n->max(1,op(numtheory[factorset](n))); # Peter Luschny, Nov 02 2010
  • Mathematica
    Table[ FactorInteger[n][[ -1, 1]], {n, 100}] (* Ray Chandler, Nov 12 2005 and modified by Robert G. Wilson v, Jul 16 2014 *)
  • PARI
    A006530(n)=if(n>1,vecmax(factor(n)[,1]),1) \\ Edited to cover n=1. - M. F. Hasler, Jul 30 2015
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else max(factorint(n))
    print([a(n) for n in range(1, 87)]) # Michael S. Branicky, Aug 08 2022
    
  • SageMath
    def A006530(n): return list(factor(n))[-1][0] if n > 1 else 1
    print([A006530(n) for n in range(1, 87)])  # Peter Luschny, Jan 07 2024
  • Scheme
    ;; The following uses macro definec for the memoization (caching) of the results. A naive implementation of A020639 can be found under that entry. It could be also defined with definec to make it faster on the later calls. See http://oeis.org/wiki/Memoization#Scheme
    (definec (A006530 n) (let ((spf (A020639 n))) (if (= spf n) spf (A006530 (/ n spf)))))
    ;; Antti Karttunen, Mar 12 2017
    

Formula

a(n) = A027748(n, A001221(n)) = A027746(n, A001222(n)); a(n)^A071178(n) = A053585(n). - Reinhard Zumkeller, Aug 27 2011
a(n) = A000040(A061395(n)). - M. F. Hasler, Jan 16 2015
a(n) = n + 1 - Sum_{k=1..n} (floor((k!^n)/n) - floor(((k!^n)-1)/n)). - Anthony Browne, May 11 2016
n/a(n) = A052126(n). - R. J. Mathar, Oct 03 2016
If A020639(n) = n [when n is 1 or a prime] then a(n) = n, otherwise a(n) = a(A032742(n)). - Antti Karttunen, Mar 12 2017
a(n) has average order Pi^2*n/(12 log n) [Brouwer]. See also A046670. - N. J. A. Sloane, Jun 26 2017

Extensions

Edited by M. F. Hasler, Jan 16 2015

A070087 P(n) > P(n+1) where P(n) (A006530) is the largest prime factor of n.

Original entry on oeis.org

3, 5, 7, 11, 13, 14, 15, 17, 19, 23, 26, 29, 31, 34, 35, 37, 38, 39, 41, 43, 44, 47, 49, 51, 53, 55, 59, 61, 62, 63, 65, 67, 69, 71, 73, 74, 76, 79, 80, 83, 86, 87, 89, 94, 95, 97, 99, 101, 103, 104, 107, 109, 111, 113, 116, 118, 119, 122, 123, 124
Offset: 1

Views

Author

N. J. A. Sloane, May 13 2002

Keywords

Comments

Erdos conjectured that this sequence has asymptotic density 1/2.

References

  • H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 210.

Crossrefs

Programs

A071869 Numbers k such that gpf(k) < gpf(k+1) < gpf(k+2) where gpf(k) denotes the largest prime factor of k.

Original entry on oeis.org

8, 9, 20, 21, 24, 27, 32, 45, 56, 57, 77, 81, 84, 90, 91, 92, 105, 114, 120, 125, 132, 135, 140, 144, 147, 165, 168, 169, 170, 171, 175, 176, 177, 189, 200, 204, 212, 216, 220, 221, 225, 231, 234, 235, 247, 252, 260, 261, 275, 288, 289, 300, 315, 324, 345, 354
Offset: 1

Views

Author

Benoit Cloitre, Jun 09 2002

Keywords

Comments

Erdős and Pomerance showed in 1978 that this sequence is infinite.

Crossrefs

Programs

  • Mathematica
    gpf[n_] := FactorInteger[n][[-1, 1]]; ind = Position[Differences[Array[gpf, 350, 2]], ?(# > 0 &)] // Flatten; ind[[Position[Differences[ind], 1] // Flatten]] + 1 (* _Amiram Eldar, Jun 05 2022 *)
  • PARI
    for(n=2,500,if(sign(component(component(factor(n),1),omega(n))-component(component(factor(n+1),1),omega(n+1)))+sign(component(component(factor(n+1),1),omega(n+1))-component(component(factor(n+2),1),omega(n+2)))==-2,print1(n,",")))
    
  • Python
    from sympy import factorint
    A071869_list, p, q, r = [], 1, 2, 3
    for n in range(2,10**4):
        p, q, r = q, r, max(factorint(n+2))
        if p < q < r:
            A071869_list.append(n) # Chai Wah Wu, Jul 24 2017

Formula

a(n) = A079747(n+1) - 1. - T. D. Noe, Nov 26 2007

A100384 a(n) = the smallest number x >= 2 such that for m = x to x + n - 1, A006530(m) increases.

Original entry on oeis.org

2, 2, 8, 8, 90, 168, 9352, 46189, 721970, 721970, 6449639, 565062156, 11336460025, 37151747513, 256994754033
Offset: 1

Views

Author

Labos Elemer, Dec 09 2004

Keywords

Comments

A006530(m) is the largest prime factor of m.
a(16) > 3*10^11. - Donovan Johnson, Oct 24 2009
a(16) > 10^13. - Giovanni Resta, Jul 25 2013

Examples

			a(5)=90 because the largest prime factors of 90,91,92,93,94 are 5,13,23,31,47.
		

Crossrefs

Programs

  • Python
    from sympy import factorint
    def A100384(n):
        k, a = 2, [max(factorint(m+2)) for m in range(n)]
        while True:
            for i in range(1, n):
                if a[i-1] >= a[i]:
                    break
            else:
                return k
            a = a[i:] + [max(factorint(k+j+n)) for j in range(i)]
            k += i # Chai Wah Wu, Jul 24 2017

Extensions

Edited by Don Reble, Jun 13 2007
a(13)-a(15) from Donovan Johnson, Oct 24 2009
Name clarified by Peter Munn, Dec 05 2022

A087429 a(n) = 1 if gpf(n) < gpf(n+1), otherwise 0, where gpf = A006530 (greatest prime factor).

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 02 2003

Keywords

Comments

Equivalently, a(n) = 1 iff A061395(n+1) > A061395(n), otherwise a(n) = 0. - Giovanni Teofilatto, Jan 03 2008

Crossrefs

Characteristic function of A070089.

Programs

  • Mathematica
    Join[{1}, Table[If[PrimePi[FactorInteger[n + 1][[ -1, 1]]] > PrimePi[FactorInteger[n][[ -1, 1]]], 1, 0], {n, 2, 90}]] (* Stefan Steinerberger, Jan 06 2008 *)
    If[#[[1]]<#[[2]],1,0]&/@Partition[FactorInteger[#][[-1,1]]&/@Range[120],2,1] (* Harvey P. Dale, Nov 19 2023 *)

Formula

a(n) = A057427(1+A057427(A070221(n))).
a(p-1)=1 and a(p)=0 for primes p.
a(A070089(n)) = 1, a(A070087(n)) = 0, a(A087430(n)) = 0.

Extensions

Edited by N. J. A. Sloane, Jul 01 2008, at the suggestion of R. J. Mathar

A100376 a(n) is the largest number x such that for m=n to n+x-1, A006530(m) increases.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Dec 09 2004

Keywords

Comments

A006530(m) is the greatest prime factor (gpf) of m.
If p is an odd prime, a(p)=1, because the largest prime factor of p+1 is smaller than p.

Examples

			a(8)=4 because the largest prime factors of 8,9,10,11 are 2,3,5,11; but gpf(12)=3.
From _Michael De Vlieger_, Jul 30 2017: (Start)
Value  First position
   1         3
   2         2
   3         9
   4         8
   5        90
   6       168
   7      9352
   8     46189
   9    721971
  10    721970
(End)
		

Crossrefs

Programs

  • Mathematica
    With[{s = Differences@ Array[FactorInteger[#][[-1, 1]] &, 115]}, Table[1 + LengthWhile[Drop[s, n], # > 0 &], {n, Length@ s - 10}]] (* Michael De Vlieger, Jul 30 2017 *)
  • PARI
    a(n) = {m = n+1; gpf = vecmax(factor(n)[,1]); while((ngpf=vecmax(factor(m)[,1])) > gpf, m++; gpf = ngpf;); m - n;} \\ Michel Marcus, Jul 25 2017

Extensions

Edited by Don Reble, Jun 13 2007

A100385 a(n) is the least number x >= 2 such that for m=x to x+n-1, A006530(m) decreases.

Original entry on oeis.org

2, 3, 13, 13, 491, 1851, 12721, 12721, 109453, 586951, 120797465, 624141002, 4044619541, 267793490438, 315400191511, 1285600699441
Offset: 1

Views

Author

Labos Elemer, Dec 09 2004

Keywords

Comments

A006530(m) is the largest prime factor of m.
a(15) > 3*10^11. - Donovan Johnson, Oct 24 2009
a(17) > 7*10^12. - Giovanni Resta, May 04 2017

Examples

			a(5)=491 because the largest prime factors of 491,492,493,494,495 are 491,41,29,19,11.
		

Crossrefs

Programs

  • Mathematica
    Function[s, Prepend[Reverse@ FoldList[If[#2 > #1, #1, #2] &, Reverse@ #], 2] &@ Map[Function[k, First@ SelectFirst[s, And[Sign@ First@ # == 1, Length@ # == k] &]], Range[Max@ Map[Length, s]]]]@ SplitBy[Flatten[ Partition[Array[{#, FactorInteger[#][[-1, 1]]} &, 10^6], 2, 1] /. {{n_, a_}, {, b}} /; n > 0 :> -n Sign[Differences@ {a, b}]], Sign] (* Michael De Vlieger, May 04 2017, Version 10.2 *)

Formula

a(n) = A070089(x)+1, where x is the smallest positive integer such that A070089(x+1)-A070089(x) >= n. - Pontus von Brömssen, Nov 09 2022

Extensions

Edited by Don Reble, Jun 13 2007
a(14) from Donovan Johnson, Oct 24 2009
a(15)-a(16) from Giovanni Resta, May 04 2017

A185011 Numbers k such that P(k^2+1) < P((k+1)^2+1) where P(n) (A006530) is the largest prime factor of n.

Original entry on oeis.org

1, 3, 5, 7, 8, 9, 13, 15, 18, 19, 21, 23, 25, 27, 28, 31, 32, 34, 35, 38, 39, 41, 43, 44, 47, 48, 50, 53, 55, 57, 58, 60, 64, 65, 68, 70, 73, 75, 76, 77, 78, 80, 81, 83, 86, 87, 89, 91, 93, 96, 99, 100, 105, 107, 109, 111, 112, 114, 115, 117, 119, 123, 125
Offset: 1

Views

Author

Michel Lagneau, Jan 23 2012

Keywords

Examples

			8 is in the sequence because 8^2+1 = 5*13 and 9^2+1 = 2*41 => 13 < 41.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=FactorInteger[n^2+1][[-1,1]];Select[Range[125],f[#]
    				

A216651 Lengths of decreasing blocks of A006530, the greatest prime factor of n, starting from the second term.

Original entry on oeis.org

1, 2, 2, 2, 1, 1, 2, 4, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 3, 4, 2, 3, 1, 2, 2, 2, 2, 2, 1, 1, 2, 4, 2, 2, 2, 2, 3, 2, 1, 3, 1, 2, 1, 3, 2, 1, 1, 1, 3, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 2, 3, 1, 4, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 3, 1, 2, 1, 2, 4, 2, 4, 2, 3, 1, 2, 1
Offset: 1

Views

Author

Michel Lagneau, Sep 12 2012

Keywords

Comments

Let gpf(m) be the greatest prime factor of m and the subset E(n) = {m, m+1, ..., m+L-1} such that gpf(m) > gpf(m+1) > ... > gpf(m+L-1) where L is the maximum length of E(n) and n the index such that {E(1) union E(2) union .... } = {2, 3, 4, ...}.
The growth of a(n) is very slow. See the following smallest values of m such that a(m) = n:
a(1) = 1, a(2) = 2, a(20) = 3, a(8) = 4, a(251) = 5, a(936) = 6, a(15553) = 7, a(6380) = 8, a(54838)=9, a(293548) = 10.

Examples

			A006530 with decreasing blocks marked: (2), (3, 2), (5, 3), (7, 2), (3), (5), (11, 3), (13, 7, 5, 2), .... Thus the terms of this sequence are 1, 2, 2, 2, 1, 1, 2, 4, ....
		

Crossrefs

First differences of A070089.

Programs

  • Maple
    N:= 1000: # to use A006530(1..N)
    L:= map(max @ numtheory:-factorset, [$1..N]):
    DL:= L[2..-1]-L[1..-2]:
    R:= select(t -> DL[t]>= 0, [$1..N-1]):
    R[2..-1]-R[1..-2]; # Robert Israel, Mar 02 2018

Formula

a(n) = A070089(n+1)-A070089(n). - Pontus von Brömssen, Nov 09 2022

A100383 Numbers k such that gpf(k) < gpf(k+1) < ... < gpf(k+9), where gpf(x) = A006530(x), the greatest prime factor of x. Numbers initiating an uphill gpf run of length 10.

Original entry on oeis.org

721970, 1091150, 6449639, 6449640, 10780550, 12161824, 15571630, 17332430, 23189750, 24901256, 28262037, 30275508, 30814114, 32184457, 32608598, 35323087, 35725704, 38265227, 38896955, 69845438, 71040720, 74345936, 79910528, 85293163, 111082114
Offset: 1

Views

Author

Labos Elemer, Dec 09 2004

Keywords

Comments

Analogous chains of length 3 (see A071869) are infinite as shown by Erdős and Pomerance (1978). What is true for longer successions of length=4,5,...?

Examples

			n = 85293163: the corresponding uphill run of GPFs is (739, 5197, 6311, 7457, 8537, 1776941, 6561013, 8529317, 9477019, 21323293).
		

Crossrefs

Showing 1-10 of 13 results. Next