login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A166745
a(n) is the concatenation, in ascending order, of the set of digits 1,2,4,8 whose sum equals the n-th prime using a minimal number of digits.
1
2, 12, 14, 124, 128, 148, 188, 1288, 12488, 14888, 124888, 148888, 188888, 1288888, 12488888, 14888888, 128888888, 148888888, 1288888888, 12488888888, 1888888888, 124888888888, 128888888888, 188888888888, 1888888888888
OFFSET
1,1
MAPLE
A166745 := proc(n) local p, d; p := ithprime(n) ; d := [] ; for e from 3 to 0 by -1 do r := floor(p/2^e) ; if r > 0 then d := [op(d), seq(2^e, i=1..r)] ; p := p mod (2^e) ; fi; end do ; add(op(p, d)*10^(p-1), p=1..nops(d)) ; end: seq(A166745(n), n=1..80) ; # R. J. Mathar, Oct 24 2009
CROSSREFS
Sequence in context: A108969 A269130 A265485 * A352504 A262094 A200183
KEYWORD
nonn,base
AUTHOR
Paul Curtz, Oct 21 2009
EXTENSIONS
Edited (but not checked) by N. J. A. Sloane, Oct 22 2009
More terms from R. J. Mathar, Oct 24 2009
Name edited by Jon E. Schoenfield, May 09 2019
STATUS
approved