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.

A140102 Term-by-term differences of A140101 and A140100; also, equals the complement of A140103, which is the term-by-term sums of A140101 and A140100, where A140101 is the complement of A140100.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 18, 19, 21, 22, 23, 24, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 44, 45, 46, 47, 49, 50, 52, 53, 54, 55, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 70, 71, 72, 73, 75, 76, 78, 79, 80, 81, 83, 84, 85, 87, 88, 89, 90, 92, 93
Offset: 0

Views

Author

Paul D. Hanna, Jun 04 2008

Keywords

Crossrefs

Cf. A140103 (complement); A140100, A140101; A058265.
For first differences of A140100, A140101, A140102, A140103 see A305392, A305374, A305393, A305394.

Programs

  • Maple
    See link.
  • Mathematica
    nmax = 100; y[0] = 0; x[1] = 1; y[1] = 2; x[n_] := x[n] = For[yn = y[n-1] + 1, True, yn++, For[xn = x[n-1] + 1, xn < yn, xn++, xx = Array[x, n-1]; yy = Array[y, n-1]; If[FreeQ[xx, xn | yn] && FreeQ[yy, xn | yn] && FreeQ[yy - xx, yn - xn] && FreeQ[yy + xx, yn - xn], y[n] = yn; Return[xn]]]];
    Do[x[n], {n, 1, nmax}];
    Join[{0}, yy - xx] (* Jean-François Alcover, Aug 01 2018 *)
  • PARI
    {X=[1];Y=[2];D=[1];S=[3];print1(Y[1]-X[1]","); for(n=1,100,for(j=2,2*n,if(setsearch(Set(concat(X,Y)),j)==0,Xt=concat(X,j); for(k=j+1,3*n,if(setsearch(Set(concat(Xt,Y)),k)==0, if(setsearch(Set(concat(D,S)),k-j)==0,if(setsearch(Set(concat(D,S)),k+j)==0, X=Xt;Y=concat(Y,k);D=concat(D,k-j);S=concat(S,k+j); print1(Y[ #X]-X[ #Y]",");break);break))))))}

Formula

a(n) = A140101(n) - A140100(n).
Theorem: the limit of A140103(n)/A140102(n) = t^2 = 3.38297576...
where the limit of A140101(n)/A140100(n) = t = 1.839286755...
and t = tribonacci constant satisfies: t^3 = 1 + t + t^2.

Extensions

Terms computed by Reinhard Zumkeller.
Offset and initial term changed by N. J. A. Sloane, Oct 10 2016