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.

A267573 a(n) = prime(n) + (prime(n) mod 4).

Original entry on oeis.org

4, 6, 6, 10, 14, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 62, 62, 70, 74, 74, 82, 86, 90, 98, 102, 106, 110, 110, 114, 130, 134, 138, 142, 150, 154, 158, 166, 170, 174, 182, 182, 194, 194, 198, 202, 214, 226, 230, 230, 234, 242, 242, 254, 258, 266, 270
Offset: 1

Views

Author

Emre APARI, Jan 17 2016

Keywords

Comments

The primes corresponding to the cases where a(n) = a(n+1) can be found in A071698. - Michel Marcus, Jan 17 2016

Examples

			p=19; 19 + (19 modulo 4) = 22.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n)+(NthPrime(n) mod 4): n in [1..100]]; // Vincenzo Librandi, Jan 17 2016
    
  • Maple
    A267573:=n->ithprime(n)+(ithprime(n) mod 4): seq(A267573(n), n=1..100); # Wesley Ivan Hurt, Jan 17 2016
  • Mathematica
    Table[Prime[n] + Mod[Prime[n], 4], {n, 60}] (* Vincenzo Librandi, Jan 17 2016 *)
    #+Mod[#,4]&/@Prime[Range[60]] (* Harvey P. Dale, Jun 12 2020 *)
  • PARI
    a(n) = prime(n) + (prime(n) % 4); \\ Michel Marcus, Jan 17 2016
    
  • PARI
    lista(nn) = forprime(p=2, nn, print1(p + p % 4, ", ")); \\ Altug Alkan, Jan 17 2016

Formula

a(n) = A000040(n) + A039702(n).
a(n) = A083220(prime(n)). - Michel Marcus, Jan 17 2016

Extensions

More terms from Vincenzo Librandi, Jan 17 2016