OFFSET
0,3
COMMENTS
Differences between the two adjacent prime terms (i.e. between two primes in the blocks of length two) are divisible by 4 (checked up to n=10^8).
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,1,-2,1).
FORMULA
G.f.: (x^6-x^5-x^4-2x^2-x)/((x-1)^3*(x^4+x^3+x^2+x+1)).
a(n) = ceiling(((n*(n+2)+(n+1)*ceiling(n))*(n-1))/ (2*ceiling(n)+ceiling(ceiling(n)+n)+n)+n) for n>0.
a(n) = floor(A139570(n)/5). - Michel Marcus, Mar 03 2016
MATHEMATICA
Table[Floor[2 n (n + 3)/5], {n, 0, 1000}]
LinearRecurrence[{2, -1, 0, 0, 1, -2, 1}, {0, 1, 4, 7, 11, 16, 21}, 100]
CoefficientList[Series[(x^6 - x^5 - x^4 - 2 x^2-x)/((x - 1)^3 (x^4 + x^3 + x^2 + x + 1)), {x, 0, 100}], x]
PROG
(PARI) a(n) = 2*n*(n+3)\5; \\ Michel Marcus, Mar 03 2016
(Magma) [n + n*(2*n+1) div 5: n in [0..60]]; // Bruno Berselli, Mar 03 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mikk Heidemaa, Feb 19 2016
STATUS
approved