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-4 of 4 results.

A211317 a(n) = A211316(2n+1).

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 4, 6, 6, 6, 7, 8, 10, 9, 10, 10, 12, 14, 12, 13, 14, 14, 18, 16, 16, 18, 18, 22, 19, 20, 20, 21, 26, 22, 24, 24, 24, 30, 28, 26, 27, 28, 34, 30, 30, 30, 31, 38, 32, 36, 34, 34, 42, 36, 36, 37, 38, 46, 39, 42, 44, 42, 50, 42, 43, 44, 44, 54, 46, 46, 48, 52, 58, 49, 50
Offset: 0

Views

Author

N. J. A. Sloane, Apr 24 2012

Keywords

Comments

Considering only the odd-indexed terms of A211316 is motivated by the fact that A211316(2n) = n, so the idea is to skip these "uninteresting" terms. - M. F. Hasler, Jun 30 2025

Crossrefs

Cf. A211316.

Programs

Extensions

Extended to a(0) = 0 and more terms from M. F. Hasler, Jun 30 2025

A289435 The arithmetic function v_3(n,3).

Original entry on oeis.org

1, 0, 2, 2, 3, 2, 4, 2, 5, 4, 6, 4, 7, 6, 8, 6, 9, 6, 10, 6, 11, 8, 12, 10, 13, 8, 14, 10, 15, 10, 16, 12, 17, 14, 18, 12, 19, 12, 20, 14, 21, 14, 22, 18, 23, 16, 24, 16, 25, 18, 26, 18, 27, 22, 28, 18, 29, 20, 30, 20, 31, 20, 32, 26, 33, 22, 34, 24, 35
Offset: 2

Views

Author

N. J. A. Sloane, Jul 06 2017

Keywords

References

  • J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).

Crossrefs

Cf. A211316 (equals v_1(n,3)).

Programs

  • Maple
    a:= n-> n*max(seq((floor((d-1-igcd(d, 3))/3)+1)
            /d, d=numtheory[divisors](n))):
    seq(a(n), n=2..100);  # Alois P. Heinz, Jul 07 2017
  • Mathematica
    a[n_]:=n*Max[Table[(Floor[(d - 1 - GCD[d, 3])/3] + 1)/d, {d, Divisors[n]}]]; Table[a[n], {n, 2, 100}] (* Indranil Ghosh, Jul 08 2017 *)
  • PARI
    v(g,n,h)={my(t=0);fordiv(n,d,t=max(t,((d-1-gcd(d,g))\h + 1)*(n/d)));t}
    a(n)=v(3,n,3); \\ Andrew Howroyd, Jul 07 2017
    
  • Python
    from sympy import divisors, floor, gcd
    def a(n): return n*max((floor((d - 1 - gcd(d, 3))/3) + 1)/d for d in divisors(n))
    print([a(n) for n in range(2, 101)]) # Indranil Ghosh, Jul 08 2017

Extensions

a(41)-a(70) from Andrew Howroyd, Jul 07 2017

A007865 Number of sum-free subsets of {1, ..., n}.

Original entry on oeis.org

1, 2, 3, 6, 9, 16, 24, 42, 61, 108, 151, 253, 369, 607, 847, 1400, 1954, 3139, 4398, 6976, 9583, 15456, 20982, 32816, 45417, 70109, 94499, 148234, 200768, 308213, 415543, 634270, 849877, 1311244, 1739022, 2630061, 3540355, 5344961, 7051789, 10747207, 14158720, 21295570, 28188520
Offset: 0

Views

Author

Keywords

Comments

More precisely, subsets of {1,...,n} containing no solutions of x+y=z.
There are two proofs that a(n) is 2^{n/2}(1+o(1)), as Paul Erdős and I conjectured.
In sumset notation, number of subsets A of {1,...,n} such that the intersection of A and 2A is empty. Using the Mathematica program, all such subsets can be printed. - T. D. Noe, Apr 20 2004
The Sapozhenko paper has many additional references.
If this sequence counts sum-free sets, then A326083 counts sum-closed sets, which is different from sum-full sets (A093971). - Gus Wiseman, Jul 08 2019

