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.

Showing 1-3 of 3 results.

A050296 Maximum cardinality of a strongly triple-free subset of {1, 2, ..., n}.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 15, 16, 16, 16, 16, 17, 18, 19, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 26, 27, 27, 28, 28, 29, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 39, 40, 41, 42, 42, 43, 43, 44
Offset: 1

Views

Author

Keywords

Comments

Computed using the following integer programming formulation, where the decision variable x[i] is 1 if i is a member of the strongly triple-free subset, 0 otherwise. Maximize sum {i in 1..n} x[i] subject to x[i] + x[3i] <= 1 for i in 1..n such that 3i in 1..n, x[i] + x[2i] <= 1 for i in 1..n such that 2i in 1..n, x[i] in {0,1} for i in 1..n. - Rob Pratt, Oct 25 2002
The problem can also be thought of as finding a maximum independent set in a graph with nodes 1..n and edges of the form (i,3i) and (i,2i). - Rob Pratt, Oct 25 2002

Examples

			a(9)=6 since there are three grid graphs, two with a single vertex {7}, {5} and the other with rows {1,3,9}, {2,6}, {4}, {8}. The adjacencies are eliminated by marking 2, 3, 8. - _Steven Finch_, Feb 26 2009
		

Crossrefs

A157282 is the weakly triple-free analog of this sequence. - Steven Finch, Feb 26 2009

Programs

  • Mathematica
    e[m_]:=(6*m+(-1)^m-3)/2; f[k_,n_,m_]:=1+Floor[FullSimplify[Log[n/3^k/e[m]]/Log[2]]]; g[n_,m_]:=Floor[FullSimplify[Log[n/e[m]]/Log[3]]]; peven[n_,m_]:=Sum[Quotient[f[k,n,m]+Mod[k+1,2],2],{k,0,g[n,m]}]; podd[n_,m_]:=Sum[Quotient[f[k,n,m]+Mod[k,2],2],{k,0,g[n,m]}]; p[n_]:=Sum[Max[peven[n,m],podd[n,m]],{m,1,Ceiling[n/3]}]; Table[p[n],{n,1,71}] (* Steven Finch, Feb 26 2009 *)

Extensions

More terms from Rob Pratt, Oct 25 2002

A068060 Number of subsets of {1, 2, ..., n} that do not contain a subset of the form {x, 2x, 3x}.

Original entry on oeis.org

1, 2, 4, 7, 14, 28, 50, 100, 200, 360, 720, 1440, 2560, 5120, 10240, 17920, 35840, 71680, 130816, 261632, 523264, 915712, 1831424, 3662848, 6516608, 13033216, 26066432, 46688768, 93377536, 186755072, 333491200, 666982400, 1333964800, 2334438400, 4668876800
Offset: 0

Views

Author

David Wasserman, Feb 14 2002

Keywords

Comments

Such subsets are called weakly triple-free sets. A050295 is the strongly triple-free analog of this sequence. - Steven Finch, Mar 02 2009

Examples

			a(6) = 50. There are 64 subsets of {1, 2, 3, 4, 5, 6}. We exclude the 8 that contain {1, 2, 3} and the 8 that contain {2, 4, 6}. We've double-counted the 2 that contain {1, 2, 3, 4, 6}. This yields 64 - 8 - 8 + 2 = 50.
		

Crossrefs

Cf. A050293.

Extensions

a(33)-a(34) from Alois P. Heinz, Jan 17 2019

A086316 Decimal expansion of estimate of the strongly triple-free set constant.

Original entry on oeis.org

6, 1, 3, 4, 7, 5, 2, 6, 9, 2, 0, 2, 2, 3, 4, 4, 1, 6, 0, 1, 8, 0, 4, 1, 6, 6, 3, 8
Offset: 0

Views

Author

Eric W. Weisstein, Jul 15 2003

Keywords

Examples

			0.613475269...
0.6134752692022344160180416638... - _Steven Finch_, Feb 25 2009
		

Crossrefs

Programs

  • Mathematica
    f[k_,n_]:=1+Floor[FullSimplify[Log[n/3^k]/Log[2]]]; g[n_]:=Floor[FullSimplify[Log[n]/Log[3]]]; peven[n_]:=Sum[Quotient[f[k,n]+Mod[k+1,2],2],{k,0,g[n]}]; podd[n_]:=Sum[Quotient[f[k,n]+Mod[k,2],2],{k,0,g[n]}]; p[n_]:=Max[peven[n],podd[n]]; v[1]=1;j=1;k=1;n=4001; For[k=2,k=n,k++,If[2*v[k-j]<3^j,v[k]=2*v[k-j],{v[k]=3^j,j++}]]; Sum[p[v[n]]*(1/v[n]-1/v[n+1]),{n,1,4000}]/3 (* Steven Finch, Feb 25 2009 *)

Extensions

More terms from Steven Finch, Feb 25 2009
Showing 1-3 of 3 results.