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.

A020639 Lpf(n): least prime dividing n (when n > 1); a(1) = 1. Or, smallest prime factor of n, or smallest prime divisor of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also, the largest number of distinct integers such that all their pairwise differences are coprime to n. - Max Alekseyev, Mar 17 2006
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 least prime factor. - Daniel Forgues, Jul 05 2011
a(n) = least m > 0 for which n! + m and n - m are not relatively prime. - Clark Kimberling, Jul 21 2012
For n > 1, a(n) = the smallest k > 1 that divides n. - Antti Karttunen, Feb 01 2014
For n > 1, records are at prime indices. - Zak Seidov, Apr 29 2015
The initials "lpf" might be mistaken for "largest prime factor" (A009190), using "spf" for "smallest prime factor" would avoid this. - M. F. Hasler, Jul 29 2015
n = 89 is the first index > 1 for which a(n) differs from the smallest k > 1 such that (2^k + n - 2)/k is an integer. - M. F. Hasler, Aug 11 2015
From Stanislav Sykora, Jul 29 2017: (Start)
For n > 1, a(n) is also the smallest k, 1 < k <= n, for which the binomial(n,k) is not divisible by n.
Proof: (A) When k and n are relatively prime then binomial(n,k) is divisible by n because k*binomial(n,k) = n*binomial(n-1,k-1). (B) When gcd(n,k) > 1, one of its prime factors is the smallest; let us denote it p, p <= k, and consider the binomial(n,p) = (1/p!)*Product_{i=0..p-1} (n-i). Since p is a divisor of n, it cannot be a divisor of any of the remaining numerator factors. It follows that, denoting as e the largest e > 0 such that p^e|n, the numerator is divisible by p^e but not by p^(e+1). Hence, the binomial is divisible by p^(e-1) but not by p^e and therefore not divisible by n. Applying (A), (B) to all considered values of k completes the proof. (End)
From Bob Selcoe, Oct 11 2017, edited by M. F. Hasler, Nov 06 2017: (Start)
a(n) = prime(j) when n == J (mod A002110(j)), n, j >= 1, where J is the set of numbers <= A002110(j) with smallest prime factor = prime(j). The number of terms in J is A005867(j-1). So:
a(n) = 2 when n == 0 (mod 2);
a(n) = 3 when n == 3 (mod 6);
a(n) = 5 when n == 5 or 25 (mod 30);
a(n) = 7 when n == 7, 49, 77, 91, 119, 133, 161 or 203 (mod 210);
etc. (End)
For n > 1, a(n) is the leftmost term, other than 0 or 1, in the n-th row of A127093. - Davis Smith, Mar 05 2019

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.

Crossrefs

Cf. A090368 (bisection).
Cf. A046669 (partial sums), A072486 (partial products).
Cf. A127093.

Programs

  • Haskell
    a020639 n = spf a000040_list where
      spf (p:ps) | n < p^2      = n
                 | mod n p == 0 = p
                 | otherwise    = spf ps
    -- Reinhard Zumkeller, Jul 13 2011
    
  • Maple
    A020639 := proc(n) if n = 1 then 1; else min(op(numtheory[factorset](n))) ; end if; end proc: seq(A020639(n),n=1..20) ; # R. J. Mathar, Oct 25 2010
  • Mathematica
    f[n_]:=FactorInteger[n][[1,1]]; Join[{1}, Array[f,120,2]]  (* Robert G. Wilson v, Apr 06 2011 *)
    Join[{1}, Table[If[EvenQ[n], 2, FactorInteger[n][[1,1]]], {n, 2, 120}]] (* Zak Seidov, Nov 17 2013 *)
    Riffle[Join[{1},Table[FactorInteger[n][[1,1]],{n,3,101,2}]],2] (* Harvey P. Dale, Dec 16 2021 *)
  • PARI
    A020639(n) = { vecmin(factor(n)[,1]) } \\ [Will yield an error for n = 1.] - R. J. Mathar, Mar 02 2012
    
  • PARI
    A020639(n)=if(n>1, if(n>n=factor(n,0)[1,1], n, factor(n)[1,1]), 1) \\ Avoids complete factorization if possible. Often the smallest prime factor can be found quickly even if it is larger than primelimit. If factoring takes too long for large n, use debugging level >= 3 (\g3) to display the smallest factor as soon as it is found. - M. F. Hasler, Jul 29 2015
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else min(factorint(n))
    print([a(n) for n in range(1, 98)]) # Michael S. Branicky, Dec 09 2021
  • Sage
    def A020639_list(n) : return [1] + [prime_divisors(n)[0] for n in (2..n)]
    A020639_list(97) # Peter Luschny, Jul 16 2012
    
  • Sage
    [trial_division(n) for n in (1..100)] # Giuseppe Coppoletta, May 25 2016
    
  • Scheme
    (define (A020639 n) (if (< n 2) n (let loop ((k 2)) (cond ((zero? (modulo n k)) k) (else (loop (+ 1 k))))))) ;; Antti Karttunen, Feb 01 2014
    

