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.

A065026 a(1) = 1; for n>1, a(n) = smallest number that is not a sum or product of any subset of the numbers a(1) to a(n-1).

Original entry on oeis.org

1, 2, 4, 9, 17, 25, 59, 67, 176, 226, 578, 628, 1340, 1876, 4472, 5728, 13952, 17704, 43112, 54568, 133088, 168496, 410720, 519856, 1267568, 1604560, 3911840, 4951552, 12072512, 15281632, 37257248, 47160352, 114980864, 145544128, 354845696, 449166400, 1095100352, 1386188608
Offset: 1

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Nov 02 2001

Keywords

Examples

			a(4) = 9 because the possible sums and products of one or more terms from a(1), a(2), a(3) are 1, 2, 4, 1+2, 1+4, 2+4, 1+2+4, 1, 2, 4, 1*2, 1*4, 2*4, 1*2*4 = 1, 2, 4, 3, 5, 6, 7, 1, 2, 4, 2, 4, 8, 8. The smallest missing number is 9.
		

Programs

  • Mathematica
    (* This program is not efficient for a large number of terms *) a[1] = 1; a[n_] := a[n] = For[s = Subsets[Array[a, n-1]]; sums = Plus @@@ s; prods = Times @@@ s; k = a[n-1]+1, True, k++, If[FreeQ[sums, k], If[FreeQ[prods, k],  Print["a(", n, ") = ", k ]; Return[k]]]]; Array[a, 20] (* Jean-François Alcover, May 26 2015 *)

Formula

Conjectures from Colin Barker, Jun 19 2019: (Start)
G.f.: x*(1 - x)*(1 + 3*x + 5*x^2 + 10*x^3 + 15*x^4 + 14*x^5 + 25*x^6 + 10*x^7 + 8*x^8 + 18*x^9 + 42*x^10 - 402*x^12 - 552*x^13 - 720*x^14 - 804*x^15) / (1 - 2*x^2 - 4*x^4 + 2*x^6).
a(n) = 2*a(n-2) + 4*a(n-4) - 2*a(n-6) for n>17.
(End)

Extensions

More terms from Jon E. Schoenfield, Jun 17 2007
a(35)-a(38) from Donovan Johnson, Jan 11 2011