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.

A108423 a(n) = A108422(n) - A108421(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 2, 2, 1, 0, 1, 2, 0, 3, 2, 2, 2, 3, 3, 3, 1, 2, 2, 4, 1, 3, 3, 3, 0, 1, 0, 4, 3, 3, 4, 5, 2, 3, 4, 2, 3, 5, 4, 4, 1, 0, 4, 4, 3, 4, 4, 4, 2, 4, 2, 4, 3, 2, 1, 3, 0, 3, 2, 5, 4, 4, 5, 4, 3, 4, 4, 5, 3, 5, 5, 5, 2, 3, 4, 4, 4, 5, 3, 6, 1, 3, 5, 3, 1, 5, 4, 2, 1, 4, 4, 6, 4, 4, 4, 6, 2, 6, 4
Offset: 2

Views

Author

Reinhard Zumkeller, Jun 03 2005

Keywords

Comments

a(A000079(n)) = 0.

Programs

  • Maple
    N:= 200: # to get a(2)..a(N)
    Primes:= select(isprime, [seq(i, i=3..2*N-3, 2)]):
    Ones:= map(t -> convert(convert(t, base, 2), `+`), Primes):
    VL:= Vector(N): VL[2]:= 2:
    VH:= Vector(N): VH[2]:= 2:
    for i from 1 to nops(Primes) do
      p:= Primes[i];
      for j from 1 to i do
        k:= (p+Primes[j])/2;
        if k > N then break fi;
        t:= Ones[i]+Ones[j];
        if t > VH[k] then VH[k]:= t fi;
        if VL[k]=0 or t < VL[k] then VL[k]:= t fi;
      od
    od:
    convert((VH-VL)[2..N], list); # Robert Israel, Mar 26 2018