login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A093712 Repeatedly subtract largest prime from n until either a prime or 1 remains. 0
1, 2, 3, 31, 5, 51, 7, 71, 72, 73, 11, 111, 13, 131, 132, 133, 17, 171, 19, 191, 192, 193, 23, 231, 232, 233, 2331, 235, 29, 291, 31, 311, 312, 313, 3131, 315, 37, 371, 372, 373, 41, 411, 43, 431, 432, 433, 47, 471, 472, 473, 4731, 475, 53, 531, 532, 533, 5331, 535 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The representation as strings of primes is similar to the Zeckendorf expansion, A035514's strings of Fibonacci numbers.

LINKS

Table of n, a(n) for n=1..58.

EXAMPLE

a(8) = 71 because 8 = 7 + 1.

PROG

(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

CROSSREFS

Cf. A000040, A035514.

Sequence in context: A088115 A230627 A048986 * A035514 A114009 A143665

Adjacent sequences:  A093709 A093710 A093711 * A093713 A093714 A093715

KEYWORD

easy,nonn,base

AUTHOR

Michael Joseph Halm, May 17 2004

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified February 23 07:28 EST 2018. Contains 299473 sequences. (Running on oeis4.)