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.

A272694 a(n) = (c(n)+f(c(n)))/2, where c() = A272693() and f(k) = sign(k)*(k mod 2).

This page as a plain text file.
%I A272694 #7 Jun 08 2016 10:49:30
%S A272694 0,-1,-1,-3,-2,-2,-2,0,3,1,-2,-3,-4,-3,1,5,2,-3,-5,-5,-2,3,6,3,-5,-11,
%T A272694 -6,3,7,5,-3,-10,-9,-2,8,8,1,-8,-11,-6,6,10,5,-6,-13,-9,1,11,8,-3,-11,
%U A272694 -11,-2,9,12,3,-11,-17,-8,9,18,9,-11,-23,-12,9,19,11,-9,-22,-15,4,20,14,-6,-20,-17,2,19,17
%N A272694 a(n) = (c(n)+f(c(n)))/2, where c() = A272693() and f(k) = sign(k)*(k mod 2).
%C A272694 Created in an attempt to simplify the definition of A108618.
%H A272694 N. J. A. Sloane, <a href="/A272694/b272694.txt">Table of n, a(n) for n = 0..10000</a>
%p A272694 M:=1000;
%p A272694 a:=Array(0..M,0); # A108618 (with different offset)
%p A272694 b:=Array(0..M,0); # A108619 (with different offset)
%p A272694 c:=Array(0..M,0); # A272693
%p A272694 f:=n->sign(n)*(n mod 2);
%p A272694 a[0]:=0; b[0]:=0; c[0]:=0;
%p A272694 for n from 1 to M do
%p A272694 b[n]:=1+(a[n-1]+b[n-1])/2;
%p A272694 a[n]:=1+c[n-1]+f(c[n-1])+3*f(b[n]-1);
%p A272694 c[n]:=(a[n]-3*b[n])/2;
%p A272694 od:
%p A272694 [seq(a[n],n=0..M)];
%p A272694 [seq(b[n],n=0..M)];
%p A272694 [seq(c[n],n=0..M)];
%p A272694 [seq((c[n]+f(c[n]))/2,n=0..M)]; # A272694
%Y A272694 Cf. A108618, A108619, A272693.
%K A272694 sign
%O A272694 0,4
%A A272694 _N. J. A. Sloane_, Jun 08 2016