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 A200143 #27 Nov 12 2020 06:29:40 %S A200143 5,7,11,13,23,47,61,83,131,191,211,223,241,317,331,397,467,479,491, %T A200143 503,509,563,577,613,727,743,757,829,887,907,941,947,997,1009,1021, %U A200143 1039,1069,1087,1097,1109,1223,1229,1237,1381,1399,1423,1447,1523,1543,1549 %N A200143 Nodes of degree 1 in graphs of XOR connected primes in successive intervals [2^i+1,2^(i+1)-1], i>=1. %C A200143 The number used to produce the XOR couple is 2^i-2, with i sharing the index value of the initial interval and decremented in halved intervals down to 2. %H A200143 Alois P. Heinz, <a href="/A200143/b200143.txt">Table of n, a(n) for n = 1..10000</a> %e A200143 In the interval [17,31], i=4, the XOR couple number is 2^4-2=14. For half intervals it is 2^3-2 = 6, and the final application would be 2^2-2 = 2. All of the pairings can be represented as: %e A200143 |-------XOR 14-------| %e A200143 | |--------------| | %e A200143 | | |--------| | | %e A200143 | | | |--| | | | %e A200143 17 19 21 23 25 27 29 31 %e A200143 |-XOR 6-| |-XOR 6-| %e A200143 | |--| | | |--| | %e A200143 17 19 21 23 25 27 29 31 %e A200143 XOR XOR XOR XOR %e A200143 |2-| |2-| |2-| |2-| %e A200143 17 19 21 23 25 27 29 31 %e A200143 The prime XOR couples are (17,31), (19,29), (17,23), (17,19), (29,31) which produces the graph: %e A200143 17 19 23 29 31 %e A200143 17 0 1 1 0 1 19 %e A200143 19 1 0 0 1 0 / \ %e A200143 23 1 0 0 0 0 or 23~17~31~29 %e A200143 29 0 1 0 0 1 %e A200143 31 1 0 0 1 0 %e A200143 Therefore 23 is the only node of degree 1 in the interval. %p A200143 q:= (l, p, r)-> `if`(r-l=2, 0, `if`(isprime(l+r-p), 1, 0)+ %p A200143 `if`((l+r)/2>p, q(l, p, (l+r)/2), q((l+r)/2, p, r))): %p A200143 a:= proc(n) local p, l; %p A200143 p:= `if`(n=1, 1, a(n-1)); %p A200143 do p:= nextprime(p); %p A200143 l:= 2^ilog2(p); %p A200143 if q(l, p, l+l)=1 then break fi %p A200143 od; a(n):=p %p A200143 end: %p A200143 seq(a(n), n=1..60); # _Alois P. Heinz_, Nov 15 2011 %t A200143 q[l_, p_, r_] := q[l, p, r] = If[r - l == 2, 0, If[PrimeQ[l + r - p], 1, 0] + If[(l + r)/2 > p, q[l, p, (l + r)/2], q[(l + r)/2, p, r]]]; %t A200143 a[n_] := a[n] = Module[{p, l}, p = If[n==1, 1, a[n-1]]; While[True, p = NextPrime[p]; l = 2^Floor@Log[2, p]; If[q[l, p, l+l]==1, Break[]]]; p]; %t A200143 Array[a, 60] (* _Jean-François Alcover_, Nov 12 2020, after _Alois P. Heinz_ *) %Y A200143 Cf. A199824. %K A200143 nonn %O A200143 1,1 %A A200143 _Brad Clardy_, Nov 14 2011