Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A126326
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A126326 a(1) = 1; for n>1, a(n) = smallest number which is not a sum or product or power of any subset of the numbers a(1) to a(n-1). +0
1
1, 2, 5, 9, 13, 31, 35, 92, 118, 280, 516, 752, 1618, 1968, 5090, 6594, 15620, 19556, 48364, 61552 (list; graph; listen)
OFFSET

1,2

COMMENT

Analogue of A065026, with powers.

EXAMPLE

a(4) = 9 because the possible sums and products of a(1), a(2), a(3) are 1, 2, 5, 1+2, 1+5, 2+5, 1+2+5, 2*5, 2^2, 2^3, ..., 5^2, 5^3, ... = 1, 2, 4, 3, 4, 5, 6, 7, 8, 10, 16, 25, ... The smallest missing number is 9.

MAPLE

A126326 := proc(amax) local a, n, sumset, prodset, j, powset, aprev, newsumset, newprodset ; a := [1, 2] ; n := 3 ; sumset := {} ; prodset := {1} ; powset := {1} ; while n <= amax do aprev := op(-1, a) ; newsumset := sumset ; for j from 1 to nops(sumset) do if op(j, sumset)+aprev <= amax then newsumset := newsumset union { op(j, sumset)+aprev } ; fi ; od ; for j from 1 to nops(a)-1 do if op(j, a)+aprev <= amax then newsumset := newsumset union { op(j, a)+aprev } ; fi ; od ; sumset := newsumset ; newprodset := prodset ; for j from 1 to nops(prodset) do if op(j, prodset)*aprev <= amax then newprodset := newprodset union { op(j, prodset)*aprev } ; fi ; od ; for j from 1 to nops(a)-1 do if op(j, a)*aprev <= amax then newprodset := newprodset union { op(j, a)*aprev } ; fi ; od ; prodset := newprodset ; for j from 2 to floor(log(amax)/log(aprev)) do if aprev^j <= amax then powset := powset union { aprev^j } ; fi ; od ; while n in sumset or n in prodset or n in powset do n := n+1 ; od ; if n <= amax then a := [op(a), n] ; fi ; print(a) ; n := n+1 ; od ; RETURN(a) ; end: A126326(200000) ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 03 2007

CROSSREFS

Cf. A065026.

Sequence in context: A071705 A109094 A049753 this_sequence A070986 A074793 A161767

Adjacent sequences: A126323 A126324 A126325 this_sequence A126327 A126328 A126329

KEYWORD

easy,more,nonn

AUTHOR

Jonathan Vos Post (jvospost3(AT)gmail.com), Mar 11 2007

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 03 2007

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 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research