Examples

			{} has one sum-free subset, the empty set, so a(0)=1.
{1} has two sum-free subsets, {} and {1}, so a(1)=2.
a(2) = 3: 0,1,2.
a(3) = 6: 0,1,2,3,13,23.
a(4) = 9: 0,1,2,3,4,13,14,23,34.
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 180-183.

Crossrefs

See A085489 for another version.
Cf. A211316, A211317, A093970, A093971 (number of sum-full subsets of 1..n).

Programs

  • Maple
    S3S:= {{}}: a[0]:= 1: for n from 1 to 35 do S3S:= S3S union map(t -> t union {n}, select(t -> (t intersect map(q -> n-q,t)={}),S3S)); a[n]:= nops(S3S) od: seq(a[n],n=0..35); # Code for computing (the number of) sum-free subsets of {1, ..., n} - Robert Israel
  • Mathematica
    SumFreeSet[ 0 ] = {{}}; SumFreeSet[ n_ ] := SumFreeSet[ n ] = Union[ SumFreeSet[ n - 1 ], Union[ #, {n} ] & /@ Select[ SumFreeSet[ n - 1 ], Intersection[ #, n - # ] == {} & ] ] As a check, enter Length /@ SumFreeSet /@ Range[ 0, 30 ] Alternatively, use NestList. n = 0; Length /@ NestList[ (++n; Union[ #, Union[ #, {n} ] & /@ Select[ #, Intersection[ #, n - # ] == {} & ] ]) &, {{}}, 30 ] (* from Paul Abbott, based on Robert Israel's Maple code *)
    Timing[ n = 0; Last[ Reap[ Nest[ (++n; Sow[ Length[ # ] ]; Union[ #, Union[ #, {n} ]& /@ Select[ #, Intersection[ #, n - # ] == {} & ] ]) &, {{}}, 36 ] ] ] ] (* improved code from Paul Abbott, Nov 24 2005 *)
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Total/@Tuples[#,2]]=={}&]],{n,1,10}] (* Gus Wiseman, Jul 08 2019 *)
  • PARI
    \\ good only for n <= 25:
    sumfree(v) = {for(i=1, #v, for (j=1, i, if (setsearch(v, v[i]+v[j]), return (0)););); return (1);}
    a(n) = {my(nb = 0); forsubset(n, s, if (sumfree(Set(s)), nb++);); nb;} \\ Michel Marcus, Nov 08 2020

Formula

a(n) = A050291(n)-A088810(n) = A085489(n)-A088811(n) = A050291(n)+A085489(n)-A088813(n). - Reinhard Zumkeller, Oct 19 2003

Extensions

More terms from John W. Layman, Oct 21 2000
Extended through a(35) by Robert Israel, Nov 16 2005
a(36)-a(37) from Alec Mihailovs (alec(AT)mihailovs.com) (using Robert Israel's procedure), Nov 16 2005
a(38) from Eric W. Weisstein, Nov 17 2005
a(39)-a(42) from Eric W. Weisstein, Nov 28 2005, using Paul Abbott's Mathematica code

A290636 The arithmetic function v_3(n,4).

Original entry on oeis.org

1, 0, 2, 1, 3, 2, 4, 2, 5, 3, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 6, 12, 6, 13, 6, 14, 7, 15, 8, 16, 9, 17, 10, 18, 9, 19, 9, 20, 10, 21, 11, 22, 11, 23, 12, 24, 14, 25, 12, 26, 13, 27, 15, 28, 15, 29, 15, 30, 15, 31, 18, 32, 16, 33, 17, 34, 18, 35
Offset: 2

Views

Author

Robert Price, Aug 13 2017

Keywords

References

  • J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).

Crossrefs

Cf. A211316 (equals v_1(n,3)).
Cf. A024698.

Programs

  • Maple
    f:= n -> max(map(t -> (floor((t - 1 - igcd(t, 3))/4) + 1)*n/t, numtheory:-divisors(n))):
    map(f, [$2..100]); # Robert Israel, Aug 16 2017
  • Mathematica
    v[g_, n_, h_] := (d = Divisors[n]; Max[(Floor[(d - 1 - GCD[d, g])/h] + 1)*n/d]); Table[v[3, n, 4], {n, 2, 70}]

Formula

For n >= 3, f(prime(n)) = A024698(n-1). - Robert Israel, Aug 16 2017
Showing 1-4 of 4 results.