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 11-12 of 12 results.

A247970 a(n) is the smallest k such that prime(k+i) (mod 6) takes successively the values 5,1,5,1... for i = 0, 1,...,n-1 ending with 1 or 5.

Original entry on oeis.org

3, 3, 3, 3, 3, 3, 3, 24, 24, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140
Offset: 1

Views

Author

Michel Lagneau, Sep 28 2014

Keywords

Comments

If a(22) exists, k > 10^5.

Examples

			a(1)= 3 => prime(3) (mod 6)= 5;
a(2)= 3 => prime(3) (mod 6)= 5, prime(4) (mod 6) = 1;
a(3)= 3 => prime(3) (mod 6)= 5, prime(4) (mod 6)= 1, prime(5) (mod 6)= 5.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 1 to 35 do :
    ii:=0:
       for k from 3 to 10^5 while (ii=0)do :
         s:=0:
          for i from 0 to n-1 do:
            r:=irem(ithprime(k+i),6):
            if r = irem(5^(i+1),6)
            then
            s:=s+1:
            else
            fi:
          od:
           if s=n and ii=0
           then
           printf ( "%d %d \n",n,k):ii:=1:
           else
           fi:
        od:
    od:

A336235 Numbers m such that Sum_{i=3..m} (prime(i) modulo 6) = 3*m, where prime(i) is the i-th prime.

Original entry on oeis.org

17, 33, 35, 41, 43, 45, 55, 59, 61, 63, 65, 67, 69, 71, 73, 77, 79, 81, 83, 87, 89, 91, 93, 95, 101, 115, 117, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 181, 183, 189, 191, 193, 275, 277, 281, 283, 291, 341, 355, 521, 523, 525, 527
Offset: 1

Views

Author

Ctibor O. Zizka, Jul 13 2020

Keywords

Comments

By the Prime Number Theorem for arithmetic progressions, all nonzero residue classes are equiprobable. In particular, asymptotically, as m -> oo the Sum_{i=r..m} (prime(i) modulo k) = m*k/2. For this sequence this says Sum_{i=3..m} (prime(i) modulo 6) = m*3.

Examples

			For m = 17 we have Sum_{i=3..17} (prime(i) modulo 6) = 5 + 1 + 5 + 1 + 5 + 1 + 5 + 5 + 1 + 1 + 5 + 1 + 5 + 5 + 5 = 3*17.
		

Crossrefs

Programs

  • Mathematica
    s = Accumulate[Mod[Select[Range[5, 200000], PrimeQ], 6]]; 2 + Position[s - 3 * Range[Length[s]], 6] // Flatten (* Amiram Eldar, Jul 13 2020 *)
  • PARI
    isok(m) = sum(i=3, m, prime(i)%6) == 3*m; \\ Michel Marcus, Jul 13 2020

Extensions

More terms from Michel Marcus, Jul 13 2020
Previous Showing 11-12 of 12 results.