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

A033286 a(n) = n * prime(n).

Original entry on oeis.org

2, 6, 15, 28, 55, 78, 119, 152, 207, 290, 341, 444, 533, 602, 705, 848, 1003, 1098, 1273, 1420, 1533, 1738, 1909, 2136, 2425, 2626, 2781, 2996, 3161, 3390, 3937, 4192, 4521, 4726, 5215, 5436, 5809, 6194, 6513, 6920, 7339, 7602, 8213, 8492, 8865, 9154, 9917
Offset: 1

Views

Author

Keywords

Comments

Does an n exist such that n*prime(n)/(n+prime(n)) is an integer? - Ctibor O. Zizka, Mar 04 2008. The answer to Zizka's question is easily seen to be No: such an integer k would be positive and less than prime(n), but then k*(n + prime(n)) = prime(n)*n would be impossible. - Robert Israel, Apr 20 2015
Sums of rows of the triangle in A005145. - Reinhard Zumkeller, Aug 05 2009
Complement of A171520(n). - Jaroslav Krizek, Dec 13 2009
Partial sums of A090942. - Omar E. Pol, Apr 20 2015

Crossrefs

Cf. A005145 (primes repeated), A171520 (complement), A076146 (iterated).

Programs

Formula

a(n) = n * A000040(n) = n * A008578(n+1) = n * A158611(n+2). - Jaroslav Krizek, Aug 31 2009
a(n) = A007504(n) + A152535(n). - Omar E. Pol, Aug 09 2012
Sum_{n>=1} 1/a(n) = A124012. - Amiram Eldar, Oct 15 2020

Extensions

Correction for change of offset in A158611 and A008578 in Aug 2009 from Jaroslav Krizek, Jan 27 2010

A152535 a(n) = n*prime(n) - Sum_{i=1..n} prime(i).

Original entry on oeis.org

0, 1, 5, 11, 27, 37, 61, 75, 107, 161, 181, 247, 295, 321, 377, 467, 563, 597, 705, 781, 821, 947, 1035, 1173, 1365, 1465, 1517, 1625, 1681, 1797, 2217, 2341, 2533, 2599, 2939, 3009, 3225, 3447, 3599, 3833, 4073, 4155, 4575, 4661
Offset: 1

Views

Author

Omar E. Pol, Dec 06 2008

Keywords

Comments

a(n) is also the area under the curve of the function pi(x) from 0 to prime(n). - Omar E. Pol, Nov 13 2013

Examples

			From _Omar E. Pol_, Apr 27 2015: (Start)
For n = 5 the 5th prime is 11 and the sum of first five primes is 2 + 3 + 5 + 7 + 11 = 28, so a(5) = 5*11 - 28 = 27.
Illustration of a(5) = 27:
Consider a diagram in the first quadrant of the square grid in which the number of cells in the n-th horizontal bar is equal to the n-th prime, as shown below:
.      _ _ _ _ _ _ _ _ _ _ _
. 11  |_ _ _ _ _ _ _ _ _ _ _|
.  7  |_ _ _ _ _ _ _|* * * *
.  5  |_ _ _ _ _|* * * * * *
.  3  |_ _ _|* * * * * * * *
.  2  |_ _|* * * * * * * * *
.
a(5) is also the area (or the number of cells, or the number of *'s) under the bar's structure of prime numbers: a(5) = 1 + 4 + 6 + 16 = 27.
(End)
		

Crossrefs

Programs

  • Mathematica
    nn = 100; p = Prime[Range[nn]]; Range[nn] p - Accumulate[p] (* T. D. Noe, May 02 2011 *)
  • PARI
    vector(80, n, n*prime(n) - sum(k=1, n, prime(k))) \\ Michel Marcus, Apr 20 2015
    
  • Python
    from sympy import prime, primerange
    def A152535(n): return (n-1)*(p:=prime(n))-sum(primerange(p)) # Chai Wah Wu, Jan 01 2024
  • Sage
    [n*nth_prime(n) - sum(nth_prime(j) for j in range(1,n+1)) for n in range(1,45)] # Danny Rorabaugh, Apr 18 2015
    

Formula

a(n) = A033286(n) - A007504(n). - Omar E. Pol, Aug 09 2012
a(n) = A046992(A006093(n)). - Omar E. Pol, Apr 21 2015
a(n+1) = Sum_{k=A000124(n-1)..A000217(n)} A204890(k). - Benedict W. J. Irwin, May 23 2016
a(n) = Sum_{k=1..n-1} k*A001223(k). - François Huppé, Mar 16 2022
Showing 1-2 of 2 results.