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-4 of 4 results.

A117366 a(n) = smallest prime greater than the largest prime dividing n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Mar 10 2006

Keywords

Examples

			5 is the largest prime dividing 10. So a(10) is the smallest prime > 5, which is 7.
		

Crossrefs

Programs

  • Haskell
    a117366 = a151800 . a006530  -- Reinhard Zumkeller, Apr 06 2015
    
  • Mathematica
    Table[Prime[PrimePi[FactorInteger[n][[Length[FactorInteger[n]]]][[1]]]+1], {n, 80}] (* Stefan Steinerberger, Apr 09 2006 *)
  • PARI
    A117366(n) = if(1==n, 2, nextprime(1+vecmax(factor(n)[, 1]))); \\ Antti Karttunen, Jan 15 2020

Formula

a(n) = A151800(A006530(n)). - Reinhard Zumkeller, Apr 06 2015
a(n) = A000040(A159081(n)). - Antti Karttunen, Jan 15 2020

Extensions

More terms from Stefan Steinerberger, Apr 09 2006

A117365 a(n) = largest prime less than the smallest prime dividing n (or 1 if there is no such prime).

Original entry on oeis.org

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

Views

Author

Leroy Quet, Mar 10 2006

Keywords

Comments

a(n) = 1 if and only if n is even or if n = 1.

Examples

			5 is the smallest prime dividing 35. So a(35) is the largest prime < 5, which is 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := If[EvenQ[n], 1, Prime[PrimePi[FactorInteger[n][[1]][[1]]] - 1]]; Table[a[n], {n, 2, 80}] (* Stefan Steinerberger, Mar 14 2006 *)
    Table[NextPrime[FactorInteger[n][[1, 1]], -1] /. -2 -> 1, {n, 96}] (* Michael De Vlieger, Sep 16 2017 *)

Extensions

More terms from Stefan Steinerberger, Mar 14 2006
More terms from Franklin T. Adams-Watters, Aug 29 2006

A117364 a(n) = largest prime less than the largest prime dividing n (or 1 if there is no such prime).

Original entry on oeis.org

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

Views

Author

Leroy Quet, Mar 10 2006

Keywords

Comments

a(n) = 1 if and only if n is a power of 2 (including 1).
a(n/3) = 2 iff n/3 is A003586: 3-smooth numbers: numbers of the form 2^i*3^j with i, j >= 0.
a(n/5) = 3 iff n/5 is A051037: 5-smooth numbers: i.e. numbers whose prime divisors are all <= 5, etc.

Examples

			5 is the largest prime dividing 10. So a(10) is the largest prime < 5, which is 3.
		

Crossrefs

Programs

  • Mathematica
    PrevPrime[n_] := Block[{k = n - 1}, While[ ! PrimeQ[k], k-- ]; k]; f[n_] := Block[{k = PrevPrime@ FactorInteger[Max[2, n]][[ -1, 1]]}, If[k > 1, k, 1]]; Array[f, 87] (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, May 01 2006

A117369 a(n) = smallest prime which is > smallest prime dividing n and is coprime to n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Mar 10 2006

Keywords

Examples

			a(6) = 5 because 5 is the smallest prime which is both greater than the smallest prime dividing 6, which is 2 and is coprime to 6.
		

Crossrefs

Programs

  • Mathematica
    a[1] := 2; a[n_] := Module[{}, k = PrimePi[FactorInteger[n][[1, 1]]]; k++; While[Not[GCD[Prime[k], n] == 1 ], k++ ]; Prime[k]]; Table[a[i], {i, 1, 80}] (* Stefan Steinerberger and Patrick Hanslmaier, Jun 03 2007 *)
    spdn[n_]:=Module[{s=FactorInteger[n][[1,1]],p},p=NextPrime[s];While[ !CoprimeQ[ p,n],p=NextPrime[p]];p]; Array[spdn,80] (* Harvey P. Dale, Feb 18 2018 *)

Extensions

More terms from Stefan Steinerberger and Patrick Hanslmaier, Jun 03 2007
Showing 1-4 of 4 results.