cp's OEIS Frontend

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.

A068396 n-th prime minus its reversal.

This page as a plain text file.
%I A068396 #32 Jun 07 2021 10:00:20
%S A068396 0,0,0,0,0,-18,-54,-72,-9,-63,18,-36,27,9,-27,18,-36,45,-9,54,36,-18,
%T A068396 45,-9,18,0,-198,-594,-792,-198,-594,0,-594,-792,-792,0,-594,-198,
%U A068396 -594,-198,-792,0,0,-198,-594,-792,99,-99,-495
%N A068396 n-th prime minus its reversal.
%C A068396 a(n) = 0 for n in A075807. - _Michel Marcus_, Sep 27 2017
%C A068396 All terms are divisible by 9. - _Zak Seidov_, Jun 05 2021
%H A068396 Reinhard Zumkeller, <a href="/A068396/b068396.txt">Table of n, a(n) for n = 1..10000</a>
%F A068396 a(n) = A000040(n) - A004087(n).
%F A068396 a(n) = A056965(A000040(n)). - _Michel Marcus_, Sep 27 2017
%e A068396 a(10) = 29 - 92 = -63;
%e A068396 a(20) = 71 - 17 = 54.
%t A068396 #-IntegerReverse[#]& /@ Prime[Range[50]] (* _Harvey P. Dale_, Dec 20 2012 *)
%o A068396 (Haskell)
%o A068396 a068396 n = p - a004086 p  where p = a000040 n
%o A068396 -- _Reinhard Zumkeller_, Feb 04 2014
%o A068396 (PARI) a(n) = prime(n) - fromdigits(Vecrev(digits(prime(n)))); \\ _Michel Marcus_, Sep 27 2017
%o A068396 (Python)
%o A068396 from sympy import prime
%o A068396 def a(n): pn = prime(n); return pn - int(str(pn)[::-1])
%o A068396 print([a(n) for n in range(1, 50)]) # _Michael S. Branicky_, Jun 05 2021
%Y A068396 Cf. A000040, A004086, A056965, A061227, A075807.
%K A068396 sign,base,nice,look
%O A068396 1,6
%A A068396 _Reinhard Zumkeller_, Mar 08 2002