login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334893 Number of subsets of [n] avoiding 3-term arithmetic progressions and containing n if n>0. 3
1, 1, 2, 3, 6, 10, 17, 25, 41, 63, 109, 165, 262, 412, 643, 932, 1459, 2163, 3212, 4601, 6817, 9904, 14741, 20906, 30352, 43993, 63540, 89442, 132037, 187587, 266842, 378061, 535907, 751709, 1077809, 1499972, 2084027, 2951390, 4114165, 5651914, 7968177 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..80
Eric Weisstein's World of Mathematics, Nonaveraging Sequence
MAPLE
b:= proc(n, s) option remember; `if`(n<1, 1, b(n-1, s)+
`if`(ormap(j-> 2*j-n in s, s), 0, b(n-1, s union {n})))
end:
a:= n-> b(n-1, {n}):
seq(a(n), n=0..23);
MATHEMATICA
b[n_, s_] := b[n, s] = If[n < 1, 1, b[n-1, s] +
If[AnyTrue[s, MemberQ[s, 2 # - n]&], 0, b[n-1, s ~Union~ {n}]]];
a[n_] := b[n-1, {n}];
a /@ Range[0, 23] (* Jean-François Alcover, May 03 2021, after Alois P. Heinz *)
CROSSREFS
Row sums of A334892.
Partial sums give A051013.
Sequence in context: A001636 A347786 A036588 * A239872 A099517 A026647
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 14 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)