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.

A262942 Sequence of positive integers where each is chosen to be as small as possible subject to the conditions that no three terms a(j), a(j+k), a(j+2*k) (for any j and k) form an arithmetic progression (in any order) and that no term repeats.

This page as a plain text file.
%I A262942 #20 Mar 04 2025 07:37:14
%S A262942 1,2,4,5,8,3,7,6,10,11,14,9,16,12,13,19,15,18,20,21,26,17,22,24,25,27,
%T A262942 31,28,23,32,29,34,37,38,40,41,35,30,42,46,47,54,36,33,45,43,49,39,48,
%U A262942 50,55,52,53,44,59,57,51,60,56,61,62,67,58,69,64,72,66,68,76,71,73,77,65,75,63,88,89,80,78,74,83,79,70,90,94,82,81,84,85,91,87,101
%N A262942 Sequence of positive integers where each is chosen to be as small as possible subject to the conditions that no three terms a(j), a(j+k), a(j+2*k) (for any j and k) form an arithmetic progression (in any order) and that no term repeats.
%C A262942 Conjectured permutation of the natural numbers.
%H A262942 Robert Israel, <a href="/A262942/b262942.txt">Table of n, a(n) for n = 1..10000</a>
%e A262942 For n = 4, 3 is not available because {a(2)=2, 3, a(3)=4} form an arithmetic progression, 1,2,4 are already used, so a(4) = 5. - _Robert Israel_, Nov 15 2015
%p A262942 N:= 1000: # to get all terms before the first > N
%p A262942 V:= Vector(N):
%p A262942 S:= Vector(N):
%p A262942 firstav:= 1;
%p A262942 for n from 1 to N do
%p A262942     forbid:= {seq(op([2*V[k]-V[2*k-n], 2*V[2*k-n]-V[k],(V[k]+V[2*k-n])/2]),k=ceil((n+1)/2)..n-1)};
%p A262942     for v from firstav to N do
%p A262942       if S[v] <> 0 and v = firstav then firstav:= v+1 fi;
%p A262942       if S[v] = 0 and not member(v, forbid) then
%p A262942         V[n]:= v;
%p A262942         S[v]:= 1;
%p A262942         break
%p A262942       fi
%p A262942     od;
%p A262942     if v > N then break fi;
%p A262942 od:
%p A262942 seq(V[i],i=1..n-1); # _Robert Israel_, Nov 15 2015
%Y A262942 A229037 has a very similar definition, but a totally different graph.
%K A262942 nonn
%O A262942 1,2
%A A262942 _Max Barrentine_, Oct 05 2015
%E A262942 Added more terms from b-file. - _N. J. A. Sloane_, Nov 26 2015