OFFSET
1,1
COMMENTS
Equivalently, the number of subsets of {1,2,...,n} such that the product of the elements is square, where the empty set is defined to have a product of 1. - Peter Kagey, Nov 18 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..3853
FORMULA
EXAMPLE
a(6)=8 subsets of {1,2,3,4,5,6} contain no prime: {1,4,6}, {4,6}, {1,6}, {1,4}, {6}, {4}, {1} and the empty set.
a(7) = 8 as 2^(7 - PrimePi(7)) = 2^(7-4) = 8.
MAPLE
MATHEMATICA
Table[2^(n - PrimePi[n]), {n, 50}] (* Wesley Ivan Hurt, Nov 18 2017 *)
PROG
(PARI) a(n)=2^(n-primepi(n)) \\ Charles R Greathouse IV, Apr 09 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Nov 12 2003
STATUS
approved