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.

This page as a plain text file.
%I A278465 #18 May 09 2021 02:16:21
%S A278465 2,4,10,12,14,20,22,24,38,40,42,44,48,50,52,54,56,58,62,64,66,68,76,
%T A278465 80,84,90,94,98,104,108,112,142,144,150,152,154,160,162,170,172,178,
%U A278465 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
%N A278465 Numbers that are the sum of one or two terms of A035928.
%H A278465 Robert Israel, <a href="/A278465/b278465.txt">Table of n, a(n) for n = 1..10000</a>
%p A278465 N:= 1000: # to get all terms <= N
%p A278465 bcr:= proc(n) local L,m;
%p A278465   L:= convert(n,base,2);
%p A278465   m:= nops(L);
%p A278465   add((1-L[i])*2^(m-i),i=1..m)
%p A278465 end proc:
%p A278465 A035928:= select(`<=`,{seq(seq(x*2^d + bcr(x), x=2^(d-1)..2^d-1),d=1..(ilog2(N)+1)/2)},N):
%p A278465 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
%t A278465 max = 1000;
%t A278465 bcrQ[n_] := Module[{idn2 = IntegerDigits[n, 2]}, Reverse[idn2 /. {1 -> 0, 0 -> 1}] == idn2];
%t A278465 A035928 = Select[Range[max], bcrQ];
%t A278465 Union[Total /@ Tuples[A035928, 2], A035928] // Select[#, # <= max&]& (* _Jean-François Alcover_, Jul 29 2020, after _Harvey P. Dale_ in A035928 *)
%Y A278465 Cf. A035928.
%K A278465 nonn
%O A278465 1,1
%A A278465 _Jeffrey Shallit_, Nov 22 2016