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.

A278465 Numbers that are the sum of one or two terms of A035928.

Original entry on oeis.org

2, 4, 10, 12, 14, 20, 22, 24, 38, 40, 42, 44, 48, 50, 52, 54, 56, 58, 62, 64, 66, 68, 76, 80, 84, 90, 94, 98, 104, 108, 112, 142, 144, 150, 152, 154, 160, 162, 170, 172, 178, 180, 182, 184, 188, 190, 192, 194, 198, 202, 204, 206, 208, 212, 214, 216, 220, 222, 224, 226, 230, 232, 234, 240, 242, 244, 246, 250, 252, 254, 256, 260
Offset: 1

Views

Author

Jeffrey Shallit, Nov 22 2016

Keywords

Crossrefs

Cf. A035928.

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    bcr:= proc(n) local L,m;
      L:= convert(n,base,2);
      m:= nops(L);
      add((1-L[i])*2^(m-i),i=1..m)
    end proc:
    A035928:= select(`<=`,{seq(seq(x*2^d + bcr(x), x=2^(d-1)..2^d-1),d=1..(ilog2(N)+1)/2)},N):
    sort(convert(A035928 union {seq(seq(A035928[i]+t, t = select(`<=`,A035928[i..-1], N-A035928[i])),i=1..nops(A035928))},list)); # Robert Israel, Nov 23 2016
  • Mathematica
    max = 1000;
    bcrQ[n_] := Module[{idn2 = IntegerDigits[n, 2]}, Reverse[idn2 /. {1 -> 0, 0 -> 1}] == idn2];
    A035928 = Select[Range[max], bcrQ];
    Union[Total /@ Tuples[A035928, 2], A035928] // Select[#, # <= max&]& (* Jean-François Alcover, Jul 29 2020, after Harvey P. Dale in A035928 *)