A020657 Lexicographically earliest increasing sequence of nonnegative numbers that contains no arithmetic progression of length 7.
0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 84, 85
Offset: 1
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.
Crossrefs
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
Programs
-
Maple
seq(`if`(numboccur(6,convert(n,base,7))=0,n,NULL),n=0..85); # Nathaniel Johnston, Jun 27 2011
-
Mathematica
Select[Range[0, 100], FreeQ[IntegerDigits[#, 7], 6]&] (* Jean-François Alcover, Jan 27 2023 *)
-
PARI
a(n)=vector(#n=digits(n-1, 6), i, 7^(#n-i))*n~ \\ M. F. Hasler, Oct 05 2014
-
Python
from gmpy2 import digits def A020657(n): return int(digits(n-1,6),7) # Chai Wah Wu, May 06 2025
Extensions
Name edited by M. F. Hasler, Oct 10 2014. Further edited by N. J. A. Sloane, Jan 04 2016
Comments