login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242921 Lexicographically least increasing sequence avoiding double 3-term arithmetic progressions. 3
0, 1, 3, 4, 7, 8, 10, 11, 15, 17, 18, 20, 25, 27, 28, 31, 32, 34, 35, 38, 42, 43, 45, 46, 53, 55, 58, 59, 61, 62, 67, 68, 70, 71, 79, 81, 85, 87, 90, 92, 93, 98, 102, 105, 112, 114, 115, 119, 121, 126, 129, 130, 132, 133, 136, 140, 141, 143, 144, 148 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

a(0) = 0, a(1) = 1, and for n >= 2, a(n) is the least integer t > a(n-1) such that for all 0 < i <= n/2 we have a(n-2i)+t <> 2a(n-i).

By double arithmetic sequence it is meant that both the indices and the values are in arithmetic progression.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..10000

T. Brown, V. Jungic, and A. Poelstra, On double 3-term arithmetic progressions, arxiv preprint, November 2013.

EXAMPLE

a(8) = 15: 12 is not in the sequence because a(6) = 10, a(7) = 11; 13 is not in the sequence because a(4) = 7, a(6) = 10; 14 is not in the sequence because a(0) = 0, a(4) = 7, so a(8) = 15.

MAPLE

a:= proc(n) option remember; local i, t, ok;

      if n<2 then n

    else for t from 1+a(n-1) do ok:=true;

           for i to n/2 while ok

             do ok:=a(n-2*i)+t <> 2*a(n-i) od;

           if ok then return t fi

         od

      fi

    end:

seq(a(n), n=0..100);  # Alois P. Heinz, May 26 2014

MATHEMATICA

a[n_] := a[n] = Module[{i, t, ok}, If[n<2, n, For[t = 1+a[n-1], True, t++, ok = True; i = 1; While[ok && i <= n/2, ok = a[n-2*i]+t != 2*a[n-i]; i++]; If[ok, Return[t]]]]];

Table[a[n], {n, 0, 100}] (* Jean-Fran├žois Alcover, Nov 09 2017, after Alois P. Heinz *)

CROSSREFS

Differs from A094870 in that sequence must be increasing.

Cf. A003278, A229037.

Sequence in context: A005187 A184835 A184823 * A091934 A178482 A284658

Adjacent sequences:  A242918 A242919 A242920 * A242922 A242923 A242924

KEYWORD

nonn

AUTHOR

Jeffrey Shallit, May 26 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 20:55 EDT 2020. Contains 337182 sequences. (Running on oeis4.)