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

A309391 a(n) = gcd(n, A064169(n-2)) for n > 2.

Original entry on oeis.org

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

Views

Author

Amiram Eldar and Thomas Ordowski, Jul 28 2019

Keywords

Comments

Probably, there are no composite terms in this sequence.
For n > 2, a(n) = gcd(n, A001008(n-1)).
By Wolstenholme's theorem, if p is an odd prime, then a(p) = p.
Conjecture: for n > 2, if a(n) = n, then n is a prime.
If so, then there are no pseudoprimes n such that a(n) = n.
Composite numbers m <> p^2 for which a(m) > 1 are 88, 1290, 9339, ...

Examples

			a(25) = gcd(25, A064169(25-2)) = gcd(25, 325333835) = 5,
a(25) = gcd(25, A001008(25-1)) = gcd(25, 1347822955) = 5.
It should be noted that a(88) = 11, a(1290) = 43, a(9339) = 11, ...
		

Crossrefs

Cf. A001008, A002805, A007406 (see our comment), A064169, A065091, A089026, A309397.

Programs

  • Magma
    [Gcd(k, Numerator(a)-Denominator(a)) where a is HarmonicNumber(k-2):k in [3..90]]; // Marius A. Burtea, Jul 29 2019
  • Maple
    H:= 0:
    for n from 3 to 100 do
      H:= H + 1/(n-2);
      A[n]:= igcd(n, numer(H)-denom(H));
    od:
    seq(A[i],i=3..100); # Robert Israel, Aug 04 2019
  • Mathematica
    a[n_] := GCD[n, Numerator[(h = HarmonicNumber[n-2])] - Denominator[h]]; Array[a, 81, 3]

Formula

a(p) = p for every odd prime p.
a(p^2) = p iff p > 3 is a prime.
Note that a(n) >= A089026(n) for n > 2.

A064404 When the numerator - denominator (A064169) in n-th harmonic number is prime.

Original entry on oeis.org

3, 4, 6, 7, 10, 19, 20, 26, 30, 31, 33, 40, 63, 85, 92, 100, 126, 131, 185, 196, 200, 204, 242, 246, 272, 274, 282, 379, 553, 572, 654, 777, 902, 1100, 1216, 1225, 1236, 1316, 1413, 1658, 1943, 2077, 2086, 2744, 2746, 2856, 2860, 3518, 3718, 4184, 4189, 4363
Offset: 1

Views

Author

Robert G. Wilson v, Sep 28 2001

Keywords

Crossrefs

Cf. A064169.

Programs

  • Mathematica
    s = 1; Do[ m = n; s = s + 1/n; If[ PrimeQ[ Numerator[ s ] - Denominator[ s ] ], Print[ n ] ], {n, 2, 2500} ]
    hnoQ[n_]:=Module[{h=HarmonicNumber[n]},PrimeQ[Numerator[h]-Denominator[ h]]]; Select[Range[5000],hnoQ]  (* Harvey P. Dale, May 23 2012 *)
  • PARI
    for(n=2, 300, if(isprime(lcm(n!, sum(k=2, n, 1/k))/n!), print1(n, ", "))); \\ Arkadiusz Wesolowski, Oct 13 2011

Extensions

More terms from Arkadiusz Wesolowski, Oct 13 2011

A074791 Numbers k such that k does not divide the denominator of the k-th harmonic number.

Original entry on oeis.org

6, 18, 20, 21, 33, 42, 54, 63, 66, 77, 100, 110, 120, 156, 162, 189, 198, 272, 294, 336, 342, 363, 377, 435, 486, 500, 506, 559, 567, 594, 600, 610, 629, 685, 703, 812, 847, 880, 924, 930, 957, 1067, 1166, 1210, 1243, 1247, 1287, 1320, 1332, 1458, 1590, 1640
Offset: 1

Views

Author

Benoit Cloitre, Sep 07 2002

Keywords

Comments

k such that A064169(k) is different from A027612(k).
Also k such that A096617(k) is different from A001008(k). - Alexander Adamchuk, Jun 26 2006
This sequence contains A036689(k) for all k > 1. - Wouter van Doorn, Nov 06 2024

Crossrefs

