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

A024451 a(n) is the numerator of Sum_{i = 1..n} 1/prime(i).

Original entry on oeis.org

0, 1, 5, 31, 247, 2927, 40361, 716167, 14117683, 334406399, 9920878441, 314016924901, 11819186711467, 492007393304957, 21460568175640361, 1021729465586766997, 54766551458687142251, 3263815694539731437539, 201015517717077830328949, 13585328068403621603022853
Offset: 0

Views

Author

Keywords

Comments

Arithmetic derivative of p#: a(n) = A003415(A002110(n)). - Reinhard Zumkeller, Feb 25 2002
(n-1)-st elementary symmetric functions of first n primes; see Mathematica section. - Clark Kimberling, Dec 29 2011
Denominators of the harmonic mean of the first n primes; A250130 gives the numerators. - Colin Barker, Nov 14 2014
Let Pn(n) = A002110 denote the primorial function. The average number of distinct prime factors <= prime(n) in the natural numbers up to Pn(n) is equal to Sum_{i = 1..n} 1/prime(i). - Jamie Morken, Sep 17 2018
Conjecture: All terms are squarefree numbers. - Nicolas Bělohoubek, Apr 13 2022
The above conjecture would imply that for n > 0, gcd(a(n), A369651(n)) = 1. See corollary 2 on the page 4 of Ufnarovski-Åhlander paper. - Antti Karttunen, Jan 31 2024
Apart from the initial 0, a subsequence of A048103. Proof: For all primes p, when i >= A000720(p), neither p itself nor p^p divides a(i) [implied by Henry Bottomley's Sep 27 2006 formula], but neither does p^p divide a(i) when 0 < i < A000720(p), as then p^p > a(i). See A074107, which gives an upper bound for this sequence. - Antti Karttunen, Nov 19 2024

Examples

			0/1, 1/2, 5/6, 31/30, 247/210, 2927/2310, 40361/30030, 716167/510510, 14117683/9699690, ...
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Sect. 2.2.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Sect. VII.28.

Crossrefs

Denominators are A002110.
Row sums of A077011 and A258566.
Subsequence of A048103 (after the initial 0).
Cf. A053144 (a lower bound), A074107 (an upper bound).
Cf. A109628 (indices k where a(k) is prime), A244622 (corresponding primes), A244621 (a(n) mod 12).
Cf. A369972 (k where prime(1+k)|a(k)), A369973 (corresponding primorials), A293457 (corresponding primes), A377992 (antiderivatives of the terms > 1 of this sequence).

Programs

  • Magma
    [ Numerator(&+[ NthPrime(k)^-1: k in [1..n]]): n in [1..18] ];  // Bruno Berselli, Apr 11 2011
    
  • Maple
    h:= n-> add(1/(ithprime(i)),i=1..n);
    t1:=[seq(h(n),n=0..50)];
    t1a:=map(numer,t1); # A024451
    t1b:=map(denom,t1); # A002110 - N. J. A. Sloane, Apr 25 2014
  • Mathematica
    a[n_] := Numerator @ Sum[1/Prime[i], {i, n}]; Array[a,18]  (* Jean-François Alcover, Apr 11 2011 *)
    f[k_] := Prime[k]; t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[n - 1, t[n]]
    Table[a[n], {n, 1, 16}] (* A024451 *)
    (* Clark Kimberling, Dec 29 2011 *)
    Numerator[Accumulate[1/Prime[Range[20]]]] (* Harvey P. Dale, Apr 11 2012 *)
  • PARI
    a(n) = numerator(sum(i=1, n, 1/prime(i))); \\ Michel Marcus, Sep 18 2018
    
  • Python
    from sympy import prime
    from fractions import Fraction
    def a(n): return sum(Fraction(1, prime(k)) for k in range(1, n+1)).numerator
    print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 12 2021
    
  • Python
    from math import prod
    from sympy import prime
    def A024451(n):
        q = prod(plist:=tuple(prime(i) for i in range(1,n+1)))
        return sum(q//p for p in plist) # Chai Wah Wu, Nov 03 2022

Formula

Limit_{n->oo} (Sum_{p <= n} 1/p - log log n) = 0.2614972... = A077761.
a(n) = (Product_{i=1..n} prime(i))*(Sum_{i=1..n} 1/prime(i)). - Benoit Cloitre, Jan 30 2002
(n+1)-st elementary symmetric function of the first n primes.
a(n) = a(n-1)*A000040(n) + A002110(n-1). - Henry Bottomley, Sep 27 2006
From Antti Karttunen, Jan 31 2024, Feb 08 2024 and Nov 19 2024: (Start)
a(0) = 0, for n > 0, a(n) = 2*A203008(n-1) + A070826(n).
For n > 0, a(n) = A327860(A143293(n-1)).
For n > 0, a(n) = A348301(n) + A002110(n).
For n = 3..175, a(n) = A356253(A002110(n)). [See comments in A356253.]
For n >= 0, A053144(n) <= a(n) <= A074107(n) < A070826(1+n).
(End)

Extensions

a(0)=0 prepended by Alois P. Heinz, Jun 26 2015

A091440 Smallest number m such that m#/phi(m#) >= n, where m# indicates the primorial (A034386) of m and phi is Euler's totient function.

Original entry on oeis.org

1, 2, 3, 7, 13, 23, 43, 79, 149, 257, 461, 821, 1451, 2549, 4483, 7879, 13859, 24247, 42683, 75037, 131707, 230773, 405401, 710569, 1246379, 2185021, 3831913, 6720059, 11781551, 20657677, 36221753, 63503639, 111333529, 195199289, 342243479, 600036989
Offset: 1

Views

Author

T. D. Noe, Jan 09 2004

Keywords

Comments

Does the ratio of adjacent terms converge?
It appears that lim_{n->infinity} a(n+1)/a(n) = 1.7532... - Jon E. Schoenfield, Feb 21 2019
For n > 1, a(n) is smallest prime p = prime(k) such that no fewer than (n-1)/n of any p# consecutive integers are divisible by a prime not greater than p. Cf. A053144(k)/A002110(k). - Peter Munn, Apr 29 2017
Also, the smallest prime p such that the sum of the reciprocals of the p-smooth numbers converges to at least n. - Keith F. Lynch, Apr 29 2023
Also, if m is a random integer much larger than the square of a(n), and m is not divisible by any prime less than or equal to a(n), the probability that m is prime is n/log(m). - Keith F. Lynch, Dec 17 2023

Examples

			7#/phi(7#) = (2*3*5*7)/(1*2*4*6) = 4.375 >= 4, 5#/phi(5#) = 3.75. Hence a(4) = 7.
		

Crossrefs

Programs

  • Mathematica
    prod=1; i=0; Table[While[prod
    				
  • PARI
    al(lim) = local(mm,n,m); mm=3; n=2; m=1; forprime(x=3,lim, n*=x; m*= (x-1); if (n\m >= mm, print1(x","); mm++)); /* This will generate all terms of this sequence from the 3rd onward, up to lim. The computation slows down for large values because of the size of the internal values. */ \\ Fred Schneider, Aug 13 2009, modified by Franklin T. Adams-Watters, Aug 29 2009

Formula

a(n) = prime(A005579(n)) for n >= 4. - Amiram Eldar, Apr 18 2025

Extensions

More terms from David W. Wilson, Sep 28 2005
Sequence reference in name corrected by Peter Munn, Apr 29 2017

A161527 Numerators of cumulative sums of rational sequence A038110(k)/A038111(k).

Original entry on oeis.org

1, 2, 11, 27, 61, 809, 13945, 268027, 565447, 2358365, 73551683, 2734683311, 112599773191, 4860900544813, 9968041656757, 40762420985117, 83151858555707, 5085105491885327, 341472595155548909, 24295409051193284539, 1777124696397561611347
Offset: 1

Views

Author

Daniel Tisdale, Jun 12 2009

Keywords

Comments

By rewriting the sequence of sums as 1 - Product_{n>=1} (1 - 1/prime(n)), one can show that the product goes to zero and the sequence of sums converges to 1. This is interesting because the terms approach 1/(2*prime(n)) for large n, and a sum of such terms might be expected to diverge, since Sum_{n>=1} 1/(2*prime(n)) diverges.
Denominators appear to be given by A060753(n+1). - Peter Kagey, Jun 08 2019
A254196 appears to be a duplicate of this sequence. - Michel Marcus, Aug 05 2019

Crossrefs

Programs

  • Mathematica
    Numerator[Table[1 - Product[1 - (1/Prime[k]), {k,1,n}], {n,1,20}]]
  • PARI
    r(n) = prod(k=1, n-1, (1 - 1/prime(k)))/prime(n);
    a(n) = numerator(sum(k=1, n, r(k))); \\ Michel Marcus, Jun 08 2019

Formula

a(n) = A053144(n)/A058250(n). - Jamie Morken, Aug 28 2022

A281891 Square array A(n,k): number of integers having k or more factors less than prime(n+1) in their prime factorization, within any interval of primorial(n)^k positive integers.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 4, 1, 0, 1, 14, 22, 1, 0, 1, 46, 412, 162, 1, 0, 1, 146, 7072, 22164, 1830, 1, 0, 1, 454, 115432, 2744088, 2822340, 24270, 1, 0, 1, 1394, 1827592, 319881696, 3913037880, 496348740, 418350, 1, 0, 1, 4246, 28390552, 35924741232, 5079363328560, 9082206410040, 147569907780, 8040810, 1
Offset: 0

Views

Author

Peter Munn, Feb 08 2017

Keywords

Comments

Square array read by descending antidiagonals; A(n,k) with rows n >= 0, columns k >= 0. Prime factors are counted with multiplicity. Primorial(n) = A002110(n): product of first n primes.
Visualize the prime factorizations of the positive integers as a table with row headings giving each successive integer, and the primes of which the row heading is the product listed across the columns in nondecreasing order, repeated when necessary. Except for 1, which lacks prime factors, column 1 has the row heading's least prime factor, column 2 has a value for composite numbers but is blank for primes, and so on. This sequence measures precisely how frequently values up to and including the various primes occur in each column. This is possible because any given prime occurs cyclically in any given column, for the reason following.
The occurrence pattern of up to k factors of prime(n) in such prime factorizations has a fundamental period over the positive integers of prime(n)^k. The least common period for up to k factors of each of the first n primes is primorial(n)^k, and this covers everything that can affect the occurrence of prime(n) in the least k factors. Thus prime(n) is k-th least prime factor of integer m if and only if it is k-th least prime factor of m + primorial(n)^k.
Intermediate values in the calculation of this sequence appear in A281890.
If n > 0, A(n,1) = A053144(n) in accordance with the comment on A053144 dated Apr 08 2010.
A(2,k) = A027649(k) = 2*(3^k) - 2^k.

Examples

			The table starts:
   1     0         0             0             0           0        0 ...
   1     1         1             1             1           1        1 ...
   1     4        14            46           146         454     1394 ...
   1    22       412          7072        115432     1827592 28390552 ...
   1   162     22164       2744088     319881696 35924741232    ...
   1  1830   2822340    3913037880 5079363328560      ...
   1 24270 496348740 9082206410040       ...
   ...
Primes less than prime(2+1)=5 occur as second least factor 14 times in the prime factorizations of every interval of 36 = primorial(2)^2 positive integers (cf. A014673). Therefore, A(2,2) = 14.
		

Crossrefs

A079474 re-read as a square array gives values of primorial(n)^k = A002110(n)^k.
The values in the body of the factorization table described in the author's comments are in the irregular array A027746.
A096294 gives the equivalent array for integers expressed as a product of prime powers.

Formula

A(n,0) = 1 for n >= 0, A(0,k) = 0 for k >= 1.
A(n,k) = prime(n)^k * A(n-1,k) + A281890(n,k) for n >= 1, k >= 1.

Extensions

Edited by M. F. Hasler, Apr 14 2017

A174909 Triangle T(n,i) whose n-th row gives the number of numbers in any prime(n)# consecutive numbers whose smallest prime factor is prime(n-i+1).

Original entry on oeis.org

1, 1, 3, 2, 5, 15, 8, 14, 35, 105, 48, 88, 154, 385, 1155, 480, 624, 1144, 2002, 5005, 15015, 5760, 8160, 10608, 19448, 34034, 85085, 255255, 92160, 109440, 155040, 201552, 369512, 646646, 1616615, 4849845, 1658880, 2119680, 2517120, 3565920
Offset: 1

Views

Author

T. D. Noe, Apr 01 2010

Keywords

Comments

Here prime(n)# denotes the product of the first n primes. Row n begins with A005867(n-1). The other n-1 terms in row n are prime(n) times the previous row. The sum of the terms in row n is cototient(prime(n)#), which is A053144(n), and which equals prime(n)#-A005867(n). This sequence is a generalization of a comment in A005867 by Dennis Martin.

Examples

			For n=3, we have prime(n)=5 and any range of 2*3*5=30 consecutive numbers has 2 numbers whose smallest prime factor is 5, 5 numbers whose smallest prime factor is 3, and 15 numbers whose smallest prime factor is 2.
From _Bob Selcoe_, Oct 12 2017: (Start)
Triangle starts:
n/i  1   2   3    4    5     6
1    1
2    1   3
3    2   5   15
4    8  14   35  105
5   48  88  154  385  1155
6  480 624 1144 2002  5005 15015
(End)
		

Crossrefs

Cf. A002110, A005867 (first column), A020639, A053144, A070826 (main diagonal).
Cf. A293558 (transpose).

Programs

  • Mathematica
    t={{1}}; q=2; Do[p=Prime[n]; t=AppendTo[t, Join[{(q-1)*t[[ -1,1]]}, p*t[[ -1]]]]; q=p, {n,2,9}]; Flatten[t]
    (* Second program: *)
    Block[{nn = 8, s}, s = Array[FactorInteger[#][[1, 1]] &, Product[Prime@i, {i, nn}]]; Table[With[{P = Product[Prime@ k, {k, n}]}, Count[Take[s, P], ?(# == Prime[n - i + 1] &)]], {n, nn}, {i, n}]] (* _Michael De Vlieger, Oct 14 2017 *)

A293558 Triangle T(n,k) read by rows: T(n,k) = A005867(k-1)*A002110(n)/A002110(k).

Original entry on oeis.org

1, 3, 1, 15, 5, 2, 105, 35, 14, 8, 1155, 385, 154, 88, 48, 15015, 5005, 2002, 1144, 624, 480, 255255, 85085, 34034, 19448, 10608, 8160, 5760, 4849845, 1616615, 646646, 369512, 201552, 155040, 109440, 92160
Offset: 1

Views

Author

Bob Selcoe, Oct 11 2017

Keywords

Comments

T(n,k) is the triangle in A174909 with reversed row order. (See that sequence for additional comments).
Row sums = A053144(n) = A002110(n) - T(n+1,n+1).
T(n,k) = number of terms with smallest prime factor prime(k) contained in primorial(n) consecutive numbers, k <= n. For example, T(5,4) = 88, so there are 88 terms with smallest prime factor 7 in any sequence of 2310 consecutive numbers.

Examples

			Triangle starts:
n/k  1     2    3    4    5    6
1    1
2    3     1
3    15    5    2
4    105   35   14   8
5    1155  385  154  88   48
6    15015 5005 2002 1144 624 480
T(5,3) = 154: A005867(2) = 2, A002110(5) = 2310, A002110(3) = 30; 2*2310/30 = 154.
		

Crossrefs

Cf. A000040 (prime numbers), A002110, A005867, A053144, A174909 (this triangle with reversed row order).

Programs

  • Mathematica
    Table[#1 Product[EulerPhi@ Prime@ i, {i, k - 1}]/#2 & @@ Map[Product[ Prime@ i, {i, #}] &, {n, k}], {n, 8}, {k, n}] // Flatten (* Michael De Vlieger, Oct 12 2017 *)
Showing 1-6 of 6 results.