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 21-29 of 29 results.

A061536 a(1) = 1 and a(n) = a(n-1) + (the number of primes <= n) for n > 1.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 20, 24, 28, 33, 38, 44, 50, 56, 62, 69, 76, 84, 92, 100, 108, 117, 126, 135, 144, 153, 162, 172, 182, 193, 204, 215, 226, 237, 248, 260, 272, 284, 296, 309, 322, 336, 350, 364, 378, 393, 408, 423, 438, 453, 468, 484, 500, 516, 532, 548
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n - 1] + PrimePi[n]; Table[ a[n], {n, 1, 70} ]
    Accumulate[PrimePi[Range[60]]]+1 (* Harvey P. Dale, Jun 11 2014 *)
  • PARI
    a=1; for (n=1, 100, print1(a+=primepi(n), ", ")) \\ Harry J. Smith, Jul 24 2009
    
  • PARI
    first(n)=my(p,s=1); vector(n,k, s+=p+=isprime(k)) \\ Charles R Greathouse IV, Jan 06 2016

Formula

a(n) = 1 + A046992(n).

Extensions

Definition edited by Georg Fischer, Sep 04 2020

A073162 n is such that partial sum of pi(k) from 1 to n is divisible by n.

Original entry on oeis.org

1, 3, 17, 37, 9107, 156335, 679083, 1068131, 4883039, 101691357
Offset: 1

Views

Author

Labos Elemer, Jul 18 2002

Keywords

Comments

a(11) > 10^12. - Donovan Johnson, Mar 19 2011
a(11) > 10^13. - Lucas A. Brown, Oct 05 2020

Examples

			a(3) = 17 because 0+1+2+2+3+3+4+4+4+4+5+5+6+6+6+6+7 = 68 = 4*17.
		

Crossrefs

