# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a100923 Showing 1-1 of 1 %I A100923 #4 Aug 04 2021 13:53:56 %S A100923 1,1,1,0,1,0,1,0,0,1,0,1,0,0,0,0,1,1,0,0,0,0,1,0,1,0,0,0,0,1,0,1,1,0, %T A100923 0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0, %U A100923 0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0 %N A100923 a(n) = 1 iff 6*n+1 and 6*n-1 are both prime numbers (0 otherwise). %C A100923 Characteristic function of A002822. - _Georg Fischer_, Aug 04 2021 %e A100923 a(3) = 1 because 6*3-1=17 and 6*3+1=19 are both prime. %e A100923 a(4) = 0 because 6*4-1=23 is prime and 6*4+1=25 is not prime. %e A100923 a(20) = 0 because 6*20-1=119 and 6*20+1=121 are both not prime. %t A100923 Table[If[And[PrimeQ[6*k - 1], PrimeQ[6*k + 1]], 1, 0], {k, 1, 110}] %Y A100923 Cf. A000040, A002822, A100924, A100925. %K A100923 nonn %O A100923 1,1 %A A100923 Joseph Biberstine (jrbibers(AT)indiana.edu), Nov 22 2004 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE