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.

Previous Showing 21-30 of 73 results. Next

A004793 a(1)=1, a(2)=3; a(n) is least k such that no three terms of a(1), a(2), ..., a(n-1), k form an arithmetic progression.

Original entry on oeis.org

1, 3, 4, 6, 10, 12, 13, 15, 28, 30, 31, 33, 37, 39, 40, 42, 82, 84, 85, 87, 91, 93, 94, 96, 109, 111, 112, 114, 118, 120, 121, 123, 244, 246, 247, 249, 253, 255, 256, 258, 271, 273, 274, 276, 280, 282, 283, 285, 325, 327, 328, 330, 334, 336, 337, 339, 352, 354
Offset: 1

Views

Author

Keywords

Crossrefs

Equals A186776(n)+1, A033160(n)-1, A033163(n)-2.
Row 1 of array in A093682.

Programs

  • Maple
    a:= proc(n) local m, r, b; m, r, b:= n-1, 2-irem(n, 2), 1;
          while m>0 do r:= r+b*irem(m, 2, 'm'); b:= b*3 od; r
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 02 2021
  • Mathematica
    Select[Range[1000], MatchQ[IntegerDigits[#-1, 3], {(0|1)..., 0|2}]&] (* Jean-François Alcover, Jan 13 2019, after Tanya Khovanova in A186776 *)
  • PARI
    v[1]=1; v[2]=3; for(n=3,1000,f=2; m=v[n-1]+1; while(1, forstep(k=n-1,1,-1,if(v[k]<(m+1)/2,f=1; break); for(l=1,k-1,if(m-v[k]==v[k]-v[l],f=0; break)); if(f<2,break)); if(!f,m=m+1;f=2); if(f==1,break)); v[n]=m) \\ Ralf Stephan
    
  • PARI
    a(n)=if(n<1,1,if(n%2==0,3*a(n/2)-2-3*((n/2)%2),3*a((n-1)/2)-3*(((n-1)/2)%2))) \\ Ralf Stephan

Formula

a(n) = (3-n)/2 + 2*floor(n/2) + Sum_{k=1..n-1} 3^A007814(k)/2 = A003278(n) + [n is even], proved by Lawrence Sze, following a conjecture by Ralf Stephan.
a(n) = b(n-1), with b(0)=1, b(2n) = 3b(n) - 2 - 3[n odd], b(2n+1) = 3b(n)-3[n odd].

Extensions

Rechecked by David W. Wilson, Jun 04 2002

A005839 Lexicographically earliest increasing nonnegative sequence that contains no 4-term arithmetic progression.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 9, 14, 15, 16, 18, 25, 26, 28, 29, 30, 33, 36, 48, 49, 50, 52, 53, 55, 56, 57, 62, 64, 65, 66, 79, 86, 87, 88, 90, 93, 98, 101, 104, 105, 108, 109, 110, 121, 125, 135, 144, 148, 150, 151, 159, 162, 166, 168, 169, 170, 173, 175, 176, 182
Offset: 1

Views

Author

Keywords

Comments

a(n) = A005837(n) - 1. - Alois P. Heinz, Jan 31 2014

References

  • R. K. Guy, Unsolved Problems in Number Theory, E10.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
3-term AP: A005836 (>=0), A003278 (>0);
4-term AP: A005839 (>=0), A005837 (>0);
5-term AP: A020654 (>=0), A020655 (>0);
6-term AP: A020656 (>=0), A005838 (>0);
7-term AP: A020657 (>=0), A020658 (>0);
8-term AP: A020659 (>=0), A020660 (>0);
9-term AP: A020661 (>=0), A020662 (>0);
10-term AP: A020663 (>=0), A020664 (>0).

Programs

  • Mathematica
    t = {0, 1, 2}; Do[s = Table[Append[i, n], {i, Subsets[t, {3}]}];
    If[! MemberQ[Table[Differences[i, 2], {i, s}], {0, 0}], AppendTo[t, n]], {n, 3, 200}]; t (* T. D. Noe, Apr 17 2014 *)

Extensions

More terms from Jeffrey Shallit, Aug 15 1995.
Edited (with new offset, etc.) by N. J. A. Sloane, Jan 04 2016

A005837 Lexicographically earliest increasing sequence of positive numbers that contains no 4-term arithmetic progression.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 10, 15, 16, 17, 19, 26, 27, 29, 30, 31, 34, 37, 49, 50, 51, 53, 54, 56, 57, 58, 63, 65, 66, 67, 80, 87, 88, 89, 91, 94, 99, 102, 105, 106, 109, 110, 111, 122, 126, 136, 145, 149, 151, 152, 160, 163, 167, 169, 170, 171, 174, 176, 177, 183, 187, 188, 194, 196
Offset: 1

Views

Author

Keywords

Comments

a(n) = A005839(n) + 1. - Alois P. Heinz, Jan 31 2014

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
3-term AP: A005836 (>=0), A003278 (>0);
4-term AP: A005839 (>=0), A005837 (>0);
5-term AP: A020654 (>=0), A020655 (>0);
6-term AP: A020656 (>=0), A005838 (>0);
7-term AP: A020657 (>=0), A020658 (>0);
8-term AP: A020659 (>=0), A020660 (>0);
9-term AP: A020661 (>=0), A020662 (>0);
10-term AP: A020663 (>=0), A020664 (>0).

Programs

  • Maple
    Noap:= proc(N,m)
    # N terms of earliest increasing seq with no m-term arithmetic progression
    local A,forbid,n,c,ds,j;
    A:= Vector(N):
    A[1..m-1]:= <($1..m-1)>:
    forbid:= {m}:
    for n from m to N do
      c:= min({$A[n-1]+1..max(max(forbid)+1, A[n-1]+1)} minus forbid);
      A[n]:= c;
      ds:= convert(map(t -> c-t, A[m-2..n-1]),set);
      for j from m-2 to 2 by -1 do
        ds:= ds intersect convert(map(t -> (c-t)/j, A[m-j-1..n-j]),set);
        if ds = {} then break fi;
      od;
      forbid:= select(`>`,forbid,c) union map(`+`,ds,c);
    od:
    convert(A,list)
    end proc:
    Noap(100,4); # Robert Israel, Jan 04 2016
  • Mathematica
    t = {1, 2, 3}; Do[s = Table[Append[i, n], {i, Subsets[t, {3}]}]; If[! MemberQ[Table[Differences[i, 2], {i, s}], {0, 0}], AppendTo[t, n]], {n, 4, 200}]; t (* T. D. Noe, Apr 17 2014 *)

Extensions

Edited by M. F. Hasler, Jan 03 2016. Further edited (with new offset) by N. J. A. Sloane, Jan 04 2016

A011185 A B_2 sequence: a(n) = least value such that sequence increases and pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 21, 30, 39, 53, 74, 95, 128, 152, 182, 212, 258, 316, 374, 413, 476, 531, 546, 608, 717, 798, 862, 965, 1060, 1161, 1307, 1386, 1435, 1556, 1722, 1834, 1934, 2058, 2261, 2497, 2699, 2874, 3061, 3197, 3332, 3629, 3712, 3868, 4140, 4447, 4640
Offset: 1

Views

Author

Keywords

Comments

a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j)-a(k) for distinct i and j with 1 <= i,j,k <= n-1. [Comment corrected by Jean-Paul Delahaye, Oct 02 2020.]

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen(): # generator of terms
        aset, sset, k = set(), set(), 0
        while True:
            k += 1
            while any(k+an in sset for an in aset): k += 1
            yield k; sset.update(k+an for an in aset); aset.add(k)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Feb 05 2023

Formula

a(n) = A010672(n-1)+1.

A065825 Smallest k such that n numbers may be picked in {1,...,k} with no three terms in arithmetic progression.

Original entry on oeis.org

1, 2, 4, 5, 9, 11, 13, 14, 20, 24, 26, 30, 32, 36, 40, 41, 51, 54, 58, 63, 71, 74, 82, 84, 92, 95, 100, 104, 111, 114, 121, 122, 137, 145, 150, 157, 163, 165, 169, 174, 194, 204, 209
Offset: 1

Views

Author

Ed Pegg Jr, Nov 23 2001

Keywords

Comments

"Sequences containing no 3-term arithmetic progressions" is another phrase people may be searching for. See also A003002.
Don Reble notes large gaps between a(4k) and a(4k+1).
Ed Pegg Jr conjectures the 2^k term always equals (3^k+1)/2 and calls these "unprogressive" sets. Jaroslaw Wroblewski (jwr(AT)math.uni.wroc.pl), Nov 04 2003, remarks that this conjecture is known to be false.
Further comments from Jaroslaw Wroblewski (jwr(AT)math.uni.wroc.pl), Nov 05 2003: log a(n) / log n tends to 1 was established in 1946 by Behrend. This was extended by me in the Math. Comp. paper. Using appropriately chosen intervals from B(4,9,4) and B(6,9,11) I have determined that log (2a(n)-1) / log n < log 3 / log 2 holds for n=60974 and for n=2^19 since a(60974) <= 19197041, a(524288) <= 515749566. See my web page for further bounds.
Bloom & Sisask prove that a(n) >> n (log n)^(1+c) for an absolute (small) constant c > 0. This improves the o(1) in Behrend's result that log a(n)/log n = 1 + o(1) to log log n/log n. - Charles R Greathouse IV, Aug 04 2020

Examples

			a(9) = 20 = 1 2 6 7 9 14 15 18 20
a(10) = 24 = 1 2 5 7 11 16 18 19 23 24
a(11) = 26 = 1 2 5 7 11 16 18 19 23 24 26
a(12) = 30 = 1 3 4 8 9 11 20 22 23 27 28 30 (unique)
a(13) = 32 = 1 2 4 8 9 11 19 22 23 26 28 31 32
a(14) = 36 = 1 2 4 8 9 13 21 23 26 27 30 32 35 36
a(15) = 40 = 1 2 4 5 10 11 13 14 28 29 31 32 37 38 40
a(16) = 41 = 1 2 4 5 10 11 13 14 28 29 31 32 37 38 40 41
a(17) = 51 = 1 2 4 5 10 13 14 17 31 35 37 38 40 46 47 50 51
a(18) = 54 = 1 2 5 6 12 14 15 17 21 31 38 39 42 43 49 51 52 54
a(19) = 58 = 1 2 5 6 12 14 15 17 21 31 38 39 42 43 49 51 52 54 58
a(20) = 63 = 1 2 5 7 11 16 18 19 24 26 38 39 42 44 48 53 55 56 61 63
a(21) = 71 = 1 2 5 7 10 17 20 22 26 31 41 46 48 49 53 54 63 64 68 69 71
a(22) = 74 = 1 2 7 9 10 14 20 22 23 25 29 46 50 52 53 55 61 65 66 68 73 74
a(23) = 82 = 1 2 4 8 9 11 19 22 23 26 28 31 49 57 59 62 63 66 68 71 78 81 82
a(24) = 84 = 1 3 4 8 9 16 18 21 22 25 30 37 48 55 60 63 64 67 69 76 77 81 82 84
a(25) = 92 = 1 2 6 8 9 13 19 21 22 27 28 39 58 62 64 67 68 71 73 81 83 86 87 90 92
a(26) = 95 = 1 2 4 5 10 11 22 23 25 26 31 32 55 56 64 65 67 68 76 77 82 83 91 92 94 95
a(27) = 100 = 1 3 6 7 10 12 20 22 25 26 29 31 35 62 66 68 71 72 75 77 85 87 90 91 94 96 100
		

References

  • Donald E. Knuth, Satisfiability, Fascicle 6, volume 4 of The Art of Computer Programming. Addison-Wesley, 2015, pages 135 and 190, Problem 31.
  • C. R. J. Singleton, "No Progress": Solution to Problem 2472, Journal of Recreational Mathematics, 30(4) 305 1999-2000.

Crossrefs

Cf. A003002 (three-free sequences), A003003, A003004, A003005, A003278, A005047, A225745.

Programs

  • Mathematica
    ThreeAPFree[n_, k_, a_] := Module[{d, j},
       For[d = 1, d < k/2, d ++,
        For[j = 1, j <= n - 2, j++,
         If[MemberQ[a, a[[j]] + d] && MemberQ[a, a[[j]] + 2 d],
          Return[False]]]];
       Return[True]];
    A065825[n_] := Module[{k, x, a},
      k = n;
      While[True,
       x = Subsets[Range[k], {n}];
       For[i = 1, i <= Length[x], i++,
        a = x[[i]];
        If[a[[1]] != 1 || a[[n]] != k, Continue[]];
        If[ThreeAPFree[n, k, a], Return[k]]];
       k++]]
    Table[A065825[n], {n, 1, 10}]  (* Robert Price, Mar 11 2019 *)
  • PARI
    \\ brute force
    has3AP(v)=for(i=1,#v-2,for(j=i+2,#v,my(t=(v[i]+v[j])/2);if(denominator(t)==1 && setsearch(v,t),return([v[i],t,v[j]]))));0
    a(n)=for(k=n,oo,forvec(u=vector(n,i,if(i==1,[1,1],i==k,[k,k],[2,k-1])),if(has3AP(u)==0, /* print(u); */ return(u[n])),2)) \\ Charles R Greathouse IV, Aug 04 2020

Formula

a(n) = A005047(n) + 1. - Rob Pratt, Jul 09 2015

Extensions

a(19) found by Guenter Stertenbrink in response to an A003278-based puzzle on www.mathpuzzle.com
More terms from Don Reble, Nov 25 2001
a(28)-a(32) from William Rex Marshall, Mar 24 2002
a(33) from William Rex Marshall, Nov 15 2003
a(34) from William Rex Marshall, Jan 24 2004
a(35)-a(36) (found by Gavin Theobold in 2004) communicated by William Rex Marshall, Mar 10 2007
a(37)-a(41) (from Wroblewski's web page) added by Joerg Arndt, Apr 25 2012
a(42)-a(43) from Fausto A. C. Cariboni, Sep 02 2018

A093682 Array T(m,n) by antidiagonals: nonarithmetic-3-progression sequences with simple closed forms.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 5, 4, 4, 1, 10, 6, 5, 7, 1, 11, 10, 8, 8, 10, 1, 13, 12, 10, 10, 11, 19, 1, 14, 13, 13, 11, 13, 20, 28, 1, 28, 15, 14, 16, 14, 22, 29, 55, 1, 29, 28, 17, 17, 20, 23, 31, 56, 82, 1, 31, 30, 28, 20, 22, 28, 32, 58, 83, 163, 1, 32, 31, 31, 28, 23, 29, 37, 59, 85
Offset: 0

Views

Author

Ralf Stephan, Apr 09 2004

Keywords

Comments

The nonarithmetic-3-progression sequences starting with a(1)=1, a(2)=1+3^m or 1+2*3^m, m >= 0, seem to have especially simple 'closed' forms. None of these formulas have been proved, however.
T(m,1)=1, T(m,2) = 1 + (1 + [m even])*3^floor(m/2) = 1 + A038754(m), m >= 0, n > 0; T(m,n) is least k such that no three terms of T(m,1), T(m,2), ..., T(m,n-1), k form an arithmetic progression.

Examples

			Array begins:
  1,  2,  4,  5, 10, 11, 13, ...
  1,  3,  4,  6, 10, 12, 13, ...
  1,  4,  5,  8, 10, 13, 14, ...
  1,  7,  8, 10, 11, 16, 17, ...
  1, 10, 11, 13, 14, 20, 22, ...
  ...
		

Crossrefs

Column 2 is 1+A038754. Cf. A092482, A033158.

Formula

T(m, n) = (Sum_{k=1..n-1} (3^A007814(k) + 1)/2) + f(n), with f(n) a P-periodic function, where P <= 2^floor((m+3)/2) (conjectured and checked up to m=13, n=1000).
The formula implies that T(m, n) = b(n-1) where b(2n) = 3b(n) + p(n), b(2n+1) = 3b(n) + q(n), with p, q sequences generated by rational o.g.f.s.

A191106 Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x are in a.

Original entry on oeis.org

1, 3, 7, 9, 19, 21, 25, 27, 55, 57, 61, 63, 73, 75, 79, 81, 163, 165, 169, 171, 181, 183, 187, 189, 217, 219, 223, 225, 235, 237, 241, 243, 487, 489, 493, 495, 505, 507, 511, 513, 541, 543, 547, 549, 559, 561, 565, 567, 649, 651, 655, 657, 667, 669, 673, 675, 703, 705, 709, 711, 721, 723, 727, 729, 1459, 1461, 1465, 1467, 1477
Offset: 1

Views

Author

Clark Kimberling, May 26 2011

Keywords

Comments

Related sequences for various choices of i and k as defined in A190803:
A003278: (i,k) = (-2,-1)
A191106: (i,k) = (-2, 0)
A191107: (i,k) = (-2, 1)
A191108: (i,k) = (-2, 2)
A153775: (i,k) = (-1, 0)
A147991: (i,k) = (-1, 1)
A191109: (i,k) = (-1, 2)
A005836: (i,k) = ( 0, 1)
A191110: (i,k) = ( 0, 2)
A132140: (i,k) = ( 1, 2)
For a=A191106, we have closure properties: the integers in (2+a)/3 comprise a; the integers in a/3 comprise a.
For k >= 1, m = a(i), 1 <= i <= 2^k seems to be m such that m/(3^k+1) is in the Cantor set (except that m = 0 and m = 3^k+1 do not appear). For k >= 2, m = (a(i)-1)/2, 1 <= i <= 2^k seems to be m such that m/((3^k-1)/2) is in the Cantor set. - Peter Munn, Jul 06 2019
Every even number is the sum of two (possibly equal) terms. More specifically: terms a(1) through a(2^n) = 3^n sum to even numbers 2 times 1 through 3^n. Every even number is infinitely often the difference of two terms. Since the sequence is equal to 2*A005836(n) + 1, these properties follow immediately from similar properties of A005836 for every number. - Aad Thoen, Feb 17 2022
if A_n=(a(1),a(2),...,a(2^n)), then A_(n+1)=(A_n,A_n+2*3^n), similar to A003278. - Arie Bos, Jul 26 2022

Examples

			1 -> 3 -> 7,9 -> 19,21,25,27 -> ...
		

Crossrefs

Cf. A005823, A005836, A054591, A088917 (characteristic function), A173934, A190803, A191108.
Partial sums of A061393.
Similar formula as A003278, A_(n+1)=(A_n,A_n+2*3^n).

Programs

  • Mathematica
    h = 3; i = -2; j = 3; k = 0; f = 1; g = 9;
    a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]  (* A191106; regarding g, see note at A190803 *)
    b = (a + 2)/3; c = a/3; r = Range[1, 900];
    d = Intersection[b, r](* illustrates closure property *)
    e = Intersection[c, r](* illustrates closure property *)
    2 FromDigits[#, 3]&/@Tuples[{0, 1}, 7] + 1 (* Vincenzo Librandi, Jul 10 2019 *)

Formula

a(n) = 2*A005836(n) + 1. - Charles R Greathouse IV, Sep 06 2011
a(n) = A005823(n) + 1. - Vladimir Shevelev, Dec 17 2012
a(n) = (A191108(n) + 1)/2. - Peter Munn, Jul 09 2019

A003003 Size of the largest subset of the numbers [1...n] which doesn't contain a 4-term arithmetic progression.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

These subsets have been called 4-free sequences.
Szemeredi's theorem for arithmetic progressions of length 4 asserts that a(n) is o(n) as n -> infinity. - Doron Zeilberger, Mar 26 2008
False g.f. (z^12 + 1 - z^11 - z^10 + z^8 - z^6 + z^5 - z^3 + z)/((z+1)*(z-1)^2) was conjectured by Simon Plouffe in his 1992 dissertation, but in fact is wrong (cf. A136746).

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A selection of sequences related to "no three-term arithmetic progression": A003002, A003003, A003278, A004793, A005047, A005487, A033157, A065825, A092482, A093678, A093679, A093680, A093681, A093682, A094870, A101884, A101886, A101888, A140577, A185256, A208746, A229037.

Extensions

a(52)-a(72) from Rob Pratt, Jul 09 2015

A240075 Lexicographically earliest nonnegative increasing sequence such that no four terms have constant second differences.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 15, 16, 17, 20, 44, 51, 52, 53, 56, 58, 64, 78, 166, 167, 192, 195, 196, 200, 202, 203, 206, 217, 226, 248, 249, 276, 312, 649, 657, 678, 681, 682, 715, 726, 740, 743, 747, 750, 771, 790, 830, 833, 836, 838, 842, 854, 875, 908, 911, 971
Offset: 1

Views

Author

T. D. Noe, Apr 09 2014

Keywords

Crossrefs

For the positive sequence, see A240555, which is this sequence plus 1.
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
3-term AP: A005836 (>=0), A003278 (>0);
4-term AP: A005839 (>=0), A005837 (>0);
5-term AP: A020654 (>=0), A020655 (>0);
6-term AP: A020656 (>=0), A005838 (>0);
7-term AP: A020657 (>=0), A020658 (>0);
8-term AP: A020659 (>=0), A020660 (>0);
9-term AP: A020661 (>=0), A020662 (>0);
10-term AP: A020663 (>=0), A020664 (>0).
For the analog sequence which avoids 5-term subsequences of constant third differences, see A240556 (>=0) and A240557 (>0).

Programs

  • Mathematica
    t = {0, 1, 2}; Do[s = Table[Append[i, n], {i, Subsets[t, {3}]}]; If[! MemberQ[Flatten[Table[Differences[i, 3], {i, s}]], 0], AppendTo[t, n]], {n, 3, 1000}]; t
  • PARI
    A240075(n, show=0, L=4, o=2, v=[0], D=v->v[2..-1]-v[1..-2])={ my(d, m); while( #v1, ); #Set(d)>1||next(2), 2); break)); v[#v]} \\ M. F. Hasler, Jan 12 2016

Extensions

Definition corrected by N. J. A. Sloane and M. F. Hasler, Jan 04 2016.

A240555 Lexicographically earliest positive increasing sequence such that no four terms have constant second differences.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 16, 17, 18, 21, 45, 52, 53, 54, 57, 59, 65, 79, 167, 168, 193, 196, 197, 201, 203, 204, 207, 218, 227, 249, 250, 277, 313, 650, 658, 679, 682, 683, 716, 727, 741, 744, 748, 751, 772, 791, 831, 834, 837, 839, 843, 855, 876, 909, 912, 972
Offset: 1

Views

Author

T. D. Noe, Apr 09 2014

Keywords

Comments

If "positive" is changed to "nonnegative" we get A240075, which is this sequence minus 1.
See A005837 for the earliest sequence containing no 4-term arithmetic progression.

Examples

			After 1,2,3 the number 4 is excluded since (1,2,3,4) has zero second and third differences.
After 1,2,3,5 the number 8 is excluded since (2,3,5,8) has second differences 1,1.
		

Crossrefs

Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
3-term AP: A005836 (>=0), A003278 (>0);
4-term AP: A005839 (>=0), A005837 (>0);
5-term AP: A020654 (>=0), A020655 (>0);
6-term AP: A020656 (>=0), A005838 (>0);
7-term AP: A020657 (>=0), A020658 (>0);
8-term AP: A020659 (>=0), A020660 (>0);
9-term AP: A020661 (>=0), A020662 (>0);
10-term AP: A020663 (>=0), A020664 (>0).
Cf. A240075 (nonnegative version, a(n)-1).
Cf. A240556 and A240557 for sequences avoiding 5-term subsequences with constant third differences.

Programs

  • Mathematica
    t = {1, 2, 3}; Do[s = Table[Append[i, n], {i, Subsets[t, {3}]}]; If[! MemberQ[Flatten[Table[Differences[i, 3], {i, s}]], 0], AppendTo[t, n]], {n, 4, 1000}]; t
  • PARI
    A240555(n, show=0, L=4, o=2, v=[1], D=v->v[2..-1]-v[1..-2])={ my(d, m); while( #v1, ); #Set(d)>1||next(2), 2); break)); v[#v]} \\ M. F. Hasler, Jan 12 2016

Extensions

Definition corrected by N. J. A. Sloane, Jan 04 2016 and M. F. Hasler at the suggestion of Lewis Chen
Previous Showing 21-30 of 73 results. Next