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 41-50 of 69 results. Next

A250130 Numerator of the harmonic mean of the first n primes.

Original entry on oeis.org

2, 12, 90, 840, 11550, 180180, 3573570, 77597520, 2007835830, 64696932300, 2206165391430, 89048857617720, 3955253425853730, 183158658643380420, 9223346738827371150, 521426535635040715680, 32686925952621614864190, 2111190864469325477698860
Offset: 1

Views

Author

Colin Barker, Nov 13 2014

Keywords

Examples

			a(3) = 90 because the first 3 primes are [2,3,5] and 3 / (1/2+1/3+1/5) = 90/31.
The first fractions are 2/1, 12/5, 90/31, 840/247, 11550/2927, 180180/40361, 3573570/716167, 77597520/14117683, ...
		

Crossrefs

Cf. A024451 (denominators), A002110 (primorial numbers).

Programs

  • Maple
    N:= 100: # to get a(1) to a(N)
    B:= ListTools:-PartialSums([seq](1/ithprime(i),i=1..N)):
    seq(numer(n/B[n]), n=1..N); # Robert Israel, Nov 13 2014
  • Mathematica
    Table[n/Sum[1/Prime[k],{k,1,n}],{n,1,20}]//Numerator (* Vaclav Kotesovec, Nov 13 2014 *)
    Table[n*Product[Prime[j], {j, n}], {n, 17}] (* L. Edson Jeffery, Jan 04 2015 *)
  • PARI
    harmonicmean(v) = #v / sum(k=1, #v, 1/v[k])
    s=vector(30); p=primes(#s); for(k=1, #p, s[k]=numerator( harmonicmean( vector(k, i, p[i])))); s
    
  • PARI
    n=0; P=1; forprime(p=2, 100, n++; P *= p; print1(n*P, ", ")) \\ Jeppe Stig Nielsen, Aug 11 2019
    
  • Python
    from sympy import prime
    from fractions import Fraction
    def a(n):
      return (n/sum(Fraction(1, prime(k)) for k in range(1, n+1))).numerator
    print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Feb 12 2021

Formula

a(n) = n*A002110(n). - L. Edson Jeffery, Jan 04 2015

A354417 a(n) is the numerator of the sum of the reciprocals of the first n squarefree numbers.

Original entry on oeis.org

1, 3, 11, 61, 11, 82, 171, 1951, 26133, 13424, 41273, 716656, 13871719, 4700888, 9548741, 222854273, 112857219, 3310041496, 20075905417, 628822761157, 19239404599, 9709078632, 1959180271, 73097429088, 147378388979, 445594718515, 18404305970657, 3089336006908, 133763418792581
Offset: 1

Views

Author

Ilya Gutkovskiy, May 26 2022

Keywords

Examples

			1, 3/2, 11/6, 61/30, 11/5, 82/35, 171/70, 1951/770, 26133/10010, 13424/5005, 41273/15015, ...
		

Crossrefs

Programs

  • Maple
    s:= 0: R:= NULL: count:= 0:
    for x from 1 while count < 40 do
      if numtheory:-issqrfree(x) then
        s:= s + 1/x;
        v:= numer(s);
        R:= R, v;
        count:= count+1;
      fi;
    od:
    R; # Robert Israel, Mar 05 2023
  • Mathematica
    Accumulate[1/Select[Range[43], SquareFreeQ]] // Numerator
  • PARI
    a(n) = my(i=0, s=0); for(x=1, oo, if(core(x)==x, s+=1/x; i++; if(i==n, return(numerator(s))))) \\ Felix Fröhlich, May 26 2022

Formula

a(n)/A354418(n) ~ (6/Pi^2) * (log(n) + c) + O*(1.044/sqrt(n)), where f = O*(g) means |f| <= g and c = gamma + 2 * Sum_{p prime} log(p)/(p^2-1) = A001620 + 2 * A306016 = 1.71713765109059847340... (Ramaré, 2019; Alterman, 2022). - Amiram Eldar, Oct 29 2022

A369972 Numbers k such that (prime(k)#)' is a multiple of prime(1+k), where prime(k)# means the k-th primorial, A002110(k), and ' stands for taking the arithmetic derivative, A003415.

Original entry on oeis.org

0, 2, 7, 14, 21, 28, 261202
Offset: 1

Views

Author

Antti Karttunen, Feb 07 2024

Keywords

Comments

Numbers k for which A024451(k) is a multiple of A000040(1+k).

Examples

			7 is included because the primorial prime(7)# = A002110(7) = 510510 has as its arithmetic derivative 510510' = A024451(7) = 716167 = 19*37693, which is divisible by the next larger prime not present in the primorial, in this case by prime(8) = 19.
		

Crossrefs

Cf. A000040, A000720, A024451, A293457 (corresponding primes), A369970, A369973 (corresponding primorials).
Cf. also A109628.

Programs

Formula

a(n) = A000720(A293457(n)) - 1.

Extensions

Found a(7) by computing it as A000720(A293457(7))-1. - Antti Karttunen, Feb 08 2024

A369973 Primorials whose arithmetic derivative is divisible by the next larger prime not present in that primorial.

Original entry on oeis.org

1, 6, 510510, 13082761331670030, 40729680599249024150621323470, 2566376117594999414479597815340071648394470
Offset: 1

Views

Author

Antti Karttunen, Feb 07 2024

Keywords

Comments

Primorials A002110(k) such that A003415(A002110(k)) [= A024451(k)] is a multiple of A000040(1+k).
a(7) = A002110(261202), which is too large to include here, or even in a b-file.

Examples

			The zeroth primorial, 1 = A002110(0), is included, because its arithmetic derivative 1' = A024451(0) = 0 is divisible by the next larger prime not present in the primorial, in this case by prime(1) = 2.
The primorial 510510 = prime(7)# is included, because its arithmetic derivative 510510' = A024451(7) = 716167 = 19*37693 is divisible by the next larger prime not present in the primorial, in this case by prime(8) = 19.
		

Crossrefs

Cf. A000040, A002110, A003415, A024451, A293457 (the corresponding primes), A369972.
Subsequence of A369970.

Programs

Formula

a(n) = A002110(A369972(n)).

A370130 a(n) = A369669(A276086(n)), where A369669 is the greatest common divisor of the first and second arithmetic derivative of n, and A276086 is the primorial base exp-function.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 3, 1, 1, 16, 1, 5, 5, 5, 5, 5, 5, 100, 25, 25, 175, 25, 25, 1, 3, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 4, 17, 1, 1, 5, 5, 5, 5, 20, 5, 25, 25, 25, 25, 325, 25, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 11, 1, 4, 1, 1, 1, 1, 1, 5, 5, 320, 95, 5, 5, 25, 25, 25, 25, 100, 25, 7, 7, 112, 7, 7, 7, 7, 7, 7, 7, 28
Offset: 0

Views

Author

Antti Karttunen, Feb 10 2024

Keywords

Crossrefs

Programs

Formula

a(n) = A369669(A276086(n)).
a(n) = gcd(A327860(n), A370131(n)).
For n >= 1, a(n) = A085731(A327860(n)).

A074107 a(n) = Product of (prime + 1) for first n primes - primorial (n); Sum of proper divisors of the n-th primorial.

Original entry on oeis.org

0, 1, 6, 42, 366, 4602, 66738, 1231314, 25136790, 612982650, 18612572370, 602072009070, 23079296834790, 976751205195990, 43281303292150770, 2090585319354906990, 113506497027753468870, 6842978980142398176930, 426187457118982899608730, 29098035465450244144376910, 2102916875063497845451016610, 156173789584825539524342644530
Offset: 0

Views

Author

Amarnath Murthy, Aug 22 2002

Keywords

Examples

			a(3) = (2+1)*(3+1)*(5+1) - 2*3*5 = 72 - 30 = 42.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 25 do a[n] := product(ithprime(i)+1,i=1..n)-product(ithprime(i),i=1..n): od:seq(a[j],j=1..25);
  • Mathematica
    Module[{nn=20,p,pr,pr1},p=Prime[Range[nn]];pr=FoldList[Times,1,p];pr1= FoldList[Times,1,p+1];#[[2]]-#[[1]]&/@Rest[Thread[{pr,pr1}]]](* Harvey P. Dale, Feb 07 2015 *)
  • PARI
    A074107(n) = (prod(i=1,n,1+prime(i))-prod(i=1,n,prime(i))); \\ Antti Karttunen, Nov 19 2024

Formula

From Antti Karttunen, Nov 19 2024: (Start)
a(n) = A348507(A002110(n)) = A054640(n) - A002110(n) = A001065(A002110(n)).
a(n) >= A024451(n), because A348507(n) >= A003415(n).
For n >= 1, a(n) <= A070826(1+n) [= A002110(1+n)/2] < A051674(n).
(End)

Extensions

More terms from Sascha Kurz, Feb 01 2003
Term a(0)=0 prepended, data section further extended, and secondary definition added by Antti Karttunen, Nov 19 2024

A223037 a(n) = largest prime p such that Sum_{primes q = 2, ..., p} 1/q does not exceed n.

Original entry on oeis.org

3, 271, 5195969, 1801241230056600467
Offset: 1

Views

Author

Jonathan Sondow, Apr 16 2013

Keywords

Comments

Since Sum_{prime q} 1/q diverges, the sequence is infinite.
In fact, by the Prime Number Theorem Prime(k) ~ k log k as k -> infinity, and by integration Sum_{k <= n} 1/(k log k) ~ log log n, so a(n) ~ Prime(Floor(e^e^n)).
a(4) = A000040(A046024(4)-1) = Prime[43922730588128389], but Mathematica 7.0.0 cannot compute this prime on a Mac computer running OS X.
Instead, using a(4) = largest prime < A016088(4) = 1801241230056600523, Mathematica's PrimeQ function finds that a(4) = 1801241230056600467.
See A016088 for other relevant comments, references, links, and programs.

Examples

			a(1) = 3 because 1/2 + 1/3 < 1 < 1/2 + 1/3 + 1/5.
		

Crossrefs

Formula

a(n) = A000040(A046024(n)-1) = largest prime < A016088(n).
a(n) ~ Prime(Floor(e^e^n)) = A000040(A096232(n)) as n -> infinity.

A258566 Triangle in which n-th row contains all possible products of n-1 of the first n primes in descending order.

Original entry on oeis.org

1, 3, 2, 15, 10, 6, 105, 70, 42, 30, 1155, 770, 462, 330, 210, 15015, 10010, 6006, 4290, 2730, 2310, 255255, 170170, 102102, 72930, 46410, 39270, 30030, 4849845, 3233230, 1939938, 1385670, 881790, 746130, 570570, 510510
Offset: 1

Views

Author

Philippe Deléham, Jun 03 2015

Keywords

Comments

Triangle read by rows, truncated rows of the array in A185973.
Reversal of A077011.

Examples

			Triangle begins:
      1;
      3,     2;
     15,    10,    6;
    105,    70,   42,   30;
   1155,   770,  462,  330,  210;
  15015, 10010, 6006, 4290, 2730, 2310;
  ...
		

Crossrefs

Row sums: A024451.
T(n,1) = A070826(n).
T(n,n) = A002110(n-1).
For 2 <= n <= 9, T(n,2) = A118752(n-2). [corrected by Peter Munn, Jan 13 2018]
T(n,k) = A121281(n,k), but the latter has an extra column (0).

Programs

  • Maple
    T:= n-> (m-> seq(m/ithprime(j), j=1..n))(mul(ithprime(i), i=1..n)):
    seq(T(n), n=1..10);  # Alois P. Heinz, Jun 18 2015
  • Mathematica
    T[1, 1] = 1; T[n_, n_] := T[n, n] = Prime[n-1]*T[n-1, n-1];
    T[n_, k_] := T[n, k] = Prime[n]*T[n-1, k];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 26 2016 *)

Formula

T(1,1) = 1, T(n,k) = A000040(n)*T(n-1,k) for k < n, T(n,n) = A000040(n-1) * T(n-1,n-1).

A260615 Irregular triangle read by rows: the n-th row is the continued fraction expansion of the sum of the reciprocals of the first n primes.

Original entry on oeis.org

0, 2, 0, 1, 5, 1, 30, 1, 5, 1, 2, 12, 1, 3, 1, 2, 1, 9, 1, 1, 7, 1, 2, 1, 9, 1, 2, 1, 2, 12, 7, 1, 2, 2, 13, 1, 1, 1, 8, 13, 5, 4, 1, 2, 5, 8, 1, 2, 6, 1, 1, 4, 10, 1, 2, 3, 1, 3, 1, 2, 238, 1, 28, 1, 42, 2, 2, 7, 1, 1, 4, 1, 1, 1, 6, 1, 41, 3, 1, 1, 51, 1, 9, 2, 3, 2, 5, 1, 2, 1, 6, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 1, 2, 19, 1, 13, 1, 1, 3, 4, 7, 1, 1, 3, 2, 1, 10
Offset: 1

Views

Author

Matthew Campbell, Aug 29 2015

Keywords

Examples

			For row 3, the sum of the first three prime reciprocals equals 1/2 + 1/3 + 1/5 = 31/30. The continued fraction expansion of 31/30 is 1 + (1/30). Because of this, the terms in row 3 are 1 and 30.
From _Michael De Vlieger_, Aug 29 2015: (Start)
Triangle begins:
0,  2
0,  1,   5
1, 30
1,  5,   1,  2, 12
1,  3,   1,  2,  1,  9,  1,  1,  7
1,  2,   1,  9,  1,  2,  1,  2, 12,  7
1,  2,   2, 13,  1,  1,  1,  8, 13,  5,  4
1,  2,   5,  8,  1,  2,  6,  1,  1,  4, 10,  1,  2,  3,  1,  3
1,  2, 238,  1, 28,  1, 42,  2,  2,  7,  1,  1,  4
...
(End)
		

Crossrefs

Cf. A000040.
For the continued fractions of the harmonic numbers, see A100398.
For the numerator of the sum, see A024451.
For the denominator of the sum, see A002110.

Programs

  • Maple
    seq(op(numtheory:-cfrac(s,'quotients')),s=ListTools:-PartialSums(map2(`/`,1,[seq(ithprime(i),i=1..20)]))); # Robert Israel, Sep 06 2015
  • Mathematica
    Table[ContinuedFraction[Sum[1/Prime@k, {k, n}]], {n, 11}] // Flatten (* Michael De Vlieger, Aug 29 2015 *)
  • PARI
    row(n) = contfrac(sum(k=1, n, 1/prime(k)));
    tabf(nn) = for(n=1, nn, print(row(n))); \\ Michel Marcus, Sep 18 2015

A293457 Primes that divide the numerator of the sum of the reciprocals of all smaller primes.

Original entry on oeis.org

2, 5, 19, 47, 79, 109, 3667387
Offset: 1

Views

Author

Logan J. Kleinwaks, Oct 09 2017

Keywords

Comments

Exhaustive search finds no more terms among the first 10^7 primes.
Primes p that divide A024451(A000720(p)-1). - Antti Karttunen, Feb 08 2024

Examples

			Since 1/2 + 1/3 + 1/5 + 1/7 + 1/11 + 1/13 + 1/17 = 716167/510510 and 19 divides 716167, 19 is in the sequence.
Since there are no primes less than 2, the sum of their reciprocals is 0/1, and as 2 divides 0, it is therefore included as the first term of this sequence. - _Antti Karttunen_, Feb 08 2024
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(s = 0); forprime(p=2, nn, if (!(numerator(s) % p), print1(p, ", ")); s += 1/p; ); \\ Michel Marcus, Oct 09 2017, edited for the new, more inclusive definition by Antti Karttunen, Feb 08 2024

Formula

a(n) = A000040(1+A369972(n)). - Antti Karttunen, Feb 08 2024

Extensions

Relaxed the definition to include 2 as the first term - Antti Karttunen, Feb 08 2024
Previous Showing 41-50 of 69 results. Next