OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..500
FORMULA
a(1) = 2, a(n) = a(n-1) + 2^A018252(n).
MATHEMATICA
With[{t=Select[Range[50], !PrimeQ[#]&]}, Accumulate[2^t]] (* Harvey P. Dale, Feb 14 2023 *)
PROG
(PARI) a(n) = my(s = 0, k = 1); while(n, if(!isprime(k), s += 2^k; n--); k++); return(s)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
David Lazar (lazar6(AT)illinois.edu), Apr 19 2010
STATUS
approved