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

A289437 The arithmetic function v_2(n,4).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 3, 2, 3, 4, 3, 4, 5, 4, 4, 6, 5, 5, 7, 6, 6, 8, 6, 6, 9, 8, 7, 10, 8, 8, 11, 8, 10, 12, 9, 10, 13, 10, 10, 14, 11, 12, 15, 12, 12, 16, 14, 12, 17, 13, 13, 18, 15, 16, 19, 14, 15, 20, 15, 16, 21, 16, 16, 22, 17, 17, 23, 20
Offset: 2

Views

Author

N. J. A. Sloane, Jul 07 2017

Keywords

References

  • J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).

Crossrefs

Programs

  • Maple
    a:= n-> n*max(seq((floor((d-1-igcd(d, 2))/4)+1)
            /d, d=numtheory[divisors](n))):
    seq(a(n), n=2..100);  # Alois P. Heinz, Jul 07 2017
  • Mathematica
    a[n_]:=n*Max[Table[(Floor[(d - 1 - GCD[d, 2])/4] + 1)/d, {d, Divisors[n]}]]; Table[a[n], {n, 2, 100}] (* Indranil Ghosh, Jul 08 2017 *)
  • PARI
    v(g,n,h)={my(t=0);fordiv(n,d,t=max(t,((d-1-gcd(d,g))\h + 1)*(n/d)));t}
    a(n)=v(2,n,4); \\ Andrew Howroyd, Jul 07 2017
    
  • Python
    from sympy import divisors, floor, gcd
    def a(n): return n*max([(floor((d - 1 - gcd(d, 2))/4) + 1)/d for d in divisors(n)])
    print([a(n) for n in range(2, 101)]) # Indranil Ghosh, Jul 08 2017

Extensions

a(41)-a(70) from Andrew Howroyd, Jul 07 2017

A289438 The arithmetic function v_4(n,4).

Original entry on oeis.org

0, 1, 0, 1, 2, 2, 1, 3, 2, 3, 4, 3, 4, 5, 3, 4, 6, 5, 4, 7, 6, 6, 8, 6, 6, 9, 8, 7, 10, 8, 7, 11, 8, 10, 12, 9, 10, 13, 9, 10, 14, 11, 12, 15, 12, 12, 16, 14, 12, 17, 12, 13, 18, 15, 16, 19, 14, 15, 20, 15, 16, 21, 15, 16, 22, 17, 16, 23, 20
Offset: 2

Views

Author

N. J. A. Sloane, Jul 07 2017

Keywords

References

  • J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).

Crossrefs

Programs

  • Maple
    a:= n-> n*max(seq((floor((d-1-igcd(d, 4))/4)+1)
            /d, d=numtheory[divisors](n))):
    seq(a(n), n=2..100);  # Alois P. Heinz, Jul 07 2017
  • Mathematica
    a[n_]:=n*Max[Table[(Floor[(d - 1 - GCD[d, 4])/4] + 1)/d, {d, Divisors[n]}]]; Table[a[n], {n, 2, 100}] (* Indranil Ghosh, Jul 08 2017 *)
  • PARI
    v(g,n,h)={my(t=0);fordiv(n,d,t=max(t,((d-1-gcd(d,g))\h + 1)*(n/d)));t}
    a(n)=v(4,n,4); \\ Andrew Howroyd, Jul 07 2017
    
  • Python
    from sympy import divisors, floor, gcd
    def a(n): return n*max([(floor((d - 1 - gcd(d, 4))/4) + 1)/d for d in divisors(n)])
    print([a(n) for n in range(2, 101)]) # Indranil Ghosh, Jul 08 2017

Extensions

a(41)-a(70) from Andrew Howroyd, Jul 07 2017

A290988 The arithmetic function v+-(n,3).

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 3, 5, 3, 6, 3, 7, 5, 8, 5, 9, 5, 10, 7, 11, 7, 12, 7, 13, 9, 14, 9, 15, 9, 16, 11, 17, 11, 18, 11, 19, 13, 20, 13, 21, 13, 22, 15, 23, 15, 24, 15, 25, 17, 26, 17, 27, 17, 28, 19, 29, 19, 30, 19, 31, 21, 32, 21, 33, 21, 34, 23, 35
Offset: 2

