OFFSET
1,1
COMMENTS
The primes corresponding to the cases where a(n) = a(n+1) can be found in A071698. - Michel Marcus, Jan 17 2016
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A083220(prime(n)). - Michel Marcus, Jan 17 2016
EXAMPLE
p=19; 19 + (19 modulo 4) = 22.
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 *)
PROG
(Magma) [NthPrime(n)+(NthPrime(n) mod 4): n in [1..100]]; // Vincenzo Librandi, Jan 17 2016
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emre APARI, Jan 17 2016
EXTENSIONS
More terms from Vincenzo Librandi, Jan 17 2016
STATUS
approved