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!)
A229037 The "forest fire": sequence of positive integers where each is chosen to be as small as possible subject to the condition that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form an arithmetic progression. 31
1, 1, 2, 1, 1, 2, 2, 4, 4, 1, 1, 2, 1, 1, 2, 2, 4, 4, 2, 4, 4, 5, 5, 8, 5, 5, 9, 1, 1, 2, 1, 1, 2, 2, 4, 4, 1, 1, 2, 1, 1, 2, 2, 4, 4, 2, 4, 4, 5, 5, 8, 5, 5, 9, 9, 4, 4, 5, 5, 10, 5, 5, 10, 2, 10, 13, 11, 10, 8, 11, 13, 10, 12, 10, 10, 12, 10, 11, 14, 20, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Added name "forest fire" to make it easier to locate this sequence. - N. J. A. Sloane, Sep 03 2019

This sequence and A235383 and A235265 were winners in the best new sequence contest held at the OEIS Foundation booth at the 2014 AMS/MAA Joint Mathematics Meetings. - T. D. Noe, Jan 20 2014

See A236246 for indices n such that a(n)=1. - M. F. Hasler, Jan 20 2014

See A241673 for indices n such that a(n)=2^k. - Reinhard Zumkeller, Apr 26 2014

The graph (for up to n = 10000) has an eerie similarity (why?) to the distribution of rising smoke particles subjected to a lateral wind, and where the particles emanate from randomly distributed burning areas in a fire in a forest or field. - Daniel Forgues, Jan 21 2014

The graph (up to n = 100000) appears to have a fractal structure. The dense areas are not random but seem to repeat, approximately doubling in width and height each time. - Daniel Forgues, Jan 21 2014

a(A241752(n)) = n and a(m) != n for m < A241752(n). - Reinhard Zumkeller, Apr 28 2014

LINKS

Giovanni Resta, Alois P. Heinz, and Charles R Greathouse IV, Table of n, a(n) for n = 1..100000 (1..1000 from Resta, 1001..10000 from Heinz, and 10001..100000 from Greathouse)

Jean Bickerton, Colored plot of 200000 terms; color is difference from previous term in sequence

Xan Gregg, Enhanced scatterplot of 10000 terms [In this plot, the points have been made translucent to reduce the information lost to overstriking, and the point size varies with n in an attempt to keep the density comparable.]

OEIS, Pin plot of 200 terms and scatterplot of 10000 terms

Sébastien Palcoux, On the first sequence without triple in arithmetic progression (version: 2019-08-21), MathOverflow

Sébastien Palcoux, Table of n, a(n) for n = 1..1000000

Sébastien Palcoux, Density plot of the first 1000000 terms

Reddit User "garnet420", Colored plot of 16 million terms; horizontal divisions are 1000000; vertical divisions are 25000

Reddit User "garnet420", B/W plot of 16 million terms; horizontal divisions are 1000000; vertical divisions are 25000

N. J. A. Sloane and Brady Haran, Amazing Graphs II (including Star Wars), Numberphile video (2019)

Index entries for sequences with interesting graphs or plots

Index entries for non-averaging sequences

FORMULA

a(n) <= (n+1)/2. - Charles R Greathouse IV, Jan 21 2014

MATHEMATICA

a[1] = 1; a[n_] := a[n] = Block[{z = 1}, While[Catch[ Do[If[z == 2*a[n-k] - a[n-2*k], Throw@True], {k, Floor[(n-1)/2]}]; False], z++]; z]; a /@ Range[100] (* Giovanni Resta, Jan 01 2014 *)

PROG

(PARI) step(v)=my(bad=List(), n=#v+1, t); for(d=1, #v\2, t=2*v[n-d]-v[n-2*d]; if(t>0, listput(bad, t))); bad=Set(bad); for(i=1, #bad, if(bad[i]!=i, return(i))); #bad+1

first(n)=my(v=List([1])); while(n--, listput(v, step(v))); Vec(v) \\ Charles R Greathouse IV, Jan 21 2014

(Haskell)

import Data.IntMap (empty, (!), insert)

a229037 n = a229037_list !! (n-1)

a229037_list = f 0 empty  where

   f i m = y : f (i + 1) (insert (i + 1) y m) where

     y = head [z | z <- [1..],

                   all (\k -> z + m ! (i - k) /= 2 * m ! (i - k `div` 2))

                       [1, 3 .. i - 1]]

-- Reinhard Zumkeller, Apr 26 2014

(Python)

A229037_list = []

for n in range(10**6):

....i, j, b = 1, 1, set()

....while n-2*i >= 0:

........b.add(2*A229037_list[n-i]-A229037_list[n-2*i])

........i += 1

........while j in b:

............b.remove(j)

............j += 1

....A229037_list.append(j) # Chai Wah Wu, Dec 21 2014

CROSSREFS

Cf. A094870.

For a variant see A309890.

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.

Sequence in context: A238597 A045870 A309890 * A036863 A209270 A083698

Adjacent sequences:  A229034 A229035 A229036 * A229038 A229039 A229040

KEYWORD

nonn,easy,nice,look

AUTHOR

Jack W Grahl, Sep 11 2013

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 May 26 12:33 EDT 2020. Contains 334626 sequences. (Running on oeis4.)