Views

Author

Robert Price, Aug 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    vpm[n_, h_] := (d = Divisors[n]; Max[(2*Floor[(d - 2)/(2*h)] + 1)*n/d]); Table[vpm[n, 3], {n, 2, 70}]

A289187 The arithmetic function v_1(n,6).

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 3, 5, 2, 6, 2, 7, 5, 8, 3, 9, 3, 10, 7, 11, 4, 12, 5, 13, 9, 14, 5, 15, 5, 16, 11, 17, 7, 18, 6, 19, 13, 20, 7, 21, 7, 22, 15, 23, 8, 24, 8, 25, 17, 26, 9, 27, 11, 28, 19, 29, 10, 30, 10, 31, 21, 32, 13, 33, 11, 34, 23, 35
Offset: 2

Views

Author

Robert Price, Aug 16 2017

Keywords

References

  • J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).

Crossrefs

Programs

  • Mathematica
    v[g_, n_, h_] := (d = Divisors[n]; Max[(Floor[(d - 1 - GCD[d, g])/h] + 1)*n/d]); Table[v[1, n, 6], {n, 2, 70}]
    a[n_]:=n Max[Table[(Floor[(d - 1 - GCD[d, 1])/6] + 1)/d, {d, Divisors[n]}]]; Table[a[n], {n, 2, 100}] (* Vincenzo Librandi, Aug 17 2017 *)

A291041 The arithmetic function uhat(n,7,4).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 7, 13, 8, 13, 9, 13, 10, 7, 11, 13, 8, 13, 13, 9, 7, 13, 10, 13, 8, 11, 13, 7, 9, 13, 13, 13, 8, 13, 7, 13, 11, 9, 13, 13, 8, 7, 10, 13, 13, 13, 9, 11, 7, 13, 13, 13, 10, 13, 13, 7, 8, 13, 11, 13, 13, 13, 7
Offset: 1

Views

Author

Robert Price, Aug 16 2017

Keywords

Comments

The sequence appears to be equal to uhat(n,7,3), at least to 10000 terms.

Crossrefs

Programs

  • Mathematica
    delta[r_, k_, d_] := If[r < k, (k - r)*r - (d - 1), If[k < r && r < d, (d - r)*(r - k) - (d - 1), If[k == r && r == d, d - 1, 0]]] uhat[n_, m_,  h_] := (dx = Divisors[n]; dmin = n; For[i = 1, i ≤ Length[dx], i++, d = dx[[i]]; k = m - d*Ceiling[m/d] + d; r = h - d*Ceiling[h/d] + d; If[h ≤ Min[k, d - 1], dmin = Min[dmin, n, (h*Ceiling[m/d] - h + 1)*d, h*m - h*h + 1], dmin = Min[dmin, n, h*m - h*h + 1 - delta[r, k, d]]]]; dmin) Table[uhat[n, 7, 4], {n, 1, 70}]

A291306 The arithmetic function v_6(n,1).

Original entry on oeis.org

0, 0, 2, 4, 0, 6, 6, 6, 8, 10, 6, 12, 12, 12, 14, 16, 12, 18, 18, 18, 20, 22, 18, 24, 24, 24, 26, 28, 24, 30, 30, 30, 32, 34, 30, 36, 36, 36, 38, 40, 36, 42, 42, 42, 44, 46, 42, 48, 48, 48, 50, 52, 48, 54, 54, 54, 56, 58, 54, 60, 60, 60, 62, 64, 60, 66, 66, 66, 68
Offset: 2

Views

Author

Robert Price, Aug 21 2017

Keywords

References

  • J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).

Crossrefs

Programs

  • Maple
    seq(n-gcd(n,6), n=2..100); # Ridouane Oudra, Dec 15 2024
  • Mathematica
    v[g_, n_, h_] := (d = Divisors[n]; Max[(Floor[(d - 1 - GCD[d, g])/h] + 1)*n/d]); Table[v[6, n, 1], {n, 2, 70}]

Formula

a(n) = n - gcd(n,6) = n - A089128(n). - Ridouane Oudra, Dec 15 2024
Sum_{n>=7} (-1)^n/a(n) = Pi/(6*sqrt(3)) - 1/4. - Amiram Eldar, Jan 15 2025

