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.

A093712 Repeatedly subtract largest prime from n until either a prime or 1 remains.

This page as a plain text file.
%I A093712 #5 Oct 03 2013 09:31:24
%S A093712 1,2,3,31,5,51,7,71,72,73,11,111,13,131,132,133,17,171,19,191,192,193,
%T A093712 23,231,232,233,2331,235,29,291,31,311,312,313,3131,315,37,371,372,
%U A093712 373,41,411,43,431,432,433,47,471,472,473,4731,475,53,531,532,533,5331,535
%N A093712 Repeatedly subtract largest prime from n until either a prime or 1 remains.
%C A093712 The representation as strings of primes is similar to the Zeckendorf expansion, A035514's strings of Fibonacci numbers.
%e A093712 a(8) = 71 because 8 = 7 + 1.
%o A093712 (PARI) a(n) = {lp = List(); while(n!= 1 && ! isprime(n), p = precprime(n-1); listput(lp, p); n -= p;); listput(lp, n); return (sum(i=1, #lp, 10^(#lp - i)*lp[i]));} \\ _Michel Marcus_, Jun 10 2013
%Y A093712 Cf. A000040, A035514.
%K A093712 easy,nonn,base
%O A093712 1,2
%A A093712 _Michael Joseph Halm_, May 17 2004