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-7 of 7 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

A089633 Numbers having no more than one 0 in their binary representation.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 11, 13, 14, 15, 23, 27, 29, 30, 31, 47, 55, 59, 61, 62, 63, 95, 111, 119, 123, 125, 126, 127, 191, 223, 239, 247, 251, 253, 254, 255, 383, 447, 479, 495, 503, 507, 509, 510, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1022, 1023
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 01 2004

Keywords

Comments

Complement of A158582. - Reinhard Zumkeller, Apr 16 2009
Also union of A168604 and A030130. - Douglas Latimer, Jul 19 2012
Numbers of the form 2^t - 2^k - 1, 0 <= k < t.
n is in the sequence if and only if 2*n+1 is in the sequence. - Robert Israel, Dec 14 2018
Also the least binary rank of a strict integer partition of n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1). - Gus Wiseman, May 24 2024

Examples

			From _Tilman Piesk_, May 09 2012: (Start)
This may also be viewed as a triangle:             In binary:
                  0                                         0
               1     2                                 01       10
             3    5    6                          011      101      110
           7   11   13   14                  0111     1011     1101     1110
        15   23   27   29   30          01111    10111    11011    11101    11110
      31  47   55   59   61   62
   63   95  111  119  123  125  126
Left three diagonals are A000225,  A055010, A086224. Right diagonal is A000918. Central column is A129868. Numbers in row n (counted from 0) have n binary 1s. (End)
From _Gus Wiseman_, May 24 2024: (Start)
The terms together with their binary expansions and binary indices begin:
   0:      0 ~ {}
   1:      1 ~ {1}
   2:     10 ~ {2}
   3:     11 ~ {1,2}
   5:    101 ~ {1,3}
   6:    110 ~ {2,3}
   7:    111 ~ {1,2,3}
  11:   1011 ~ {1,2,4}
  13:   1101 ~ {1,3,4}
  14:   1110 ~ {2,3,4}
  15:   1111 ~ {1,2,3,4}
  23:  10111 ~ {1,2,3,5}
  27:  11011 ~ {1,2,4,5}
  29:  11101 ~ {1,3,4,5}
  30:  11110 ~ {2,3,4,5}
  31:  11111 ~ {1,2,3,4,5}
  47: 101111 ~ {1,2,3,4,6}
  55: 110111 ~ {1,2,3,5,6}
  59: 111011 ~ {1,2,4,5,6}
  61: 111101 ~ {1,3,4,5,6}
  62: 111110 ~ {2,3,4,5,6}
(End)
		

Crossrefs

Cf. A181741 (primes), union of A081118 and A000918, apart from initial -1.
For least binary index (instead of rank) we have A001511.
Applying A019565 (Heinz number of binary indices) gives A077011.
For greatest binary index we have A029837 or A070939, opposite A070940.
Row minima of A118462 (binary ranks of strict partitions).
For sum instead of minimum we have A372888, non-strict A372890.
A000009 counts strict partitions, ranks A005117.
A048675 gives binary rank of prime indices, distinct A087207.
A048793 lists binary indices, product A096111, reverse A272020.
A277905 groups all positive integers by binary rank of prime indices.