Formula

A014673(n) = a(A032742(n)); A115561(n) = a(A054576(n)). - Reinhard Zumkeller, Mar 10 2006
A028233(n) = a(n)^A067029(n). - Reinhard Zumkeller, May 13 2006
a(n) = A027746(n,1) = A027748(n,1). - Reinhard Zumkeller, Aug 27 2011
For n > 1: a(n) = A240694(n,2). - Reinhard Zumkeller, Apr 10 2014
a(n) = A000040(A055396(n)) = n / A032742(n). - Antti Karttunen, Mar 07 2017
a(n) has average order n/(2 log n) [Brouwer] - N. J. A. Sloane, Sep 03 2017

Extensions

Deleted wrong comment from M. Lagneau in 2012, following an observation by Gionata Neri. - M. F. Hasler, Aug 11 2015
Edited by M. F. Hasler, Nov 06 2017
Expanded definition to make this easier to find. - N. J. A. Sloane, Sep 21 2020

A104350 Partial products of largest prime factors of numbers <= n.

Original entry on oeis.org

1, 2, 6, 12, 60, 180, 1260, 2520, 7560, 37800, 415800, 1247400, 16216200, 113513400, 567567000, 1135134000, 19297278000, 57891834000, 1099944846000, 5499724230000, 38498069610000, 423478765710000, 9740011611330000
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Comments

Partial Products of A006530: a(n) = Product_{k=1..n} A006530(k).
a(n) = a(n-1)*A006530(n) for n>1, a(1) = 1;
A020639(a(n)) = A040000(n-1), A006530(a(n)) = A007917(n) for n>1.
A001221(a(n)) = A000720(n), A001222(a(n)) = A001477(n-1).
A007947(a(n)) = A034386(n).
a(n) = A000142(n) / A076928(n). [Corrected by Franklin T. Adams-Watters, Oct 30 2006]
In decimal representation: A104351(n) = number of digits of a(n), A104355(n) = number of trailing zeros of a(n).
A104357(n) = a(n) - 1, A104365(n) = a(n) + 1.

References

  • Gérald Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, Publ. Inst. Elie Cartan, Vol. 13, Nancy, 1990.

Crossrefs

