OFFSET
1,1
COMMENTS
For n>2, a(n)-a(n+1)=2 iff prime(n) and prime(n+1) are twin primes; e.g., a(3)-a(4)=10-8=2 and prime(3)=5 and prime(4)=7 are twin primes.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
p:= 1:
for n from 1 to 100 do
p:= nextprime(p);
A[n]:= p + (p mod 6);
od:
seq(A[n], n=1..100); # Robert Israel, Jul 18 2018
MATHEMATICA
Table[(p=Prime[n])+Mod[p, 6], {n, 100}]
PROG
(PARI) a(n) = apply(x->(x + x%6), prime(n)); \\ Michel Marcus, Oct 27 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 19 2015
STATUS
approved