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

A133645 Integers arising in A133677.

Original entry on oeis.org

2, 5, 15, 77, 187, 345, 551, 1107, 1457, 1855, 2301, 3337, 4565, 5251, 6767, 7597, 8475, 11397, 12467, 14751, 18537, 19895, 21301, 24257, 25807, 34277, 36115, 38001, 41917, 43947, 46025, 48151, 52547, 57135, 64377, 66887, 80157, 82955, 85801
Offset: 1

Views

Author

Roger L. Bagula, Dec 28 2007

Keywords

Programs

  • Mathematica
    Union[Table[If[IntegerQ[Prime[n]*(2*Prime[n] - 1)/3], Prime[n]*(2*Prime[n] - 1)/3, {}], {n, 1, 100}]]

A091177 Numbers m such that the m-th prime is of the form 3*k-1.

Original entry on oeis.org

1, 3, 5, 7, 9, 10, 13, 15, 16, 17, 20, 23, 24, 26, 28, 30, 32, 33, 35, 39, 40, 41, 43, 45, 49, 51, 52, 54, 55, 56, 57, 60, 62, 64, 66, 69, 71, 72, 76, 77, 79, 81, 83, 86, 87, 89, 91, 92, 94, 96, 97, 98, 102, 103, 104, 107, 108, 109, 113, 116, 118, 119, 120, 123
Offset: 1

Views

Author

Ray Chandler, Dec 26 2003

Keywords

Comments

A003627 indexed by A000040.
The asymptotic density of this sequence is 1/2 (by Dirichlet's theorem). - Amiram Eldar, Feb 28 2021

Crossrefs

Cf. A003627 (primes of the form 3*k-1), A024893, A087370, A088879.
A133677 is another version.

Programs

  • Mathematica
    PrimePi/@Select[3Range[0,250]-1,PrimeQ]  (* Harvey P. Dale, Apr 26 2011 *)
    Select[Range[150],IntegerQ[(Prime[#]+1)/3]&] (* Harvey P. Dale, Dec 14 2021 *)
  • PARI
    a091177(limit)={my(m=0);forprime(p=2,prime(limit),m++;if(p%3==2,print1(m,", ")))};
    a091177(123) \\ Hugo Pfoertner, Aug 03 2021

Formula

a(n) = k such that A000040(k) = A003627(n).

A132194 a(n) = 1 if n-th prime is 0 or 2 mod 3, otherwise 0.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0
Offset: 1

Views

Author

Roger L. Bagula, Nov 05 2007

Keywords

Comments

Equivalently, a(n) = 0 if n-th prime is 1 mod 3, otherwise 1. - Wouter Meeussen, May 21 2019
Binary sequence based on the primes: play it at a slower tempo to appreciate the irregularities.

Crossrefs

Characteristic function of A133677.

Programs

  • Magma
    [(NthPrime(n) mod 3) eq 1 select 0 else 1: n in [1..200]]; // G. C. Greubel, May 21 2019
    
  • Maple
    a := n -> 1 - irem(modp(ithprime(n), 3), 2):
    seq(a(n), n = 1..105); # Peter Luschny, May 21 2019
  • Mathematica
    Table[If[Mod[Prime[n],3]== 1,0,1],{n,200}] (* Harvey P. Dale, May 21 2019 *)
  • PARI
    {a(n) = if(prime(n)%3==1, 0, 1)}; \\ G. C. Greubel, May 21 2019
    
  • Sage
    def a(n):
        if (mod(nth_prime(n), 3)==1): return 0
        else: return 1
    [a(n) for n in (1..200)] # G. C. Greubel, May 21 2019

Formula

a(n) = 1-A099618(n). - R. J. Mathar, Jun 06 2019
Sum_{k=1..n} a(k) ~ n / 2. - Amiram Eldar, Mar 14 2025

Extensions

Definition corrected by Harvey P. Dale, May 21 2019
Showing 1-3 of 3 results.