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.

A084686 Take n-th prime p(n), rewrite it with digits in decreasing order to get b(n), then a(n)=(b(n)-p(n))/9.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 6, 8, 1, 7, 0, 4, 0, 0, 3, 0, 4, 0, 1, 0, 0, 2, 0, 1, 0, 1, 23, 67, 89, 22, 66, 20, 66, 88, 88, 40, 66, 52, 66, 62, 88, 70, 80, 82, 86, 88, 0, 11, 55, 77, 11, 77, 20, 30, 55, 41, 77, 50, 55, 60, 61, 71, 47, 0, 2, 46, 0, 44, 44, 66, 20, 66, 44, 40, 66, 50, 66, 64, 1, 59, 58
Offset: 1

Views

Author

Zak Seidov, Jun 30 2003

Keywords

Examples

			a(7)=6 because p(7)=17, b(n)=71 and (71-17)/9=6.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,L,i;
      p:= ithprime(n);
      L:= sort(convert(p,base,10));
      (add(10^(i-1)*L[i],i=1..nops(L))-p)/9
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 26 2019
  • Mathematica
    Table[ -Prime[n]-FromDigits[Sort[ -IntegerDigits[Prime[n]]]], {n, 1, 100}]

Formula

a(n) = A283001(A000040(n)). - Robert Israel, Nov 26 2019