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

A289439 The arithmetic function v_1(n,5).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 3, 5, 2, 6, 3, 7, 5, 8, 4, 9, 4, 10, 7, 11, 5, 12, 5, 13, 9, 14, 6, 15, 6, 16, 11, 17, 10, 18, 8, 19, 13, 20, 8, 21, 9, 22, 15, 23, 10, 24, 14, 25, 17, 26, 11, 27, 11, 28, 19, 29, 12, 30, 12, 31, 21, 32, 15, 33, 14, 34, 23, 35
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-2)/5)+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 - 2)/5] + 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(1,n,5); \\ Andrew Howroyd, Jul 07 2017
    
  • Python
    from sympy import divisors, floor
    def a(n): return int(n*max(int(floor((d - 2)/5) + 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

A289440 The arithmetic function v_3(n,5).

Original entry on oeis.org

1, 0, 2, 1, 3, 2, 4, 2, 5, 2, 6, 3, 7, 3, 8, 4, 9, 4, 10, 6, 11, 5, 12, 5, 13, 6, 14, 6, 15, 6, 16, 6, 17, 10, 18, 8, 19, 9, 20, 8, 21, 9, 22, 10, 23, 10, 24, 14, 25, 12, 26, 11, 27, 11, 28, 12, 29, 12, 30, 12, 31, 18, 32, 15, 33, 14, 34, 15, 35
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, 3))/5)+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, 3])/5] + 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(3,n,5); \\ Andrew Howroyd, Jul 07 2017
    
  • Python
    from sympy import divisors, floor, gcd
    def a(n): return n*max([(floor((d - 1 - gcd(d, 3))/5) + 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}]

A290636 The arithmetic function v_3(n,4).

Original entry on oeis.org

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

Views

Author

Robert Price, Aug 13 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

Cf. A211316 (equals v_1(n,3)).
Cf. A024698.

Programs

  • Maple
    f:= n -> max(map(t -> (floor((t - 1 - igcd(t, 3))/4) + 1)*n/t, numtheory:-divisors(n))):
    map(f, [$2..100]); # Robert Israel, Aug 16 2017
  • Mathematica
    v[g_, n_, h_] := (d = Divisors[n]; Max[(Floor[(d - 1 - GCD[d, g])/h] + 1)*n/d]); Table[v[3, n, 4], {n, 2, 70}]

Formula

For n >= 3, f(prime(n)) = A024698(n-1). - Robert Israel, Aug 16 2017

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
Showing 1-10 of 115 results. Next