Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A166747
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A166747 Numbers with n digits from the set {1,2,4}, requiring a non-decreasing sequence of digits and a digits sum of A008578(n). +0
1
1, 11, 111, 1112, 11122, 122222, 1222222, 12222224, 122222224, 1222222244, 12222224444, 122222224444, 1222222444444, 12222224444444, 122222224444444, 1222222244444444, 12222224444444444, 122222444444444444, 1222222444444444444, 12222244444444444444 (list; graph; listen)
OFFSET

1,2

COMMENT

Or: a partitioning of p=A008578(n) into n parts, each part an element of {1,2,4}.

The representation is often not unique: p=11 could be represented by 111224 or 122222, p=13 by 1111144 or 1112224 or 1222222, p=17 by 11111444 or 11122244 or 12222224. a(n) selects the representation with the minimum number of 4's. [ R. J. Mathar, Oct 25 2009]

MAPLE

A008578 := proc(n) if n = 1 then 1; else ithprime(n-1) ; fi; end:

A166747 := proc(n) local p, n1, n2, n4, i ; p := A008578(n) ; for n4 from 0 to n do n2 := p-n-3*n4 ; n1 := n-n2-n4 ; if n2 >= 0 and n1 >= 0 then a := 0 ; for i from 1 to n1 do a := 10*a+1 ; od: for i from 1 to n2 do a := 10*a+2 ; od: for i from 1 to n4 do a := 10*a+4 ; od: return a ; end if: end do: end:

seq(A166747(n), n=1..20) ; # R. J. Mathar, Oct 25 2009

CROSSREFS

Cf. A134732.

Sequence in context: A078191 A097115 A134732 this_sequence A015456 A097177 A136982

Adjacent sequences: A166744 A166745 A166746 this_sequence A166748 A166749 A166750

KEYWORD

nonn,base

AUTHOR

Paul Curtz (bpcrtz(AT)free.fr), Oct 21 2009

EXTENSIONS

Edited by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Oct 25 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research