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 A118956 #14 Feb 23 2025 04:52:14 %S A118956 1,2,3,4,5,8,9,12,14,16,17,20,22,24,25,26,28,30,31,32,33,36,38,40,41, %T A118956 42,44,46,47,48,50,52,53,54,56,57,58,59,60,62,64,65,68,70,72,73,74,76, %U A118956 78,79,80,82,84,85,86,88,89,90,91,92,94,96,97,98,99,100,102,103,104,106 %N A118956 Numbers that cannot be written as 2^k + p with p prime < 2^k. %C A118956 Complement of A118957. %C A118956 A118954 is a subsequence. %F A118956 A118952(a(n)) = 0. %t A118956 nn=15;Complement[Range[nn^2],Flatten[Table[c=2^n;c+Prime[ Range[ PrimePi[ c]]],{n,2,nn}]]] (* _Harvey P. Dale_, Sep 14 2012 *) %o A118956 (Python) %o A118956 from sympy import primepi %o A118956 def A118956(n): %o A118956 def f(x): return int(n+sum(primepi(min(x-(m:=1<<k),m-1)) for k in range(x.bit_length()))) %o A118956 m, k = n, f(n) %o A118956 while m != k: m, k = k, f(k) %o A118956 return m # _Chai Wah Wu_, Feb 23 2025 %Y A118956 Cf. A118952, A118954, A118957. %K A118956 nonn %O A118956 1,2 %A A118956 _Reinhard Zumkeller_, May 07 2006