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.

A088490 a(n) is the absolute value of p minus A004086(p), where (p-2,p) is the n-th pair of twin primes.

Original entry on oeis.org

0, 0, 18, 72, 18, 9, 45, 36, 198, 792, 792, 0, 0, 198, 792, 693, 99, 99, 99, 0, 594, 297, 99, 99, 198, 396, 495, 297, 297, 495, 693, 495, 99, 99, 495, 180, 2268, 450, 2538, 2808, 2358, 90, 8442, 630, 1728, 90, 7812, 2088, 2358, 8352, 7452, 360
Offset: 1

Views

Author

Cino Hilliard, Nov 09 2003

Keywords

Comments

9 divides each term.

Examples

			The 4th pair of twin primes is (17,19). a(4) then is the absolute value of 19 - 91, which is 72.
		

Programs

  • Mathematica
    a = {}; For[n = 1, n < 275, n++, If[Prime[n + 1] == Prime[n] + 2, AppendTo[a, Abs[Prime[n + 1] - FromDigits[Reverse[IntegerDigits[Prime[n + 1]]]]]]]]; a
  • PARI
    revdifftp2(n) = { forprime(x=1,n, if(isprime(x+2), a=vector(x); x1=x+2; z=0; ln=length(Str(x1)); for(y=1,ln, a[y] = x1%10; x1=floor(x1/10); ); for(y=1,ln, z += a[y]*10^(ln-y); ); print1(abs(z-(x+2))" "); ) ) }

Extensions

Edited by Stefan Steinerberger, Jul 22 2007