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 14 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

A070089 P(n) < P(n+1) where P(n) (A006530) is the largest prime factor of n.

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 10, 12, 16, 18, 20, 21, 22, 24, 25, 27, 28, 30, 32, 33, 36, 40, 42, 45, 46, 48, 50, 52, 54, 56, 57, 58, 60, 64, 66, 68, 70, 72, 75, 77, 78, 81, 82, 84, 85, 88, 90, 91, 92, 93, 96, 98, 100, 102, 105, 106, 108, 110, 112, 114, 115, 117
Offset: 1

Views

Author

N. J. A. Sloane, May 13 2002

Keywords

Comments

Erdős conjectured that this sequence has asymptotic density 1/2.
There are 500149 terms in this sequence up to 10^6, 4999951 up to 10^7, 49997566 up to 10^8, and 499992458 up to 10^9. With a binomial model with p = 1/2, these would be +0.3, -0.5, -0.0, and -0.5 standard deviations from their respective means. In other words, Erdős's conjecture seems solid. - Charles R Greathouse IV, Oct 27 2015
Erdős and Pomerance (1978) proved that the lower density of this sequence is at least 0.0099. This value was improved to 0.05544 (De La Bretèche et al., 2005), 0.1063 (Wang, 2017), 0.1356 (Wang, 2018), and 0.2017 (Lü and Wang, 2018). - Amiram Eldar, Aug 02 2020

References

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

Crossrefs

