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

A064920 a(n) = n/gpf(n) + gpf(n) - 1, where gpf = A006530 = greatest prime factor.

Original entry on oeis.org

2, 3, 3, 5, 4, 7, 5, 5, 6, 11, 6, 13, 8, 7, 9, 17, 8, 19, 8, 9, 12, 23, 10, 9, 14, 11, 10, 29, 10, 31, 17, 13, 18, 11, 14, 37, 20, 15, 12, 41, 12, 43, 14, 13, 24, 47, 18, 13, 14, 19, 16, 53, 20, 15, 14, 21, 30, 59, 16, 61, 32, 15, 33, 17, 16, 67, 20, 25, 16, 71, 26, 73, 38, 19, 22
Offset: 2

Views

Author

Reinhard Zumkeller, Oct 14 2001

Keywords

Comments

a(n) = A052126(n) + A006530(n) - 1; a(n) <= n and for n > 1: a(n) = n iff n is prime.

Examples

			a(18) = 18/2 + 2 - 1 = 10;
a(19) = 19/19 + 19 - 1 = 19.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (g = FactorInteger[n][[-1, 1]]; n/g + g - 1); a /@ Range[2, 76] (* Jean-François Alcover, Apr 06 2011 *)
  • PARI
    gpf(n)= { local(f); f=factor(n)~; return(f[1, length(f)]) } { for (n=2, 1000, g=gpf(n); a=n / g + g - 1; write("b064920.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 29 2009
    
  • PARI
    a(n) = my(p = vecmax(factor(n)[,1])); n/p + p - 1; \\ Michel Marcus, Jun 19 2018

A064919 a(n) = Min { k | A064916(k) = n }.

Original entry on oeis.org

2, 3, 6, 5, 10, 7, 14, 16, 18, 11, 22, 13, 26, 28, 30, 17, 34, 19, 38, 40, 42, 23, 46, 48, 50, 52, 54, 29, 58, 31, 62, 64, 66, 68, 70, 37, 74, 76, 78, 41, 82, 43, 86, 88, 90, 47, 94, 96, 98, 100, 102, 53, 106, 108, 110, 112, 114, 59, 118, 61, 122, 124, 126, 128, 130, 67
Offset: 2

Views

Author

Reinhard Zumkeller, Oct 14 2001

Keywords

Comments

A064916(a(n)) = n.

Crossrefs

Programs

  • PARI
    lpf(n)= { local(f); f=factor(n); return(f[1, 1]) } { for (n=2, 1000, k=1; until (m==n, k++; L=lpf(k); m=k / L + L - 1); write("b064919.txt", n, " ", k) ) } \\ Harry J. Smith, Sep 29 2009

Formula

For n > 2: a(n) = if n is prime then n else 2*n - 2.

A064923 a(n) = Min { k | A064920(k) = n }.

Original entry on oeis.org

2, 3, 6, 5, 10, 7, 14, 16, 24, 11, 22, 13, 26, 39, 52, 17, 34, 19, 38, 57, 76, 23, 46, 69, 72, 115, 120, 29, 58, 31, 62, 64, 96, 155, 160, 37, 74, 111, 148, 41, 82, 43, 86, 129, 172, 47, 94, 141, 144, 235, 240, 53, 106, 159, 162, 265, 270, 59, 118, 61, 122, 183, 244
Offset: 2

Views

Author

Reinhard Zumkeller, Oct 14 2001

Keywords

Comments

A064920(a(n)) = n. a(n) = n iff n is prime.

Crossrefs

Programs

  • PARI
    gpf(n)= { local(f); f=factor(n)~; return(f[1, length(f)]) } { for (n=2, 1000, k=1; until (m==n, k++; g=gpf(k); m=k / g + g - 1); write("b064923.txt", n, " ", k) ) } \\ Harry J. Smith, Sep 29 2009
Showing 1-3 of 3 results.