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

A061195 Minimum positive numerator of s_1/1 + ... + s_n/n in lowest terms, where each s_i equals 1 or -1.

Original entry on oeis.org

1, 1, 1, 1, 7, 1, 11, 9, 11, 11, 23, 23, 607, 251, 59, 25, 97, 97, 2647, 2647, 1337, 457, 8917, 8917, 7951, 4261, 12439, 12439, 587971, 587971, 9687661, 13828799, 505163, 1554793, 1554793, 1554793, 1526171
Offset: 1

Views

Author

Greg Martin (gerg(AT)math.toronto.edu), Apr 19 2001

Keywords

Examples

			1/1 - 1/2 - 1/3 + 1/4 - 1/5 - 1/6 = 1/20, so a(6)=1.
		

Crossrefs

Cf. A061194.
Cf. A232090 (minimal possible denominator).

Programs

  • Mathematica
    nMax = 19; d = {0}; Table[d = Flatten[{d + 1/n, d - 1/n}]; Min[Abs[Numerator[d]]], {n, nMax}] (* T. D. Noe, Nov 19 2013 *)
  • PARI
    a(n) = {lcmn = 1;for (i=1, n, lcmn = lcm(i, lcmn)); minn = lcmn; for (i=0, 2^(n-1)-1, b = binary(i); while (#b != n, b = concat(0, b);); num = numerator(abs(sum(ii = 1, n, (-1)^b[ii]/ii))); minn = min(minn, num);); return(minn);} \\ Michel Marcus, Jun 15 2013

Extensions

More terms from Naohiro Nomoto, Jun 24 2001
a(22)-a(25) from Zak Seidov, Nov 20 2013
a(26)-a(33) from Zak Seidov, Nov 24 2013
a(34)-a(37) from Giovanni Resta, Jun 12 2016

A332399 Minimum positive value of p_1*...*p_n*(s_1/p_1 + ... + s_n/p_n), where each s_i equals 1 or -1 and p_i is the i-th prime number.

Original entry on oeis.org

1, 1, 1, 23, 43, 251, 263, 21013, 1407079, 4919311, 818778281, 2402234557, 379757743297, 3325743954311, 54237719914087, 903944329576111, 46919460458733911, 367421942920402841, 17148430651130576323, 1236225057834436760243, 4190310920096832376289, 535482916756698482410061
Offset: 1

Views

Author

Alessandro Gambini, Feb 11 2020

Keywords

Examples

			(2*3*5*7)*(1/2 - 1/3 - 1/5 + 1/7) = (210)*(23/210) = 23, so a(4) = 23.
		

Crossrefs

Cf. A061194 (with integers), A024530.

Programs

  • Mathematica
    a[n_] := Block[{p = Prime@ Range@ n}, Min@ Abs[{1/p}.Transpose@ Tuples[{-1, 1}, n]] Times @@ p]; Array[a, 16] (* Giovanni Resta, Feb 11 2020 *)
Showing 1-2 of 2 results.