Programs

  • Mathematica
    s = 0; Do[s = s + PrimePi[n]; If[ IntegerQ[s/n], Print[{n, s, s/n}]], {n, 1, 10^8}]
    Module[{nn=11 10^5,pspi},pspi=Accumulate[PrimePi[Range[nn]]];Select[Thread[{Range[nn],pspi}],Mod[#[[2]],#[[1]]]==0&]][[;;,1]] (* The program generates the first 8 terms of the siequence. *) (* Harvey P. Dale, Mar 19 2025 *)

Formula

Solutions to Mod[A046992(x), x]=0

Extensions

Edited and extended by Robert G. Wilson v, Jul 20 2002
a(10) from Donovan Johnson, Dec 15 2009

A073163 Partial sums of Pi(k) arising in A073162.

Original entry on oeis.org

0, 3, 68, 259, 5500628, 1180641920, 19503263760, 46464766631, 863653341852, 306757978180563
Offset: 1

Views

Author

Labos Elemer, Jul 18 2002

Keywords

Examples

			Sum of first 17 values of Pi(n) equals 0+1+2+2+3+3+4+4+4+4+5+5+6+6+6+6+7 = 68 = 4*17. To continue, see A073224.
		

Crossrefs

Programs

  • Mathematica
    s = 0; Do[s = s + PrimePi[n]; If[ IntegerQ[s/n], Print[{n, s, s/n}]], {n, 1, 10^8}]

Formula

Values of s(n) = A046992(n) such that s(n)/n is an integer.

Extensions

Edited and extended by Robert G. Wilson v, Jul 20 2002
a(10) from Donovan Johnson, Dec 15 2009

A368616 a(n) = Sum_{k=1..n} pi(k) * (ceiling(n/k) - floor(n/k)).

Original entry on oeis.org

0, 0, 1, 2, 5, 5, 11, 12, 17, 19, 27, 24, 37, 38, 44, 48, 61, 58, 75, 73, 85, 93, 107, 99, 122, 127, 137, 139, 161, 152, 181, 179, 196, 206, 218, 212, 247, 250, 263, 261, 295, 284, 321, 319, 334, 353, 377, 360, 403, 405, 428, 434, 467, 457, 491, 489, 521, 536, 563, 536, 597, 603, 615
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 31 2023

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[PrimePi[k] (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]

Formula

a(n) = A368610(n) - A368611(n).
a(n) = A046992(n) - A062774(n).
a(n) = A368641(n) + A048865(n).

A368641 a(n) = Sum_{k=2..n} pi(k-1) * (ceiling(n/k) - floor(n/k)).

Original entry on oeis.org

0, 0, 0, 1, 3, 4, 8, 9, 14, 17, 23, 21, 32, 34, 40, 43, 55, 53, 68, 67, 79, 87, 99, 92, 114, 120, 129, 132, 152, 145, 171, 169, 187, 197, 209, 203, 236, 240, 253, 251, 283, 274, 308, 307, 322, 341, 363, 347, 389, 392, 415, 421, 452, 443, 477, 475, 507, 522, 547, 522
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 01 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[PrimePi[k - 1] (Ceiling[n/k] - Floor[n/k]), {k, 2, n}], {n, 100}]

Formula

a(n) = A368612(n) - A368613(n).
a(n) = A368616(n) - A048865(n).

A122933 a(n)-th prime is equal to the sum_{i=1..k} pi(i) for some k (cf. A000720).

Original entry on oeis.org

2, 3, 5, 8, 9, 12, 14, 18, 23, 28, 42, 58, 61, 70, 91, 95, 101, 103, 132, 142, 150, 161, 167, 170, 248, 347, 361, 382, 409, 412, 424, 463, 476, 514, 532, 561, 645, 666, 710, 724, 736, 788, 795, 869, 999, 1010, 1083, 1106, 1124, 1136, 1143, 1149, 1163, 1205, 1244
Offset: 1

Views

Author

Alexander Adamchuk, Sep 20 2006

Keywords

Comments

A046992 is sum_{k=1..n} pi(k). A122516 are the members of A046992 which are primes.
Primes in A046992[n] are {3,5,11,19,23,37,43,61,...} = A122516[n] = Prime[a(n)].

Examples

			A122516[n] begins {3,5,11,19,23,37,43,61,83,107,181,271,...}.
So a(1) = 2 because A122516[1] 3 = Prime[2].
a(2) = 3 because A122516[2] = 5 = Prime[3].
a(3) = 5 because A122516[3] = 11 = Prime[5].
		

Crossrefs

Programs

  • Mathematica
    PrimePi[Flatten[Table[If[PrimeQ[Sum[ PrimePi[n], {n, 1, m}]], Sum[PrimePi[n], {n, 1, m}], {}], {m, 1, 500}]]]

Formula

a(n) = PrimePi[ A122516[n] ].

Extensions

Edited by Robert G. Wilson v, Sep 28 2006

A137441 Partial sums of partial sums of PrimePi(k).

Original entry on oeis.org

0, 1, 4, 9, 17, 28, 43, 62, 85, 112, 144, 181, 224, 273, 328, 389, 457, 532, 615, 706, 805, 912, 1028, 1153, 1287, 1430, 1582, 1743, 1914, 2095, 2287, 2490, 2704, 2929, 3165, 3412, 3671, 3942, 4225, 4520, 4828, 5149, 5484, 5833, 6196, 6573, 6965, 7372, 7794
Offset: 1

Views

Author

Jonathan Vos Post, Apr 17 2008

Keywords

Crossrefs

Programs

  • Maple
    A000720 := proc(n) option remember ; numtheory[pi](n) ; end: A046992 := proc(n) option remember ; add( A000720(i),i=1..n) ; end: A137441 := proc(n) add( A046992(i),i=1..n) ; end: seq(A137441(n),n=1..80) ; # R. J. Mathar, Apr 23 2008
    # second Maple program:
    b:= proc(n) option remember; `if`(n<1, [0$2],
          (p-> p+[numtheory[pi](n+1), p[1]])(b(n-1)))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=1..49);  # Alois P. Heinz, Oct 07 2021
  • Mathematica
    Accumulate[Accumulate[PrimePi[Range[50]]]] (* Harvey P. Dale, Feb 17 2013 *)

Formula

a(n) = partial sum of A046992 = partial sum of partial sum of PrimePi(k) = partial sum of partial sum of A000720(k) = Sum_{j=1..n} (Sum_{k=1..j} PrimePi(k)).
a(n) = Sum_{i=1..n} (n+1-i)*pi(i), where pi = A000720. - Ridouane Oudra, Aug 31 2019

Extensions

More terms from R. J. Mathar, Apr 23 2008

A333699 a(n) = Sum_{d|n} phi(n/d) * pi(d).

Original entry on oeis.org

0, 1, 2, 3, 3, 7, 4, 8, 8, 11, 5, 18, 6, 16, 20, 18, 7, 27, 8, 30, 28, 23, 9, 44, 21, 27, 29, 41, 10, 58, 11, 41, 41, 34, 45, 68, 12, 38, 48, 72, 13, 83, 14, 62, 76, 45, 15, 98, 39, 72, 61, 72, 16, 95, 66, 101, 68, 54, 17, 147, 18, 59, 106, 89, 78, 125, 19, 92, 81, 136
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 02 2020

Keywords

Comments

Möbius transform of A386596(n). Also, Dirichlet convolution of pi(n) and phi(n). - Wesley Ivan Hurt, Jul 26 2025

Crossrefs

Programs

  • Mathematica
    Table[Sum[EulerPhi[n/d] PrimePi[d], {d, Divisors[n]}], {n, 70}]
    Table[Sum[PrimePi[GCD[n, k]], {k, n}], {n, 70}]
  • PARI
    a(n) = sumdiv(n, d, eulerphi(n/d)*primepi(d)); \\ Michel Marcus, Apr 03 2020

Formula

G.f.: Sum_{k>=1} Sum_{j>=1} phi(j) * x^(j*prime(k)) / (1 - x^j).
a(n) = Sum_{k=1..n} pi(gcd(n,k)).
a(n) = Sum_{d|n} A386596(d) * mu(n/d). - Wesley Ivan Hurt, Jul 26 2025

A333700 a(n) = Sum_{k=1..n} pi(k) * pi(n-k).

Original entry on oeis.org

0, 0, 0, 1, 4, 8, 14, 22, 32, 45, 58, 73, 90, 110, 132, 158, 184, 214, 246, 282, 320, 363, 406, 455, 506, 562, 618, 678, 738, 804, 872, 944, 1018, 1099, 1180, 1269, 1358, 1450, 1544, 1644, 1744, 1852, 1962, 2078, 2196, 2321, 2446, 2581, 2718, 2863
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 02 2020

Keywords

Comments

Convolution of A000720 with itself.

Crossrefs

Programs

  • Mathematica
    Table[Sum[PrimePi[k] PrimePi[n - k], {k, n}], {n, 50}]
    nmax = 50; CoefficientList[Series[(1/(1 - x)^2) Sum[x^Prime[k], {k, 1, nmax}]^2, {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sum(k=1, n, primepi(k)*primepi(n-k)); \\ Michel Marcus, Apr 03 2020

Formula

G.f.: (1/(1 - x)^2) * (Sum_{k>=1} x^prime(k))^2.
a(n) = Sum_{k=1..n} A046992(k) * A010051(n-k).
a(n) = Sum_{k=1..n} k * A073610(n-k+1).
From Jianing Song, Sep 27 2023: (Start)
a(n-1) = Integral_{0..n} pi(x) * pi(n-x) dx, since Integral_{0..n} pi(x) * pi(n-x) dx = Sum_{k=1..n} Integral_{k-1..k} pi(x) * pi(n-x) dx = Sum_{k=1..n} pi(k-1) * pi(n-k) = Sum_{k=0..n-1} pi(k) * pi(n-1-k) = a(n-1).
a(n) = (a(n-1) + a(n+1))/2 for n == 4 (mod 6) with n > 4, as shown in the Mathematics Stack Exchange link. (End)
Previous Showing 21-29 of 29 results.