A291330 The arithmetic function v_4(n,1).

Original entry on oeis.org

0, 2, 0, 4, 4, 6, 4, 8, 8, 10, 8, 12, 12, 14, 12, 16, 16, 18, 16, 20, 20, 22, 20, 24, 24, 26, 24, 28, 28, 30, 28, 32, 32, 34, 32, 36, 36, 38, 36, 40, 40, 42, 40, 44, 44, 46, 44, 48, 48, 50, 48, 52, 52, 54, 52, 56, 56, 58, 56, 60, 60, 62, 60, 64, 64, 66, 64, 68, 68
Offset: 2

Views

Author

Robert Price, Aug 22 2017

Keywords

References

  • J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).

Crossrefs

Programs

  • Maple
    seq(n-gcd(n,4), n=2..100); # Ridouane Oudra, Dec 15 2024
  • Mathematica
    v[g_, n_, h_] := (d = Divisors[n]; Max[(Floor[(d - 1 - GCD[d, g])/h] + 1)*n/d]); Table[v[4, n, 1], {n, 2, 70}]
  • PARI
    /* Adapted from Mathematica program */
    v(g, n, h) = my(d=divisors(n)); for(k=1, #d, d[k]=floor(((d[k]-1-gcd(d[k], g))/h) + 1)*n/d[k]); vecmax(d)
    a(n) = v(4, n, 1) \\ Felix Fröhlich, Aug 22 2017

Formula

a(n) = n - gcd(n,4) = n - A109008(n). - Ridouane Oudra, Dec 15 2024
Sum_{n>=5} (-1)^n/a(n) = (1 - log(2))/2. - Amiram Eldar, Jan 15 2025

A291357 The arithmetic function u(n,2,3).

Original entry on oeis.org

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

Views

Author

Robert Price, Aug 23 2017

Keywords

Crossrefs

Programs

  • Mathematica
    u[n_, m_, h_] := (d = Divisors[n]; Min[(h*Ceiling[m/d] - h + 1)*d]); Table[u[n, 2, 3], {n, 1, 70}]
  • PARI
    A291357(n, m=2, h=3) = { my(p=0,k); fordiv(n,d,k = d*(h*ceil(m/d) - h + 1); if(!p || (k < p), p = k)); (p); }; \\ Antti Karttunen, Oct 01 2018

Extensions

More terms from Antti Karttunen, Oct 01 2018

A291358 The arithmetic function u(n,2,4).

Original entry on oeis.org

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

Views

Author

Robert Price, Aug 23 2017

Keywords

Crossrefs

Programs

  • Mathematica
    u[n_, m_, h_] := (d = Divisors[n]; Min[(h*Ceiling[m/d] - h + 1)*d]); Table[u[n, 2, 4], {n, 1, 70}]
  • PARI
    A291358(n, m=2, h=4) = { my(p=0,k); fordiv(n,d,k = d*(h*ceil(m/d) - h + 1); if(!p || (k < p), p = k)); (p); }; \\ Antti Karttunen, Oct 01 2018

Extensions

More terms from Antti Karttunen, Oct 01 2018

A291359 The arithmetic function u(n,2,5).

Original entry on oeis.org

6, 2, 3, 2, 5, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 5, 2, 3, 2, 6, 2, 6, 2, 3, 2, 5, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 5, 2, 3, 2, 6, 2, 6, 2, 3, 2, 5, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 5, 2, 3, 2, 6, 2, 6, 2, 3, 2, 5, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3
Offset: 1

Views

Author

Robert Price, Aug 23 2017

Keywords

Crossrefs

Programs

  • Mathematica
    u[n_, m_, h_] := (d = Divisors[n]; Min[(h*Ceiling[m/d] - h + 1)*d]); Table[u[n, 2, 5], {n, 1, 70}]
  • PARI
    A291359(n, m=2, h=5) = { my(p=0,k); fordiv(n,d,k = d*(h*ceil(m/d) - h + 1); if(!p || (k < p), p = k)); (p); }; \\ Antti Karttunen, Oct 01 2018

Extensions

More terms from Antti Karttunen, Oct 01 2018
Showing 1-10 of 113 results. Next