This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A176496 #10 Feb 14 2023 17:54:08 %S A176496 2,18,82,338,850,1874,5970,22354,55122,120658,382802,1431378,3528530, %T A176496 7722834,24500050,58054482,125163346,259381074,527816530,1601558354, %U A176496 5896525650,14486460242,31666329426,66026067794,134745544530,409623451474,959379265362,2058890893138 %N A176496 a(n) = Sum_{k=1..n} 2^nonprime(k). %H A176496 Andrew Howroyd, <a href="/A176496/b176496.txt">Table of n, a(n) for n = 1..500</a> %F A176496 a(1) = 2, a(n) = a(n-1) + 2^A018252(n). %e A176496 a(2) = 2 + 2^A018252(2) = 2 + 2^4 = 18 ; a(3) = 18 + 2^A018252(3) = 18 + 2^6 = 82. %t A176496 With[{t=Select[Range[50],!PrimeQ[#]&]},Accumulate[2^t]] (* _Harvey P. Dale_, Feb 14 2023 *) %o A176496 (PARI) a(n) = my(s = 0, k = 1); while(n, if(!isprime(k), s += 2^k; n--); k++); return(s) %Y A176496 Cf. A076793, A018252. %K A176496 easy,nonn %O A176496 1,1 %A A176496 David Lazar (lazar6(AT)illinois.edu), Apr 19 2010