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.

A093678 Sequence contains no 3-term arithmetic progression, starting with 1, 7.

This page as a plain text file.
%I A093678 #22 May 24 2022 02:47:14
%S A093678 1,7,8,10,11,16,17,20,28,34,35,37,38,43,44,47,82,88,89,91,92,97,98,
%T A093678 101,109,115,116,118,119,124,125,128,244,250,251,253,254,259,260,263,
%U A093678 271,277,278,280,281,286,287,290,325,331,332,334,335,340,341,344,352
%N A093678 Sequence contains no 3-term arithmetic progression, starting with 1, 7.
%C A093678 a(1)=1, a(2)=7; a(n) is least k such that no three terms of a(1), a(2), ..., a(n-1), k form an arithmetic progression.
%H A093678 Robert Israel, <a href="/A093678/b093678.txt">Table of n, a(n) for n = 1..10000</a>
%H A093678 <a href="/index/No#non_averaging">Index entries related to non-averaging sequences</a>
%F A093678 a(n) = (Sum_{k=1..n-1} (3^A007814(k) + 1)/2) + f(n), with f(n) an 8-periodic function with values {1, 6, 5, 6, 2, 6, 5, 7, ...}, as proved by Lawrence Sze.
%p A093678 N:= 1000: # to get all terms <= N
%p A093678 V:= Vector(N,1):
%p A093678 A[1]:= 1: A[2]:= 7: k:= 8;
%p A093678 for n from 3 while k < N do
%p A093678   for k from 1 to n-2 do
%p A093678     p:= 2*A[n-1]-A[k];
%p A093678     if p <= N then V[p]:= 0 fi
%p A093678   od:
%p A093678   for k from A[n-1]+1 to N do
%p A093678     if V[k] = 1 then A[n]:= k; nmax:= n; break fi;
%p A093678   od;
%p A093678 od:
%p A093678 seq(A[i],i=1..nmax); # _Robert Israel_, May 07 2018
%t A093678 a[n_] := Sum[(1/2)(3^IntegerExponent[k, 2]+1), {k, 1, n-1}] + (1/8)( 12(-1)^n - 7Sin[n Pi/2] + 7Sin[3n Pi/2] - Sin[(n+1)Pi/4] + Sin[(5n+1) Pi/4] + Cos[n Pi/2] + Cos[3n Pi/2] + Cos[n Pi/4] + Cos[3n Pi/4] + Cos[5n Pi/4] + Cos[7n Pi/4] + Cos[(3n+1)Pi/4] - Cos[(7n+1)Pi/4] + 38); Array[a, 60] (* _Jean-François Alcover_, Mar 22 2019 *)
%Y A093678 Cf. A004793, A033157, A093679, A093680, A093681, A092482.
%Y A093678 Row 3 of array in A093682.
%K A093678 nonn,look
%O A093678 1,2
%A A093678 _Ralf Stephan_, Apr 09 2004