Programs

  • Haskell
    a089633 n = a089633_list !! (n-1)
    a089633_list = [2 ^ t - 2 ^ k - 1 | t <- [1..], k <- [t-1,t-2..0]]
    -- Reinhard Zumkeller, Feb 23 2012
    
  • Maple
    seq(seq(2^a-1-2^b,b=a-1..0,-1),a=1..11); # Robert Israel, Dec 14 2018
  • Mathematica
    fQ[n_] := DigitCount[n, 2, 0] < 2; Select[ Range[0, 2^10], fQ] (* Robert G. Wilson v, Aug 02 2012 *)
  • PARI
    {insq(n) = local(dd, hf, v); v=binary(n);hf=length(v);dd=sum(i=1,hf,v[i]);if(dd<=hf-2,-1,1)}
    {for(w=0,1536,if(insq(w)>=0,print1(w,", ")))}
    \\ Douglas Latimer, May 07 2013
    
  • PARI
    isoka(n) = #select(x->(x==0), binary(n)) <= 1; \\ Michel Marcus, Dec 14 2018
    
  • Python
    from itertools import count, islice
    def A089633_gen(): # generator of terms
        return ((1<A089633_list = list(islice(A089633_gen(),30)) # Chai Wah Wu, Feb 10 2023
    
  • Python
    from math import isqrt, comb
    def A089633(n): return (1<<(a:=(isqrt((n<<3)+1)-1>>1)+1))-(1<Chai Wah Wu, Dec 19 2024

Formula

A023416(a(n)) <= 1; A023416(a(n)) = A023532(n-2) for n>1;
A000120(a(u)) <= A000120(a(v)) for uA000120(a(n)) = A003056(n).
a(0)=0, n>0: a(n+1) = Min{m>n: BinOnes(a(n))<=BinOnes(m)} with BinOnes=A000120.
If m = floor((sqrt(8*n+1) - 1) / 2), then a(n) = 2^(m+1) - 2^(m*(m+3)/2 - n) - 1. - Carl R. White, Feb 10 2009
A029931(a(n)) = n and A029931(m) != n for m < a(n). - Reinhard Zumkeller, Feb 28 2014
A265705(a(n),k) = A265705(a(n),a(n)-k), k = 0 .. a(n). - Reinhard Zumkeller, Dec 15 2015
a(A014132(n)-1) = 2*a(n-1)+1 for n >= 1. - Robert Israel, Dec 14 2018
Sum_{n>=1} 1/a(n) = A065442 + A160502 = 3.069285887459... . - Amiram Eldar, Jan 09 2024
A019565(a(n)) = A077011(n). - Gus Wiseman, May 24 2024

A159685 Maximal product of distinct primes whose sum is <= n.

Original entry on oeis.org

1, 2, 3, 3, 6, 6, 10, 15, 15, 30, 30, 42, 42, 70, 105, 105, 210, 210, 210, 210, 330, 330, 462, 462, 770, 1155, 1155, 2310, 2310, 2730, 2730, 2730, 2730, 4290, 4290, 6006, 6006, 10010, 15015, 15015, 30030, 30030, 30030, 30030, 39270, 39270, 46410, 46410
Offset: 1

Views

Author

Wouter Meeussen, Apr 19 2009, May 02 2009

Keywords

Comments

Equivalently, largest value of the LCM of the partitions of n into primes.
Equivalently, maximal number of times a permutation of length n, with prime cycle lengths, can operate on itself before returning to the initial permutation.
If the requirement that primes are distinct is dropped, this becomes A000792. - Charles R Greathouse IV, Jul 10 2012

Examples

			A permutation of length 10 can have prime cycle lengths of 2+3+5; so when repeatedly applied to itself, can produce at most 2*3*5 different permutations.
The products of distinct primes whose sum is <= 10 are 1 (the empty product), 2, 3, 5, 7, 2*3=6, 2*5=10, 2*7=14, 3*5=15, 3*7=21, and 2*3*5=30. The maximum is 30, so a(10) = 30. - _Jonathan Sondow_, Jul 06 2012
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n,i) option remember; local p; p:= ithprime(max(i,1));
          `if`(n=0, 1, `if`(i<1, 0,
           max(b(n, i-1), `if`(p>n, 0, b(n-p, i-1)*p))))
        end:
    a:= proc(n) option remember;
         `if`(n=0, 1, max(b(n, pi(n)), a(n-1)))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 04 2012
  • Mathematica
    temp=Series[Times @@ (1/(1-q[ # ] x^#)& /@ Prepend[Prime /@ Range[24],1]),{x,0,Prime[24]}]; Table[Max[List @@ Expand[Coefficient[temp,x^n]]/. q[a_]^_ ->q[a] /.q->Identity],{n,64}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = Module[{p = Prime[Max[i, 1]]}, If[n == 0, 1, If[i < 1, 0, Max[b[n, i-1], If[p > n, 0, b[n-p, i-1]*p]]]]]; a[n_] := a[n] = If[n == 0, 1, Max[b[n, PrimePi[n]], a[n-1]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 05 2013, translated from Alois P. Heinz's Maple program *)

Formula

a(n) <= A002809(n) and A008475(a(n)) <= n (see (1.2) and (1.4) in Deléglise-Nicolas 2012). - Jonathan Sondow, Jul 04 2012.

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).

A372666 Numbers of the form A002110(k)/prime(i); i = 2..k-1; sorted.

Original entry on oeis.org

10, 42, 70, 330, 462, 770, 2730, 4290, 6006, 10010, 39270, 46410, 72930, 102102, 170170, 570570, 746130, 881790, 1385670, 1939938, 3233230, 11741730, 13123110, 17160990, 20281170, 31870410, 44618574, 74364290, 281291010, 340510170, 380570190, 497668710, 588153930
Offset: 1

Views

Author

David James Sycamore, May 09 2024

Keywords

Comments

In other words, "almost primorial numbers": those obtained from primorials (A002110) through division by one single prime which is greater than the least prime divisor and less that the greatest prime divisor of each primorial (results sorted by size). Same as A077011 constrained by exclusion of A002110(k)/prime(1) and A002110(k)/prime(k), so there are no primorial or half primorial terms. Each primorial A002110(k), k > 2, contributes k-2 terms to the sequence.
All terms are even squarefree numbers.
Subsequence of A077011 and A005117.

Examples

			Since k > 2, we start with A002110(3) = 2*3*5 = 30 and 3 is the only prime divisor of 30 which fits the definition so 30/3 = 10 is a(1).
A002110(6) = 2*3*5*7*11*13 = 30030 contributes four terms to the sequence, namely 30030/11 = 2730, 30030/7 = 4290, 30030/5 = 6006, and 30030/3 = 10010.
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Table[P = Product[Prime[i], {i, n}]; Array[P/Prime[n - #] &, n - 2], {n, 3, 10}] (* Michael De Vlieger, May 10 2024 *)

Extensions

More terms from Michael De Vlieger, May 10 2024

A294280 a(n) = least positive k such that omega(n+k) > max(omega(n), omega(k)), where omega(m) = A001221(m), the number of distinct primes dividing m.

Original entry on oeis.org

1, 4, 3, 2, 1, 24, 3, 2, 1, 20, 1, 18, 1, 16, 15, 2, 1, 12, 1, 10, 9, 8, 1, 6, 1, 4, 1, 2, 1, 180, 2, 1, 9, 8, 7, 6, 1, 4, 3, 2, 1, 168, 1, 16, 15, 14, 1, 12, 1, 10, 9, 8, 1, 6, 5, 4, 3, 2, 1, 150, 1, 4, 3, 1, 1, 144, 1, 2, 1, 140, 1, 6, 1, 4, 3, 2, 1, 132, 1
Offset: 1

Views

Author

Rémy Sigrist, Oct 26 2017

Keywords

Comments

For any n > 0, a(n) <= n * (A053669(n) - 1).
Apparently, a(n) = n * (A053669(n) - 1) iff n belongs to A077011.
a(n) = 1 iff omega(n) < omega(n+1).
a(p) = 1 for any prime power p not in A006549.
The scatterplot of the sequence shows segments of slope -1, corresponding to frequent values of n+a(n); these segments correspond to the strands in the plot of the ordinal transform of n+a(n) (see plots in Links section).

Examples

			For n=2:
- omega(2+1) = 1 = omega(2),
- omega(2+2) = 1 = omega(2),
- omega(2+3) = 1 = omega(2),
- omega(2+4) = 2 > max(omega(2), omega(4)) = 1,
- hence, a(2) = 4.
		

Crossrefs

Programs

  • PARI
    a(n) = my (on=omega(n)); for (k=1, oo, if (omega(n+k) > max(on, omega(k)), return (k)))

A376419 a(n) = prime(1+n)*A024451(n-1) - A024451(n), where A024451(n) is the numerator of Sum_{i = 1..n} 1/prime(i).

Original entry on oeis.org

-1, 0, 4, 94, 284, 9398, 50692, 2354158, 75006408, 445719928, 53055577416, 1055507209474, 16217635288124, 1663779309692618, 115680647722172136, 5515487010932110572, 76943944440184239772, 17660133817084175986164, 686773689508904350332526, 19312334585726976150166616, 5276558856319725444255594528, 245447734128317092747434820766
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2024

Keywords

Comments

Note that for n > 1, A070826(n) < A024451(n) < A070826(1+n) and A070826(1+n) = prime(1+n)*A070826(n).

Crossrefs

Programs

Showing 1-7 of 7 results.