login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020654 Lexicographically earliest increasing sequence of nonnegative numbers containing no 5-term arithmetic progression. 36
0, 1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 43, 50, 51, 52, 53, 55, 56, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 75, 76, 77, 78, 80, 81, 82, 83, 85, 86, 87, 88, 90, 91, 92, 93, 125, 126, 127 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

This is also the set of numbers with no "4" in their base-5 representation. In fact, for any prime p, the sequence consisting of numbers with no (p-1) in their base-p expansion is the same as the earliest sequence containing no p-term arithmetic progression. - Nathaniel Johnston, Jun 26-27 2011

LINKS

Nathaniel Johnston, Table of n, a(n) for n = 1..10000

J. L. Gerver and L. T. Ramsey, Sets of integers with no long arithmetic progressions generated by the greedy algorithm, Math. Comp., 33 (1979), 1353-1359.

Samuel S. Wagstaff, Jr., On k-free sequences of integers, Math. Comp., 26 (1972), 767-771.

Index entries for 5-automatic sequences.

MAPLE

seq(`if`(numboccur(4, convert(n, base, 5))=0, n, NULL), n=0..127); # Nathaniel Johnston, Jun 27 2011

MATHEMATICA

Select[ Range[ 0, 100 ], (Count[ IntegerDigits[ #, 5 ], 4 ]==0)& ]

PROG

(PARI) is(n)=while(n>4, if(n%5==4, return(0)); n\=5); 1 \\ Charles R Greathouse IV, Feb 12 2017

(Python)

from sympy.ntheory.factor_ import digits

print [n for n in xrange(201) if digits(n, 5)[1:].count(4)==0] # Indranil Ghosh, May 23 2017

CROSSREFS

Cf. A023717.

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).

Sequence in context: A087069 A023737 A037459 * A182777 A214988 A028804

Adjacent sequences:  A020651 A020652 A020653 * A020655 A020656 A020657

KEYWORD

nonn,easy

AUTHOR

David W. Wilson

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 22:28 EDT 2018. Contains 316378 sequences. (Running on oeis4.)