login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068396 n-th prime minus its reversal. 4
0, 0, 0, 0, 0, -18, -54, -72, -9, -63, 18, -36, 27, 9, -27, 18, -36, 45, -9, 54, 36, -18, 45, -9, 18, 0, -198, -594, -792, -198, -594, 0, -594, -792, -792, 0, -594, -198, -594, -198, -792, 0, 0, -198, -594, -792, 99, -99, -495 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
a(n) = 0 for n in A075807. - Michel Marcus, Sep 27 2017
All terms are divisible by 9. - Zak Seidov, Jun 05 2021
LINKS
FORMULA
a(n) = A000040(n) - A004087(n).
a(n) = A056965(A000040(n)). - Michel Marcus, Sep 27 2017
EXAMPLE
a(10) = 29 - 92 = -63;
a(20) = 71 - 17 = 54.
MATHEMATICA
#-IntegerReverse[#]& /@ Prime[Range[50]] (* Harvey P. Dale, Dec 20 2012 *)
PROG
(Haskell)
a068396 n = p - a004086 p where p = a000040 n
-- Reinhard Zumkeller, Feb 04 2014
(PARI) a(n) = prime(n) - fromdigits(Vecrev(digits(prime(n)))); \\ Michel Marcus, Sep 27 2017
(Python)
from sympy import prime
def a(n): pn = prime(n); return pn - int(str(pn)[::-1])
print([a(n) for n in range(1, 50)]) # Michael S. Branicky, Jun 05 2021
CROSSREFS
Sequence in context: A346756 A096011 A176026 * A205874 A044120 A056808
KEYWORD
sign,base,nice,look
AUTHOR
Reinhard Zumkeller, Mar 08 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 2 01:29 EST 2024. Contains 370447 sequences. (Running on oeis4.)