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 A214588 #26 Jan 09 2025 15:43:32 %S A214588 2,3,5,7,17,19,23,37,53,67,71,83,97,101,103,113,131,149,151,163,167, %T A214588 179,181,193,197,199,211,227,229,241,257,263,277,293,307,311,337,353, %U A214588 359,373,389,401,419,421,433,439,449,467,487,499,503,547,563,577,593,599 %N A214588 Primes p such that p mod 16 < 8. %C A214588 Original definition: Primes p such that p XOR 8 = p + 8. %C A214588 This is an example of a class of primes p such that p XOR n = p + n. %C A214588 A002144 is the case where n=2, there are no cases where n=3, in A033203 n=4, 2 is the only p for n=5, in A007519 n=6, there are no cases where n=7. This sequence occurs when n=8. %C A214588 In general if n is an odd number in A004767 there are no primes, if n is an odd number in A016813, then 2 is the only prime, and if n is an even number (A005843) there is a set of primes that satisfies the relationship p XOR n = p + n. %H A214588 Indranil Ghosh, <a href="/A214588/b214588.txt">Table of n, a(n) for n = 1..10000</a> %e A214588 103 is in the sequence because 103 mod 16 is 7 which is less than 8. - _Indranil Ghosh_, Jan 18 2017 %t A214588 Select[Prime[Range[200]],Mod[#,16]<8&] (* _Harvey P. Dale_, Jan 11 2018 *) %o A214588 (Magma) %o A214588 XOR := func<a, b | Seqint([ (adigs[i] + bdigs[i]) mod 2 : i in [1..n]], 2) %o A214588 where adigs := Intseq(a, 2, n) %o A214588 where bdigs := Intseq(b, 2, n) %o A214588 where n := 1 + Ilog2(Max([a, b, 1]))>; %o A214588 for n in [2 .. 1000] do %o A214588 if IsPrime(n) then pn:=n; %o A214588 if (XOR(pn,8) eq pn+8) then pn; end if; %o A214588 end if; %o A214588 end for; %o A214588 (PARI) is_A214588(p)={ !bittest(p,3) & isprime(p) } \\ _M. F. Hasler_, Jul 24 2012 %o A214588 (PARI) forprime(p=1,699, bittest(p,3) || print1(p",")) \\ _M. F. Hasler_, Jul 24 2012 %o A214588 (Python) %o A214588 from sympy import isprime %o A214588 i=1 %o A214588 while i<=600: %o A214588 if isprime(i)==True and (i%16)<8: %o A214588 print(i, end=", ") %o A214588 i+=1 # _Indranil Ghosh_, Jan 18 2017 %Y A214588 Cf. A002144, A033203, A007519, A004767, A016813, A005843. %K A214588 nonn %O A214588 1,1 %A A214588 _Brad Clardy_, Jul 22 2012