Programs

  • Mathematica
    Select[ Range[1700], Mod[ Denominator[ HarmonicNumber[ # ]], # ] != 0 &] (* Robert G. Wilson v, Sep 28 2005 *)
    seq = {}; s = 0; Do[s += 1/n; If[! Divisible[Denominator[s], n], AppendTo[seq, n]], {n, 1, 2000}]; seq (* Amiram Eldar, Dec 01 2020 *)

Formula

Is a(n) asymptotic to c*n^2 0.5
a(n) < 2*n^2*log(n)^2 for all n > 2. This follows from the fact that for all k > 1 there exists an n such that A036689(k) is equal to A074791(n). - Wouter van Doorn, Nov 06 2024

Extensions

Better description and more terms from Robert G. Wilson v, Sep 28 2005

A330719 a(n) = denominator(Sum_{k=1..n} (2^(k-1) - 1)/k).

Original entry on oeis.org

1, 2, 2, 4, 4, 12, 12, 24, 8, 40, 40, 120, 120, 840, 840, 1680, 1680, 5040, 5040, 5040, 5040, 55440, 55440, 55440, 11088, 144144, 48048, 48048, 48048, 80080, 80080, 160160, 160160, 2722720, 544544, 4900896, 4900896, 93117024, 93117024, 465585120, 465585120, 465585120
Offset: 1

Author

Amiram Eldar and Thomas Ordowski, Dec 28 2019

Keywords

Comments

Conjecture: if p is an odd prime, then p | A330718(p+1) - a(p+1).
Below 10^6 there is only one pseudoprime, namely 25. Are there others?
Primes p such that p^2 | A330718(p+1) - a(p+1) are 3, 5, 45827, ...

Examples

			Denominators of 0, 1/2, 3/2, 13/4, 25/4, 137/12, 245/12, ...
		

Programs

  • Magma
    [Denominator( &+[(2^(k-1)-1)/k: k in [1..n]] ): n in [1..45]]; // G. C. Greubel, Dec 28 2019
    
  • Maple
    seq(denom(add((2^(k-1)-1)/k, k = 1..n)), n = 1..45); # G. C. Greubel, Dec 28 2019
  • Mathematica
    Denominator@Accumulate@Array[(2^(#-1) -1)/# &, 45]
    Table[Denominator[-(2^n*LerchPhi[2, 1, n+1] +Pi*I/2 +HarmonicNumber[n])], {n, 45}] (* G. C. Greubel, Dec 28 2019 *)
  • PARI
    a(n) = denominator(sum(k=1, n, (2^(k-1)-1)/k)); \\ Michel Marcus, Dec 28 2019
    
  • Sage
    [denominator( sum((2^(k-1)-1)/k for k in (1..n)) ) for n in (1..45)] # G. C. Greubel, Dec 28 2019

Formula

a(n) = denominator(-(2^n*LerchPhi(2,1,n+1) + Pi*i/2 + HarmonicNumber(n))). - G. C. Greubel, Dec 28 2019
a(n) = denominator(A279683(n)/n!) for n > 0. - Amiram Eldar and Thomas Ordowski, Jan 15 2020
A000265(a(n)) = A290348(n). - Thomas Ordowski, Mar 29 2025

A001901 Successive numerators of Wallis's approximation to Pi/2 (reduced).

Original entry on oeis.org

1, 2, 4, 16, 64, 128, 256, 2048, 16384, 32768, 65536, 262144, 1048576, 2097152, 4194304, 67108864, 1073741824, 2147483648, 4294967296, 17179869184, 68719476736, 137438953472, 274877906944, 2199023255552
Offset: 0

Keywords

Comments

If p is prime, then a(p-2) == - A001902(p-2) (mod p). Cf. A064169 (third comment) and my formula here. Such pseudoprimes are 1467, 7831, ... Primes p such that a(p-2) == - A001902(p-2) (mod p^2) are 5, 45827, ... Cf. A355959, see also A330719 (third comment). - Thomas Ordowski, Oct 19 2024

Examples

			From _Wolfdieter Lang_, Dec 07 2017: (Start)
The Wallis numerators (N) and denominators (D) with partial products A(n) = A001900(n) and B(n) = A000246(n+1) in unreduced form, and a(n) and b(n) = A001902(n) in reduced form.
n, k:     0  1  2  3  4   5    6     7      8        9       10 ...
N(k):     1  2  2  4  4   6    6     8      8       10       10 ...
D(k):     1  1  3  3  5   5    7     7      9        9        9 ...
A(n):     1  2  4 16 64 384 2304 18432 147456  1474560 14745600 ...
B(n):     1  1  3  9 45 225 1575 11025  99225   893025  9823275 ...
a(n):     1  2  4 16 64 128  256  2048  16384    32768    65536 ...
b(n):     1  1  3  9 45  75  175  1225  11025    19845    43659 ...
n = 5: numerator(1*2*2*4*4*6/(1*1*3*3*5*5)) = numerator(384/225) = numerator(128/75) = 128. (End)
		

References

  • H.-D. Ebbinghaus et al., Numbers, Springer, 1990, p. 146.

Crossrefs

Denominators are A001902. Subsequence of A000079.

Programs

  • Mathematica
    a[n_?EvenQ] := n!!^2/((n - 1)!!^2*(n + 1)); a[n_?OddQ] := ((n - 1)!!^2*(n + 1))/n!!^2; Table[a[n] // Numerator, {n, 0, 23}] (* Jean-François Alcover, Jun 19 2013 *)

Formula

(2*2*4*4*6*6*8*8*...*2n*2n*...)/(1*3*3*5*5*7*7*9*...*(2n-1)*(2n+1)*...) for n >= 1.
From Wolfdieter Lang, Dec 07 2017: (Start)
1/1 * 2/1 * 2/3 * 4/3 * 4/5 * 6/5 * 6/7 * ...; partial products (reduced). Here the numerators with offset 0.
a(n) = numerator(W(n)), for n >= 0, with W(n) = Product_{k=0..n} N(k)/D(k) (reduced), with N(k) = 2*floor((k+1)/2) for k >= 1 and N(0) = 1, and D(k) = 2*floor(k/2) + 1, for k >= 0. (End)
a(n) is the numerator of the continued fraction [1;1,1/2,1/3,...,1/n]. - Thomas Ordowski, Oct 19 2024

A119947 Triangle of numerators in the square of the matrix A[i,j] = 1/i for j <= i, 0 otherwise.

Original entry on oeis.org

1, 3, 1, 11, 5, 1, 25, 13, 7, 1, 137, 77, 47, 9, 1, 49, 29, 19, 37, 11, 1, 363, 223, 153, 319, 107, 13, 1, 761, 481, 341, 743, 533, 73, 15, 1, 7129, 4609, 3349, 2509, 1879, 275, 191, 17, 1, 7381, 4861, 3601, 2761, 2131, 1627, 1207, 121, 19, 1, 83711, 55991, 42131, 32891, 25961
Offset: 1

Author

Wolfdieter Lang, Jul 20 2006

Keywords

Comments

The triangle of the corresponding denominators is A119948. The rationals appear in lowest terms (while in A027446 they are row-wise on the least common denominator).
The triangle with row number i multiplied with the least common multiple (LCM) of its denominators yields A027446.
First column is A001008. - Tilman Neumann, Oct 01 2008
Column 2 is A064169. - Clark Kimberling, Aug 13 2012
Third diagonal (11, 13, 47, ...) is A188386. - Clark Kimberling, Aug 13 2012

Examples

			The rationals are [1]; [3/4, 1/4]; [11/18, 5/18, 1/9]; [25/48, 13/48, 7/48, 1/16]; ... See the W. Lang link for more.
From _Clark Kimberling_, Aug 13 2012: (Start)
As a triangle given by f(n,m) = Sum_{h=m..n} 1/h, the first six rows are:
    1
    3    1
   11    5    1
   25   13    7    1
  137   77   47    9    1
   49   29   19   37   11    1
  363  223  153  319  107   13    1
(End)
		

Crossrefs

Cf. A002024: i appears i times (denominators in row i of the matrix A).
Row sums give A119949. Row sums of the triangle of rationals always give 1.
For the cube of this matrix see the rational triangle A119935/A119932 and A027447; see A027448 for the fourth power.

Programs

  • Mathematica
    f[n_, m_] := Numerator[Sum[1/k, {k, m, n}]]
    Flatten[Table[f[n, m], {n, 1, 10}, {m, 1, n}]]
    TableForm[Table[f[n, m], {n, 1, 10}, {m, 1, n}]] (* Clark Kimberling, Aug 13 2012 *)
  • PARI
    A119947_upto(n)={my(M=matrix(n,n,i,j,(j<=i)/i)^2);vector(n,r,apply(numerator,M[r,1..r]))} \\ M. F. Hasler, Nov 05 2019

Formula

a(i,j) = numerator(r(i,j)) with r(i,j):=(A^2)[i,j], where the matrix A has elements a[i,j] = 1/i if j<=i, 0 if j>i, (lower triangular).

Extensions

Edited by M. F. Hasler, Nov 05 2019

A064168 Sum of numerator and denominator in n-th harmonic number, 1 + 1/2 + 1/3 +...+ 1/n.

Original entry on oeis.org

2, 5, 17, 37, 197, 69, 503, 1041, 9649, 9901, 111431, 113741, 1506353, 1532093, 1556117, 3157279, 54394463, 18358381, 352893319, 71354639, 24031221, 24266365, 563299563, 1704771547, 42976237267, 43319457067, 392849685203, 395718022103, 11556136074187
Offset: 1

Author

Leroy Quet, Sep 19 2001

Keywords

Comments

Numerator and denominator in definition have no common factors >1.

Examples

			The 3rd harmonic number is 11/6. So a(3) = 11 + 6 = 17.
		

Crossrefs

Programs

  • Maple
    h:= n-> numer(sum(1/k,k=1..n))+denom(sum(1/k,k=1..n)): seq(h(n),n=1..30);  # Emeric Deutsch, Nov 18 2004
  • Mathematica
    Numerator[#]+Denominator[#]&/@HarmonicNumber[Range[30]] (* Harvey P. Dale, Jul 04 2017 *)
  • PARI
    a(n) = my(h=sum(k=1, n, 1/k)); numerator(h) + denominator(h); \\ Michel Marcus, Sep 07 2019

Extensions

More terms from Emeric Deutsch, Nov 18 2004

A064167 Product of numerator and denominator of the n-th harmonic number, 1 + 1/2 + 1/3 +...+ 1/n.

Original entry on oeis.org

1, 6, 66, 300, 8220, 980, 50820, 213080, 17965080, 18600120, 2320468920, 2384502120, 412970037480, 422245703880, 430902992520, 1756076802480, 516336630329520, 58297387228080, 21362271268818480, 866533600973040, 97555876321904, 98772315738096, 52866073370045936, 481103506052529360
Offset: 1

Author

Leroy Quet, Sep 19 2001

Keywords

Comments

Numerator and denominator in definition have no common divisors >1.

Examples

			The 3rd harmonic number is 11/6. So a(3) = 11 * 6 = 66.
		

Crossrefs

Programs

  • Mathematica
    Numerator[#]Denominator[#]&/@HarmonicNumber[Range[30]] (* Harvey P. Dale, May 01 2022 *)
  • PARI
    a(n) = my(h=sum(k=1, n, 1/k)); numerator(h) * denominator(h); \\ Michel Marcus, Sep 07 2019

Extensions

More terms from Michel Marcus, Sep 07 2019

A104174 Numerator of the fractional part of a harmonic number.

Original entry on oeis.org

0, 1, 5, 1, 17, 9, 83, 201, 2089, 2341, 551, 2861, 64913, 90653, 114677, 274399, 5385503, 2022061, 42503239, 9276623, 3338549, 3573693, 87368107, 276977179, 7281378067, 7624597867, 71595952403, 74464289303, 2239777822987
Offset: 1

Author

Georg Haass (geha5001(AT)stud.uni-saarland.de), Mar 10 2005

Keywords

Crossrefs

Programs

  • Mathematica
    h[n_] := Sum[1/k, {k, 1, n}]
    Table[Numerator[FractionalPart[h[n]]], {n, 1, 30}]
    (* Clark Kimberling, Aug 13 2012 *)
    FractionalPart[HarmonicNumber[Range[30]]]//Numerator (* Harvey P. Dale, Jul 28 2019 *)
  • PARI
    a(n) = numerator(frac(sum(k=1, n, 1/k))); \\ Michel Marcus, Sep 27 2021
  • Python
    from sympy import harmonic
    def A104174(n): return (lambda x: x.p % x.q)(harmonic(n)) # Chai Wah Wu, Sep 26 2021
    

Formula

a(n) = numerator(frac(Sum_{k=1..n} 1/k)). [edited by Michel Marcus, Sep 27 2021]

A358464 a(n) is the greatest m such that Sum_{k = 1..m} 1/(1 + n*k) <= 1.

Original entry on oeis.org

2, 6, 16, 42, 110, 288, 761, 2020, 5388, 14417, 38681, 103994, 280032, 755031, 2037848, 5504884, 14880978, 40250609, 108926101, 294902398, 798703663, 2163878141
Offset: 1

Author

Thomas Scheuerle, Nov 18 2022

Keywords

Comments

This sequence coincidences with 2*Fibonacci(2*n) (A025169) for the first 6 terms.

Examples

			a(2) = 6 because Sum_{m = 1..a(2)} 1/(1+2*m) = 43024/45045 < 1, but Sum_{m = 1..a(2)+1} 1/(1+2*m) = 46027/45045 > 1.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(k = 2*fibonacci(2*n)-1);my(b = (psi(k+(1/n))-psi(1+(1/n)))/n); until(b > 1, b = b+(1/(1+n*k)); k=k+1 );k-2}

Formula

ceiling(digamma(a(n)+(1/n)+1) - digamma((1/n)+1)) = n.
Integral_{x=0..oo} Product_{k=0..m} sinc(x/(n*k+1)) dx = Pi for 0 <= m <= a(n). See links Schmid and Borwein.
ceiling(Sum_{m = 0..oo} ( 1/(m+1) * Sum_{k = 0..m} (-1)^k*binomial(m, k)*log( (a(n)+(1/n)+1+k) / ((1/n)+1+k) ) )) = n.
a(n) ~ floor(exp(n + digamma(1+(1/n))) - (1/2) - (1/n)). This appears to be accurate for at least n < 22.
Showing 1-10 of 11 results. Next