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.

This page as a plain text file.
%I A084686 #12 Nov 26 2019 20:00:49
%S A084686 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,
%T A084686 20,66,88,88,40,66,52,66,62,88,70,80,82,86,88,0,11,55,77,11,77,20,30,
%U A084686 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
%N 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.
%H A084686 Robert Israel, <a href="/A084686/b084686.txt">Table of n, a(n) for n = 1..10000</a>
%F A084686 a(n) = A283001(A000040(n)). - _Robert Israel_, Nov 26 2019
%e A084686 a(7)=6 because p(7)=17, b(n)=71 and (71-17)/9=6.
%p A084686 f:= proc(n) local p,L,i;
%p A084686   p:= ithprime(n);
%p A084686   L:= sort(convert(p,base,10));
%p A084686   (add(10^(i-1)*L[i],i=1..nops(L))-p)/9
%p A084686 end proc:
%p A084686 map(f, [$1..100]); # _Robert Israel_, Nov 26 2019
%t A084686 Table[ -Prime[n]-FromDigits[Sort[ -IntegerDigits[Prime[n]]]], {n, 1, 100}]
%Y A084686 Cf. A040164, A085307.
%K A084686 easy,nonn,base,look
%O A084686 1,6
%A A084686 _Zak Seidov_, Jun 30 2003