Programs

  • Mathematica
    f[n_] := FactorInteger[n][[ -1, 1]]; Select[ Range[125], f[ # ] < f[ # + 1] &]
  • PARI
    gpf(n)=if(n<3,n,my(f=factor(n)[,1]); f[#f])
    is(n)=gpf(n) < gpf(n+1) \\ Charles R Greathouse IV, Oct 27 2015

A071870 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

13, 14, 34, 37, 38, 43, 61, 62, 73, 79, 86, 94, 103, 118, 122, 123, 142, 151, 152, 157, 158, 163, 173, 185, 193, 194, 202, 206, 214, 218, 223, 229, 241, 254, 257, 258, 271, 277, 278, 283, 284, 295, 298, 302, 313, 317, 318, 321, 322, 326, 331, 334, 341, 373
Offset: 1

Views

Author

Benoit Cloitre, Jun 09 2002

Keywords

Comments

Erdős conjectured that this sequence is infinite.
Balog (2001) proved that this sequence is infinite. - Amiram Eldar, Aug 02 2020

Examples

			13 is a term since gpf(13) = 13, gpf(14) = 7, gpf(15) = 5, and 13 > 7 > 5.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[400], FactorInteger[#][[-1, 1]] >  FactorInteger[# + 1][[-1, 1]] > FactorInteger[# + 2][[-1, 1]] &] (* Jean-François Alcover, Jun 17 2013 *)
  • 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,",")))
    
  • PARI
    gpf(n) = vecmax(factor(n)[,1]);
    isok(k) = (gpf(k) > gpf(k+1)) && (gpf(k+1) > gpf(k+2)); \\ Michel Marcus, Nov 02 2020
    
  • Python
    from sympy import factorint
    A071870_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:
            A071870_list.append(n) # Chai Wah Wu, Jul 24 2017

A103667 Primes p such that the largest prime divisor of p-1 is greater than the largest prime divisor of p+1.

Original entry on oeis.org

7, 11, 23, 29, 31, 47, 53, 59, 71, 79, 83, 89, 103, 107, 127, 131, 139, 149, 167, 173, 179, 191, 199, 223, 227, 233, 239, 263, 269, 293, 307, 311, 317, 347, 349, 359, 367, 373, 383, 389, 419, 431, 439, 449, 461, 467, 479, 499, 503, 509, 557, 563, 569, 571, 587
Offset: 1

Views

Author

Hugo Pfoertner, Feb 19 2005

Keywords

Comments

Primes of the form 2*A070087(n)+1 for some n. - Charles R Greathouse IV, Dec 22 2022
Conjecture: this sequence is of positive relative density in the primes, perhaps even 1/2. - Charles R Greathouse IV, Dec 22 2022

Examples

			a(1)=7 because the largest prime divisor of 6 is greater than the largest prime divisor of 8.
		

Crossrefs

Cf. A023503 (greatest prime divisor of n-th prime - 1), A023509 (greatest prime divisor of n-th prime + 1), A103666, A070087.

Programs

  • Maple
    filter:= p -> isprime(p) and max(numtheory:-factorset(p-1)) > max(numtheory:-factorset(p+1)):
    select(filter, [seq(i,i=3..1000,2)]); # Robert Israel, Jan 15 2024
  • Mathematica
    Select[Prime@Range[2, 107], If[FactorInteger[#-1][[-1, 1]]>FactorInteger[#+1][[-1, 1]], True]&] (* James C. McMahon, Jan 15 2024 *)

A358890 a(n) is the first term of the first maximal run of n consecutive numbers with increasing greatest prime factors.

Original entry on oeis.org

14, 4, 1, 8, 90, 168, 9352, 46189, 2515371, 721970, 6449639, 565062156, 11336460025, 37151747513, 256994754033, 14037913234203
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 10 2003

Keywords

Comments

a(16) > 10^13. - Giovanni Resta, Jul 25 2013
The convention gpf(1) = A006530(1) = 1 is used (otherwise we would have a(2) = 2 and a(3) = 24). - Pontus von Brömssen, Dec 05 2022
a(17) > 10^14. - Martin Ehrenstein, Dec 10 2022

Examples

			a(7) = 9352 because the first sequence of seven consecutive numbers with increasing greatest prime factors is 9352=167*7*2^3, 9353=199*47, 9354=1559*3*2, 9355=1871*5, 9356=2339*2^2, 9357=3119*3, and 9358=4679*2. [Corrected by _Jon E. Schoenfield_, Sep 21 2022]
		

Crossrefs

Cf. A006530, A070087, A079748, A079749 (erroneous version), A100384.

Programs

  • Maple
    V:= Vector(11): count:= 0:
    a:= 1: m:= 1: w:= 1:
    for k from 2 while count < 11 do
      v:= max(numtheory:-factorset(k));
      if v > m then m:= v
      else
        if V[k-a] = 0 then V[k-a]:= a; count:= count+1; fi;
        a:= k; m:= v;
      fi
    od:
    convert(V,list); # Robert Israel, Dec 05 2022
  • Python
    from sympy import factorint
    def A358890(n):
        m = 1
        gpf1 = 1
        k = 1
        while 1:
            while 1:
                gpf2 = max(factorint(m+k))
                if gpf2 < gpf1: break
                gpf1 = gpf2
                k += 1
            if k == n: return m
            m += k
            gpf1 = gpf2
            k = 1 # Pontus von Brömssen, Dec 05 2022

Formula

A079748(a(n)) = n-1.
From Pontus von Brömssen, Dec 05 2022: (Start)
A079748(a(n)-1) = 0 for n != 3.
For n != 3, a(n) = A070087(m)+1, where m is the smallest positive integer such that A070087(m+1) - A070087(m) = n.
(End)

Extensions

More terms from Don Reble, Jan 17 2003
Corrected by Jud McCranie, Feb 11 2003
a(14)-a(15) from Giovanni Resta, Jul 25 2013
Name edited, a(1) and a(2) corrected by Pontus von Brömssen, Dec 05 2022
a(16) from Martin Ehrenstein, Dec 07 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

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

A079748 Largest k such that the greatest prime factors from n to n+k are monotonically increasing.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 10 2003

Keywords

Comments

A006530(n+i) < A006530(n+j) for 0 <= i < j < a(n);
if a(n) > 0 then a(n+1) = a(n) - 1.

Examples

			n=20: 20 = 5*2^2, 21 = 7*3, 22 = 11*2 and 23, followed by 24 = 3*2^3: therefore a(20)=3 (5 < 7 < 11 < 23 and 23 > 3).
		

Crossrefs

Formula

a(n) = 0 if and only if n is a term of A070087. - Pontus von Brömssen, Nov 09 2022

A100386 Numbers n such that for m=n to n+9, A006530(m) decreases.

Original entry on oeis.org

586951, 1473257, 4982941, 13565441, 24954141, 25384714, 26576686, 32026196, 35797623, 35953989, 37972276, 39048260, 51755761, 58769257, 60682681, 71342703, 77863117, 80826231, 84766857, 89768134, 98363506, 110482826, 115045547, 115898807, 120797465
Offset: 1

Views

Author

Labos Elemer, Dec 09 2004

Keywords

Comments

A006530(n) is the largest prime factor of n.

Examples

			586951 is here because the largest prime factors of 586951..586960 are 586951,73369,21739,9467,1319,1193,1181,1091,677,29.
		

Crossrefs

Programs

  • Mathematica
    <?(Max[Differences[#]]<0&),{1},Heads->False]//Flatten (* _Harvey P. Dale, Sep 18 2016 *)

Extensions

Edited by Don Reble, Jun 13 2007

A087430 Nonprimes n with gpf(n) > gpf(n+1), where gpf=A006530 (greatest prime factor).

Original entry on oeis.org

14, 15, 26, 34, 35, 38, 39, 44, 49, 51, 55, 62, 63, 65, 69, 74, 76, 80, 86, 87, 94, 95, 99, 104, 111, 116, 118, 119, 122, 123, 124, 129, 134, 142, 143, 146, 152, 153, 155, 158, 159, 161, 164, 174, 183, 185, 186, 188, 194, 195, 202, 203, 206, 207, 209, 214, 215
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 02 2003

Keywords

Comments

Subsequence of A070087.

Crossrefs

Cf. A087429.

Programs

  • Maple
    N:= 1000: # to get all terms < N
    V:= Vector(N):
    p:= 1:
    do
      p:= nextprime(p);
      if p > N then break fi;
      V[[seq(k*p,k=1..N/p)]]:= p
    od:
    select(t -> V[t] > V[t+1] and not isprime(t), [$1..N-1]); # Robert Israel, Jul 03 2018
  • Mathematica
    With[{nn=250},Select[Complement[Range[nn],Prime[Range[PrimePi[ nn]]]], FactorInteger[ #][[-1,1]]>FactorInteger[#+1][[-1,1]]&]] (* Harvey P. Dale, Jul 14 2016 *)
Showing 1-10 of 14 results. Next