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

A172105 Numbers k such that k-th partial sum of A167020 - k-th partial sum of A167021 = 0 (or A172103(k) - A172104(k) = 0).

Original entry on oeis.org

1, 2, 3, 6, 7, 13, 27, 37, 38
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 25 2010

Keywords

Comments

No further terms between 38 and 1500000. [From R. J. Mathar, May 02 2010]

Crossrefs

Extensions

Corrected (13 inserted, terms in the range 297 to 316 removed) by R. J. Mathar, May 02 2010

A323011 a(n) = A172103(n) - A172104(n).

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 0, 1, 2, 2, 1, 1, 0, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 0, 1, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 1, 1, 1, 2, 3, 4, 4, 3, 3, 3, 4, 4, 3, 3, 4, 4, 3, 2, 2, 2, 3, 4, 3, 2, 1, 2, 3, 2, 3, 2, 2, 2, 2, 2, 1, 2, 3, 2, 2, 3, 3, 4, 3, 4, 3, 4, 5, 5, 5, 5, 5, 4
Offset: 1

Views

Author

Torlach Rush, Jan 01 2019

Keywords

Examples

			a(1) = A172103(1) - A172104(1) = 0.
a(2) = A172103(2) - A172104(2) = 0.
a(3) = A172103(3) - A172104(3) = 0.
a(4) = A172103(4) - A172104(4) = 1.
		

Crossrefs

Programs

  • Maple
    f:= proc(t) `if`(isprime(6*t-1),1,0) - `if`(isprime(6*t+1),1,0) end proc:
    ListTools:-PartialSums(map(f, [$1..100])); # Robert Israel, Feb 19 2019
  • Mathematica
    Accumulate@ Boole@ PrimeQ[6 Range@ # - 1] - Accumulate@ Boole@ PrimeQ[6 Range@ # + 1] &@ 60 (* Michael De Vlieger, Jan 27 2019 *)
  • PARI
    isp(n) = isprime(6*n+1); \\ A167021
    ism(n) = isprime(6*n-1); \\ A167020
    psisp(n) = sum(k=1, n, isp(k)); \\ A172104
    psism(n) = sum(k=1, n, ism(k)); \\ A172103
    a(n) = psism(n) - psisp(n); \\ Michel Marcus, Jan 18 2019

Extensions

More terms from Michel Marcus, Feb 01 2019

A172103 Partial sums of A167020 where A167020(n)=1 iff 6*n-1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 15, 16, 17, 17, 18, 18, 18, 19, 20, 21, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 26, 27, 28, 29, 30, 30, 31, 31, 32, 32, 32, 33, 34, 34, 34, 34, 34, 35, 36, 37, 37, 37, 37, 38, 39, 39, 40, 40, 40, 41, 41, 42, 42
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 25 2010

Keywords

Comments

Where A167020 is the characteristic sequence: A167020(n)=1 iff 6*n-1 is prime.

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[If[PrimeQ[6 n-1],1,0],{n,100}]] (* Harvey P. Dale, Dec 27 2022 *)
  • PARI
    ism(n) = isprime(6*n-1); \\ A167020
    a(n) = sum(k=1, n, ism(k)); \\ Michel Marcus, Feb 06 2019

Extensions

Entries checked by R. J. Mathar, Apr 14 2010

A340763 Number of primes p <= n that are congruent to 1 modulo 3.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

Jianing Song, Apr 28 2021

Keywords

Examples

			There are 11 primes <= 100 that are congruent to 1 modulo 3, namely 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97, so a(100) = 11.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(i=1, n, isprime(i) && (i%3==1))

Formula

a(n) + A340764(n) = A000720(n) - 1 for n >= 3.

A340767 Number of primes p <= 6*n + 5 that are congruent to 2 modulo 3.

Original entry on oeis.org

2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 10, 11, 11, 12, 13, 13, 14, 15, 16, 16, 16, 17, 18, 18, 19, 19, 19, 20, 21, 22, 22, 23, 24, 24, 24, 24, 24, 25, 26, 27, 27, 28, 29, 30, 31, 31, 32, 32, 33, 33, 33, 34, 35, 35, 35, 35, 35, 36, 37, 38, 38, 38, 38, 39, 40, 40, 41, 41, 41, 42, 42
Offset: 0

Views

Author

Jianing Song, Apr 28 2021

Keywords

Examples

			There are 14 primes <= 6*16+5 = 101 that are congruent to 2 modulo 3, namely 2, 5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, 101, so a(16) = 14.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(i=1, 6*n+5, isprime(i) && (i%3==2))

Formula

a(n) = A340764(6*n+5).
a(n) = 1 + Sum_{k=0..n+1} A167020(k).
Showing 1-5 of 5 results.