OFFSET
1,2
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = (2^phi(n) - 1)*2^omega(n), where omega(n) is the number of distinct prime factors of n.
EXAMPLE
There are four subsets of {1, 2}: {1, 2}, {1}, {2}, and {}. There are only finitely many primes in {2} or {} mod 2, leaving primes congruent to {1} (the odd primes) and {1, 2} (all primes). Thus a(2) = 2.
MATHEMATICA
Table[(2^EulerPhi[n] - 1) 2^PrimeNu[n], {n, 40}] (* Alonso del Arte, Dec 10 2012 *)
PROG
(PARI) a(n)=(2^eulerphi(n)-1)*2^omega(n) \\ Charles R Greathouse IV, Dec 10 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Charles R Greathouse IV, Dec 10 2012
STATUS
approved