OFFSET
1,1
COMMENTS
2, 3 and numbers of the form 6m +- 1.
Apart from first two terms, same as A007310.
Terms of this sequence (starting from the third term) are equal to the result of the expression sqrt(4!*(k+1) + 1) - but only when this expression yields integral values (that is when the parameter k takes values, which are terms of A144065). - Alexander R. Povolotsky, Sep 09 2008
For every integer n>2, n is in this sequence iff Product_{k=2..oo} 1/(1 - 1/k^n) = Product_{k=1..n} Gamma( 2 - (-1)^(k*(1 + 1/n)) ). - Federico Provvedi, Nov 07 2024
REFERENCES
Fred S. Roberts, Applied Combinatorics, Prentice-Hall, 1984, p. 256.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..2500
Ahmed Hamdy A. Diab, Sequence eliminating law (SEL) and the interval formulas of prime numbers, arXiv:2012.03052 [math.NT], 2020.
H. B. Meyer, Eratosthenes' sieve.
FORMULA
O.g.f.: x*(2 + x + x^3 + 2x^4)/((1+x)*(1-x)^2). - R. J. Mathar, May 23 2008
a(n) = (1/9)*(4*n^3 + 3*n^2 + 1 - Kronecker(-3,n+1)). - Ralf Stephan, Jun 01 2014
From Mikk Heidemaa, Oct 28 2017: (Start)
a(n) = floor((41/21 - (3 mod n))^(-3*n+5)) + 3*n - 4 (n > 0).
a(n+1) = 3*n - ((n mod 2)+1) mod n (n > 0). (End)
a(n+2) = 2*floor((3*n+1)/2) + 1 for n>=1; see (17) in Diab link. - Michel Marcus, Dec 14 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = (7-sqrt(3)*Pi)/6. - Amiram Eldar, Sep 22 2022
MATHEMATICA
max = 200; Complement[Range[2, max], 2Range[2, Ceiling[max/2]], 6Range[2, Ceiling[max/6]] + 3] (* Alonso del Arte, May 16 2014 *)
Prepend[Table[3*n - Mod[ Mod[n, 2] + 1, n], {n, 1, 999}], 2] (* Mikk Heidemaa, Nov 02 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 11 1999
EXTENSIONS
Name edited by Michel Marcus, Dec 14 2020
STATUS
approved