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.

Showing 1-3 of 3 results.

A093682 Array T(m,n) by antidiagonals: nonarithmetic-3-progression sequences with simple closed forms.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 5, 4, 4, 1, 10, 6, 5, 7, 1, 11, 10, 8, 8, 10, 1, 13, 12, 10, 10, 11, 19, 1, 14, 13, 13, 11, 13, 20, 28, 1, 28, 15, 14, 16, 14, 22, 29, 55, 1, 29, 28, 17, 17, 20, 23, 31, 56, 82, 1, 31, 30, 28, 20, 22, 28, 32, 58, 83, 163, 1, 32, 31, 31, 28, 23, 29, 37, 59, 85
Offset: 0

Views

Author

Ralf Stephan, Apr 09 2004

Keywords

Comments

The nonarithmetic-3-progression sequences starting with a(1)=1, a(2)=1+3^m or 1+2*3^m, m >= 0, seem to have especially simple 'closed' forms. None of these formulas have been proved, however.
T(m,1)=1, T(m,2) = 1 + (1 + [m even])*3^floor(m/2) = 1 + A038754(m), m >= 0, n > 0; T(m,n) is least k such that no three terms of T(m,1), T(m,2), ..., T(m,n-1), k form an arithmetic progression.

Examples

			Array begins:
  1,  2,  4,  5, 10, 11, 13, ...
  1,  3,  4,  6, 10, 12, 13, ...
  1,  4,  5,  8, 10, 13, 14, ...
  1,  7,  8, 10, 11, 16, 17, ...
  1, 10, 11, 13, 14, 20, 22, ...
  ...
		

Crossrefs

Column 2 is 1+A038754. Cf. A092482, A033158.

Formula

T(m, n) = (Sum_{k=1..n-1} (3^A007814(k) + 1)/2) + f(n), with f(n) a P-periodic function, where P <= 2^floor((m+3)/2) (conjectured and checked up to m=13, n=1000).
The formula implies that T(m, n) = b(n-1) where b(2n) = 3b(n) + p(n), b(2n+1) = 3b(n) + q(n), with p, q sequences generated by rational o.g.f.s.

A005487 Starts 0, 4 and contains no 3-term arithmetic progression.

Original entry on oeis.org

0, 4, 5, 7, 11, 12, 16, 23, 26, 31, 33, 37, 38, 44, 49, 56, 73, 78, 80, 85, 95, 99, 106, 124, 128, 131, 136, 143, 169, 188, 197, 203, 220, 221, 226, 227, 238, 247, 259, 269, 276, 284, 287, 302, 308, 310, 313, 319, 337, 385, 392, 397, 422, 434, 455, 466, 470
Offset: 0

Views

Author

Keywords

Comments

This is what would now be called the Stanley Sequence S(0,4). See A185256.

References

  • R. K. Guy, Unsolved Problems in Number Theory, E10.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equals A033158(n+1)-1. Cf. A185256.

Programs

  • Mathematica
    ss[s1_, M_] := Module[{n, chvec, swi, p, s2, i, j, t1, mmm}, t1 = Length[s1]; mmm = 1000; s2 = Table[s1, {t1 + M}] // Flatten; chvec = Array[0&, mmm]; For[i = 1 , i <= t1 , i++, chvec[[s2[[i]] ]] = 1]; (* get n-th term *) For[n = t1+1 , n <= t1 + M , n++, (* try i as next term *) For[i = s2[[n-1]] + 1 , i <= mmm , i++, swi = -1; (* test against j-th term *) For[ j = 1 , j <= n-2 , j++, p = s2[[n - j]]; If[ 2*p - i < 0 , Break[] ]; If[ chvec[[2*p - i]] == 1 , swi = 1; Break[] ] ]; If[ swi == -1 , s2[[n]] = i; chvec[[i]] = 1; Break[] ] ]; If[ swi == 1 , Print["Error, no solution at n = ", n] ] ]; Table[s2[[i]], {i, 1, t1+M}] ]; ss[{0, 4}, 80] (* Jean-François Alcover, Sep 10 2013, translated from Maple program given in A185256 *)
  • Python
    A005487_list = [0,4]
    for i in range(101-2):
        n, flag = A005487_list[-1]+1, False
        while True:
            for j in range(i+1,0,-1):
                m = 2*A005487_list[j]-n
                if m in A005487_list:
                    break
                if m < A005487_list[0]:
                    flag = True
                    break
            else:
                A005487_list.append(n)
                break
            if flag:
                A005487_list.append(n)
                break
            n += 1 # Chai Wah Wu, Jan 05 2016

Extensions

Name clarified by Charles R Greathouse IV, Jan 30 2014

A236269 First differences of Stanley sequence S(0,4) (A005487).

Original entry on oeis.org

4, 1, 2, 4, 1, 4, 7, 3, 5, 2, 4, 1, 6, 5, 7, 17, 5, 2, 5, 10, 4, 7, 18, 4, 3, 5, 7, 26, 19, 9, 6, 17, 1, 5, 1, 11, 9, 12, 10, 7, 8, 3, 15, 6, 2, 3, 6, 18, 48, 7, 5, 25, 12, 21, 11, 4, 21, 2, 6, 5, 50, 5, 21, 18, 30, 1, 6, 5, 4, 6, 4, 1, 2, 20, 10, 4, 24, 3, 13, 5
Offset: 1

Views

Author

Ralf Stephan, Jan 21 2014

Keywords

Comments

Also first differences of Stanley sequence S(1,5) (A033158).
While there are conjectures about formulas for S(0,m), m=1,2,3,6,9... (see A093682), m=4 is the first case where the first differences look almost random.
Records are 4, 7, 17, 18, 26, 48, 50, 55, 76, 87, 92, 93, 165, 175,...
Positions of records are 1, 7, 16, 23, 28, 49, 61, 81, 83, 101, 147, 165, 185, 250, 400,...
Positions where a(n)=1: 2, 5, 12, 33, 35, 66, 72, 94, 125, 160, 189, 288, 307, 327,...

Programs

  • PARI
    NAP(sv,N)=local(v,vv,m,k,l,sl,vvl);sl=length(sv);vvl=min(N*N,10^5);v=vector(N);vv=vector(vvl);for(k=1,sl,v[k]=sv[k];for(l=1,k-1,vv[2*v[k]-v[l]]=1));m=v[sl]+1;for(k=sl+1,N,while(m<=vvl&&vv[m],m=m+1);if(m>vvl,return(v));for(l=1,k-1,sl=2*m-v[l];if(sl<=vvl,vv[sl]=1));vv[m]=1;v[k]=m);v
    S04(n)=N=1000;NAP([0,4],N)[n]
    a(n)=S04(n+1)-S04(n)
Showing 1-3 of 3 results.