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.

Previous Showing 11-20 of 25 results. Next

A075226 Largest prime in the numerator of the 2^n sums generated from the set 1, 1/2, 1/3,..., 1/n.

Original entry on oeis.org

3, 11, 19, 137, 137, 1019, 2143, 7129, 7129, 78167, 81401, 1085933, 1111673, 1165727, 2364487, 41325407, 41325407, 796326437, 809074601, 812400209, 822981689, 19174119571, 19652175721, 99554817251, 100483070801
Offset: 2

Views

Author

T. D. Noe, Sep 08 2002

Keywords

Comments

For the smallest odd prime not generated, see A075227. For information about how often the numerator of these sums is prime, see A075188 and A075189. The Mathematica program also prints the subset that yields the largest prime. For n <=20, the largest prime occurs in a sum of n-2, n-1, or n reciprocals.

Examples

			a(3) =11 because 11 is largest prime numerator in the three sums that yield primes: 1+1/2 = 3/2, 1/2+1/3 = 5/6 and 1+1/2+1/3 = 11/6.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio (numerator)
    a075226 n = a075226_list !! (n-1)
    a075226_list = f 2 [recip 1] where
       f x hs = (maximum $ filter ((== 1) . a010051') (map numerator hs')) :
                f (x + 1) hs' where hs' = hs ++ map (+ recip x) hs
    -- Reinhard Zumkeller, May 28 2013
    
  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; maxN=20; For[t={}; lst={}; mx=0; i=0; n=2, n<=maxN, n++, While[i<2^n-1, i++; s=NthSubset[i, Range[n]]; k=Numerator[Plus@@(1/s)]; If[PrimeQ[k], If[k>mx, t=s]; mx=Max[mx, k]]]; Print[n, " ", t]; AppendTo[lst, mx]]; lst
    Table[Max[Select[Numerator[Total/@Subsets[1/Range[n],{2,2^n}]],PrimeQ]],{n,2,30}] (* The program will take a long time to run. *) (* Harvey P. Dale, Jan 08 2019 *)
  • PARI
    See Fuller link.
    
  • Python
    from math import gcd, lcm
    from itertools import combinations
    from sympy import isprime
    def A075226(n):
        m = lcm(*range(1,n+1))
        c, mlist = 0, tuple(m//i for i in range(1,n+1))
        for l in range(n,-1,-1):
            if sum(mlist[:l]) < c:
                break
            for p in combinations(mlist,l):
                s = sum(p)
                s //= gcd(s,m)
                if s > c and isprime(s):
                    c = s
        return c # Chai Wah Wu, Feb 14 2022

Extensions

More terms from Martin Fuller, Jan 19 2008

A075227 Smallest odd prime not occurring in the numerator of any of the 2^n subset sums generated from the set 1/1, 1/2, 1/3, ..., 1/n.

Original entry on oeis.org

3, 5, 7, 17, 37, 43, 43, 151, 151, 409, 491, 491, 491, 1087, 2011, 3709, 3709, 7417, 7417, 7417, 19699, 30139, 35573, 35573, 40237, 40237, 132151, 132151, 158551, 158551, 245639, 245639, 961459, 1674769, 1674769, 1674769, 1674769, 4339207
Offset: 1

Views

Author

T. D. Noe, Sep 08 2002

Keywords

Comments

The largest prime generated is given in A075226. For information about how often the numerator of these sums is prime, see A075188 and A075189.

Examples

			a(3) = 7 because 7 is the smallest prime not occurring in the numerator of any of the sums 1/1 + 1/2 = 3/2, 1/1 + 1/3 = 4/3, 1/2 + 1/3 = 5/6 and 1/1 + 1/2 + 1/3 = 11/6.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    import Data.Set (Set, empty, fromList, toList, union)
    a075227 n = a075227_list !! (n-1)
    a075227_list = f 1 empty a065091_list where
       f x s ps = head qs : f (x + 1) (s `union` fromList hs) qs where
         qs = foldl (flip del)
              ps $ filter ((== 1) . a010051') $ map numerator hs
         hs = map (+ 1 % x) $ 0 : toList s
       del u vs'@(v:vs) = case compare u v
                          of LT -> vs'; EQ -> vs; GT -> v : del u vs
    -- Reinhard Zumkeller, May 28 2013
    
  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; maxN=20; For[lst={}; prms={}; i=0; n=1, n<=maxN, n++, While[i<2^n-1, i++; s=NthSubset[i, Range[n]]; k=Numerator[Plus@@(1/s)]; If[PrimeQ[k], AppendTo[prms, k]]]; prms=Union[prms]; j=2; While[MemberQ[prms, Prime[j]], j++ ]; AppendTo[lst, Prime[j]]]; lst
    (* Second program; does not need Combinatorica *)
    a[1] = 3; a[2] = 5; a[n_] := For[nums = (Total /@ Subsets[1/Range[n]]) // Numerator // Union // Select[#, PrimeQ]&; p = 3, p <= Last[nums], p = NextPrime[p], If[FreeQ[nums, p], Print[n, " ", p]; Return[p]]];
    Table[a[n], {n, 1, 23}] (* Jean-François Alcover, Sep 10 2017 *)
  • Python
    from sympy import sieve
    from fractions import Fraction
    fracs, newnums, primeset = {0}, {0}, set(sieve.primerange(3, 10**6+1))
    for n in range(1, 24):
      newfracs = set(Fraction(1, n) + f for f in fracs)
      fracs |= newfracs
      primeset -= set(f.numerator for f in newfracs)
      print(min(primeset), end=", ") # Michael S. Branicky, May 09 2021

Extensions

a(21)-a(28) from Reinhard Zumkeller, May 28 2013
a(29)-a(33) from Jon E. Schoenfield, May 09 2021
a(34)-a(36) from Michael S. Branicky, May 10 2021
a(37)-a(38) from Michael S. Branicky, May 12 2021

A051540 Least common multiple of {2, 5, 8, 11, 14, ..., 3n+2} (A016789).

Original entry on oeis.org

2, 10, 40, 440, 3080, 52360, 52360, 1204280, 15655640, 454013560, 1816054240, 1816054240, 34505030560, 1414706252960, 1414706252960, 66491193889120, 332455969445600, 17620166380616800, 17620166380616800
Offset: 0

Views

Author

Keywords

Comments

Denominator of H(n,3,2), a generalized harmonic number. See A075135.

Examples

			a(3) = lcm{2, 5, 8, 11} = 440.
		

Crossrefs

Cf. A016789, A051552. The numerators are in A074597.
Cf. A075135.
Cf. A051536.

Programs

  • GAP
    List([0..20],n->Lcm(List([0..n],k->3*k+2))); # Muniru A Asiru, Apr 14 2018
  • Magma
    k:=56; [Lcm([h: h in [2..j by 3]]): j in [2..k by 3]];  // Bruno Berselli, May 03 2011
    
  • Maple
    A[0]:= 2:
    for n from 1 to 60 do A[n]:= ilcm(A[n-1],3*n+2) od:
    seq(A[n],n=0..60); # Robert Israel, Apr 10 2018
  • Mathematica
    Table[ Denominator[ Sum[1/i, {i, 2/3, n}]], {n, 1, 20}]
    Table[ Apply[ LCM, Join[{1}, Table[2 + 3i, {i, 0, n}]]], {n, 0, 19}]
  • PARI
    a(n) = lcm(vector(n+1, k, 3*k-1)); \\ Michel Marcus, Apr 10 2018
    

Extensions

Edited by Robert G. Wilson v, Aug 27 2002
Offset corrected by Robert Israel, Apr 10 2018

A075136 Numerator of the generalized harmonic number H(n,4,1).

Original entry on oeis.org

1, 6, 59, 812, 14389, 104038, 534113, 15837352, 177575597, 6681333014, 278042982799, 93928709068, 665521987201, 35665695484178, 684591747070657, 42155877944972752, 42527303541794647, 986175536059084606
Offset: 1

Views

Author

T. D. Noe, Sep 04 2002

Keywords

Comments

The denominators are in A051539. See A075135 for more details.
Numerators of the partial sums of the divergent series 1/3 + 1/7 + 1/11 + . . 1/(4n-1).

Crossrefs

Programs

  • Mathematica
    a=4; b=1; maxN=20; s=0; Numerator[Table[s+=1/(a n + b), {n, 0, maxN-1}]]
    Numerator[Accumulate[1/Range[1,69,4]]] (* Harvey P. Dale, Dec 15 2014 *)
  • PARI
    sumrecip(n,a,b) = { s=0; default(realprecision,n); forstep(j=b,n,a, s=s+1/j; print1(numerator(s)",") ) }

Formula

Sum 1/a(n) = 1.111939597509272224249... - Cino Hilliard, Dec 21 2003

A074638 Denominator of 1/3 + 1/7 + 1/11 + ... + 1/(4n-1).

Original entry on oeis.org

3, 21, 231, 385, 7315, 168245, 4542615, 140821065, 28164213, 366134769, 15743795067, 739958368149, 12579292258533, 62896461292665, 3710891216267235, 3710891216267235, 248629711489904745, 17652709515783236895, 88263547578916184475, 6972820258734378573525
Offset: 1

Views

Author

Robert G. Wilson v, Aug 27 2002

Keywords

Comments

This s(n) := Sum_{j=0..n-1} 1/(4*j + 3), for n >= 1, equals (Psi(n + 3/4) - Psi(3/4))/4, with the digamma function Psi(z). See Abramowitz-Stegun, p. 258, eqs. 6.3.7 and 6.3.5, with z -> 3/4. A200134 = -Psi(3/4). - Wolfdieter Lang, Apr 06 2022

Crossrefs

The numerators times 4 are A074637.

Programs

  • Mathematica
    Table[ Denominator[ Sum[1/i, {i, 3/4, n}]], {n, 1, 20}]
  • PARI
    a(n) = denominator(sum(i=1, n, 1/(4*i-1))); \\ Michel Marcus, Mar 21 2021
  • Python
    from fractions import Fraction
    def a(n): return sum(Fraction(1, 4*i-1) for i in range(1, n+1)).denominator
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Mar 21 2021
    

Formula

Denominator( (Psi(n + 3/4) - Psi(3/4))/4 ). See the comment above. - Wolfdieter Lang, Apr 05 2022

A074637 Numerator of 4 * H(n,4,3), a generalized harmonic number.

Original entry on oeis.org

4, 40, 524, 976, 20084, 491192, 13935164, 450160544, 93250876, 1249813672, 55206526972, 2657681947952, 46167204272716, 235410309457592, 14140794103168588, 14376406243883968, 978062783205294796
Offset: 1

Views

Author

Robert G. Wilson v, Aug 27 2002

Keywords

Crossrefs

The denominators are in A074638.
Cf. A075135.

Programs

  • Mathematica
    Table[ Numerator[ Sum[1/i, {i, 3/4, n}]], {n, 1, 20}]

Formula

a(n) = numerator(4 * Sum_{j=0..n-1} 1/(4*j + 3)) = numerator(Psi(n + 3/4) - Psi(3/4)), with the Digamma function Psi(z). See a comment in A074638 with the Abramowitz-Stegun link. - Wolfdieter Lang, Apr 05 2022

Extensions

Better description from T. D. Noe, Sep 04 2002

A075137 Numerator of the generalized harmonic number H(n,5,1).

Original entry on oeis.org

1, 7, 83, 697, 1685, 22521, 714167, 6551627, 273085171, 6372562445, 109738148749, 111017326363, 6843690854527, 6909897986791, 494972427791585, 9482037783487391, 85993305141830183, 3724238207261666261
Offset: 1

Views

Author

T. D. Noe, Sep 04 2002

Keywords

Comments

The denominators are in A075138. See A075135 for more details.

Crossrefs

Programs

  • Mathematica
    a=5; b=1; maxN=20; s=0; Numerator[Table[s+=1/(a n + b), {n, 0, maxN-1}]]

A075144 Denominator of the generalized harmonic number H(n,5,4).

Original entry on oeis.org

4, 36, 252, 4788, 9576, 277704, 4720968, 61372584, 675098424, 4725688968, 14177066904, 836446947336, 6691575578688, 153906238309824, 5694530817463488, 449867934579615552, 449867934579615552
Offset: 1

Views

Author

T. D. Noe, Sep 04 2002

Keywords

Comments

The numerators are in A075143. See A075135 for more details.

Crossrefs

Programs

  • Mathematica
    a=5; b=4; maxN=20; s=0; Denominator[Table[s+=1/(a n + b), {n, 0, maxN-1}]]

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

Views

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]

A075138 Denominator of the generalized harmonic number H(n,5,1).

Original entry on oeis.org

1, 6, 66, 528, 1232, 16016, 496496, 4468464, 183207024, 4213761552, 71633946384, 71633946384, 4369670729424, 4369670729424, 310246621789104, 5894685813992976, 53052172325936784, 2281243410015281712
Offset: 1

Views

Author

T. D. Noe, Sep 04 2002

Keywords

Comments

The numerators are in A075137. See A075135 for more details.

Crossrefs

Programs

  • Mathematica
    a=5; b=1; maxN=20; s=0; Denominator[Table[s+=1/(a n + b), {n, 0, maxN-1}]]
Previous Showing 11-20 of 25 results. Next