Programs

  • Haskell
    a104350 n = a104350_list !! (n-1)
    a104350_list = scanl1 (*) a006530_list
    -- Reinhard Zumkeller, Apr 10 2014
    
  • Mathematica
    A104350[n_] := Product[FactorInteger[k][[-1, 1]], {k, 1, n}]; Table[A104350[n], {n, 30}] (* G. C. Greubel, May 09 2017 *)
    FoldList[Times,Table[FactorInteger[n][[-1,1]],{n,30}]] (* Harvey P. Dale, May 25 2023 *)
  • PARI
    gpf(n)=my(f=factor(n)[,1]); f[#f]
    a(n)=prod(i=2,n,gpf(i)) \\ Charles R Greathouse IV, Apr 29 2015
    
  • PARI
    first(n)=my(v=vector(n,i,1)); forfactored(k=2,n, v[k[1]]=v[k[1]-1]*vecmax(k[2][,1])); v \\ Charles R Greathouse IV, May 10 2017

Formula

log(a(n)) = c * n * log(n) + c * (1-gamma) * n + O(n * exp(-log(n)^(3/8-eps))), where c is the Golomb-Dickman constant (A084945) and gamma is Euler's constant (A001620) (Tenenbaum, 1990). - Amiram Eldar, May 21 2021

Extensions

More terms from David Wasserman, Apr 24 2008

A046669 Partial sums of A020639.

Original entry on oeis.org

1, 3, 6, 8, 13, 15, 22, 24, 27, 29, 40, 42, 55, 57, 60, 62, 79, 81, 100, 102, 105, 107, 130, 132, 137, 139, 142, 144, 173, 175, 206, 208, 211, 213, 218, 220, 257, 259, 262, 264, 305, 307, 350, 352, 355, 357, 404, 406, 413, 415, 418, 420, 473
Offset: 1

Views

Author

Keywords

References

  • M. Kalecki, On certain sums extended over primes or prime factors (in Polish), Prace Mat., Vol. 8 (1963/64), pp. 121-129.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section IV.1, p. 121.

Crossrefs

Programs

  • Haskell
    a046669 n = a046669_list !! (n-1)
    A046669_list = scanl1 (+) a020639_list -- Reinhard Zumkeller, Jun 15 2013
  • Mathematica
    Accumulate[Array[FactorInteger[#][[1,1]]&,60]]  (* Harvey P. Dale, Apr 20 2011 *)

Formula

a(n) = A088821(n) + 1.
From Amiram Eldar, Mar 04 2021: (Start)
a(n) ~ ((1 + o(1))/2)* n^2/log(n) (Kalecki, 1963/64).
a(n) = (1/2) * n^2/log(n) + O(n^2/log(n)^2) (Brouwer, 1974). (End)

A191836 The slowest growing sequence that satisfies: a(1) = 1, a(n) is a multiple of n and a(n-1), and a(n) > a(n-1).

Original entry on oeis.org

1, 2, 6, 12, 60, 120, 840, 1680, 5040, 10080, 110880, 221760, 2882880, 5765760, 11531520, 23063040, 392071680, 784143360, 14898723840, 29797447680, 59594895360, 119189790720, 2741365186560, 5482730373120, 27413651865600, 54827303731200, 164481911193600, 328963822387200
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A072486.

Programs

  • Mathematica
    a[1]=1; a[n_]:=a[n]=If[LCM[n,a[n-1]]==a[n-1],2 *a[n-1],LCM[n,a[n-1]]]

Formula

a(n) = A072486(n) for n < 15.
a(1) = 1; for n > 1, a(n) = a(n-1) * (if n is a prime power p^k then p else 2). - Franklin T. Adams-Watters, Jan 13 2012

Extensions

a(26)-a(28) from Amiram Eldar, Jun 28 2024

A072487 a(1) = 1, a(n) = a(n-1) times largest nontrivial divisor if n is composite.

Original entry on oeis.org

1, 2, 6, 12, 60, 180, 1260, 5040, 15120, 75600, 831600, 4989600, 64864800, 454053600, 2270268000, 18162144000, 308756448000, 2778808032000, 52797352608000, 527973526080000, 3695814682560000, 40653961508160000
Offset: 1

Views

Author

Amarnath Murthy, Jul 13 2002

Keywords

Comments

a(n) = n*a(n-1) if n is a prime.

Examples

			a(6)= 180 hence a(7) = 7*180 = 1260.
		

Crossrefs

Cf. A072486.

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 25 2003
Showing 1-5 of 5 results.