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 A265326 #62 Sep 26 2019 11:03:13 %S A265326 1,0,0,0,-2,2,0,-6,-6,6,0,-4,4,-10,-14,10,4,14,-30,-42,0,-42,-18,12, %T A265326 30,18,-12,0,18,42,0,-62,-8,-70,-20,-82,-28,-34,-62,-8,-26,8,-62,62, %U A265326 34,-28,8,-28,28,62,82,-8,98,28,0,-186,-84,-210,-60 %N A265326 n-th prime minus its binary reversal. %C A265326 a(n) = 0 iff A000040(n) is in A016041. - _Altug Alkan_, Dec 07 2015 %C A265326 The graph consists of a succession of parallelograms. The parallelograms end when there is a long run of mostly positive terms followed by a long run of mostly negative terms. The places where the successive parallelograms end are the primes just before a power of 2: 3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, ..., which are terms with indices 2, 4, 6, 11, 18, 31, 54, 97, 172, 309, 564, 1028, 1900, 3512, 6542, 12251, 23000, 43390, 82025, ... (see A014234 and A007053). - _N. J. A. Sloane_, May 29 2016 %H A265326 N. J. A. Sloane, <a href="/A265326/b265326.txt">Table of n, a(n) for n = 1..23000</a>, May 29 2016 [First 10000 terms from _Robert Israel_] %H A265326 Rémy Sigrist, <a href="/A265326/a265326.png">Colored scatterplot of the first 82025 terms (corresponding to the prime numbers < 2^20)</a> (where the color is function of A000040(n) mod 8) %H A265326 N. J. A. Sloane, <a href="/A265326/a265326.txt">Table of n, a(n) for n = 1..78498</a> %H A265326 N. J. A. Sloane and Brady Haran, <a href="https://www.youtube.com/watch?v=pAMgUB51XZA&t=0s">Amazing Graphs</a>, Numberphile video (2019) %F A265326 a(n) = A000040(n) - A098957(n). %F A265326 a(n) = A055945(A000040(n)). - _Michel Marcus_, Dec 08 2015 %e A265326 n=5: prime(5) = 11_10 = 1011_2, reversing gives 1101_2 = 13_10, so a(5) = 11-13 = -2. %p A265326 revdigs:= proc(n) local L, j; %p A265326 L:= convert(n,base,2); %p A265326 add(L[-j]*2^(j-1),j=1..nops(L)) %p A265326 end proc: %p A265326 map(t -> t - revdigs(t), select(isprime, [2,seq(i,i=3..1000,2)])); # _Robert Israel_, Dec 08 2015 %t A265326 Table[# - FromDigits[Reverse@ IntegerDigits[#, 2], 2] &@ Prime@ n, {n, 60}] (* _Michael De Vlieger_, Dec 09 2015 *) %o A265326 (PARI) a098957(n) = my(v=binary(prime(n)), s); forstep(i=#v, 1, -1, s+=s+v[i]); s %o A265326 a(n) = prime(n) - a098957(n); \\ _Altug Alkan_, Dec 07 2015 %Y A265326 Cf. A055945, A068396, A098957, A007053, A014234. %K A265326 sign,base,look %O A265326 1,5 %A A265326 _Max Barrentine_, Dec 07 2015