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 A164292 #27 Jan 04 2025 18:29:31 %S A164292 0,0,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0, %T A164292 0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0, %U A164292 0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0 %N A164292 Binary sequence identifying the twin primes (characteristic function of twin primes: 1 if n is a twin prime else 0). %C A164292 Similar to prime binary digit sequence A010051. %C A164292 In decimal notation A164292=0.1646823906345389353962381... %C A164292 See also A164293 (similar to prime decimal sequence A051006). %C A164292 a(A001097(n))=1; a(A001359(n))=1; a(A006512(n))=1. - _Reinhard Zumkeller_, Mar 29 2010 %C A164292 Characteristic function of A001097. - _Georg Fischer_, Aug 04 2021 %H A164292 Reinhard Zumkeller, <a href="/A164292/b164292.txt">Table of n, a(n) for n = 1..10000</a> %H A164292 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> [From _Reinhard Zumkeller_, Mar 29 2010] %F A164292 a(n) = A057427(A010051(n)*(A010051(n-2)+A010051(n+2))), for n>2. - _Reinhard Zumkeller_, Mar 29 2010 %F A164292 a(n) = c(n) * ceiling(( c(n+2) + c(n-2) )/2), where c is the prime characteristic. - _Wesley Ivan Hurt_, Jan 31 2014 %t A164292 Table[(PrimePi[n] - PrimePi[n - 1]) * Ceiling[(PrimePi[n + 2] - PrimePi[n + 1] + PrimePi[n - 2] - PrimePi[n - 3])/2], {n, 100}] (* _Wesley Ivan Hurt_, Jan 31 2014 *) %t A164292 Table[If[PrimeQ[n]&&AnyTrue[n+{2,-2},PrimeQ],1,0],{n,120}] (* _Harvey P. Dale_, Jan 04 2025 *) %o A164292 (Haskell) %o A164292 a164292 1 = 0 %o A164292 a164292 2 = 0 %o A164292 a164292 n = signum (a010051' n * (a010051' (n - 2) + a010051' (n + 2))) %o A164292 -- _Reinhard Zumkeller_, Feb 03 2014 %Y A164292 Cf. A001097, A010051, A051006, A057427, A129950, A164293. %K A164292 nonn %O A164292 1,1 %A A164292 _Carlos Alves_, Aug 12 2009