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.
%I A309846 #86 Oct 29 2023 22:00:39 %S A309846 0,0,0,0,1,2,6,10,20,32,64,120,256,512,1056,2080,4160,8192,16384, %T A309846 32640,65536,131072,262656,524800,1049600,2097152,4194304,8386560, %U A309846 16777216,33554432,67117056,134225920,268451840,536870912,1073741824,2147450880,4294967296,8589934592,17180000256,34359869440 %N A309846 Number of degree n polynomials f with all nonzero coefficients equal to 1 such that f(k) is divisible by 4 for all integers k. %C A309846 Equivalently, this counts strings of numbers of length n that start with a 1 and which yield a multiple of 4 when read in any base. %C A309846 Conjecture: All terms are of the form 2^(n-5), 2^k*(2^(n-k-5) + 1), or 2^k*(2^(n-k-5) - 1) for some value of k. %H A309846 Robert Israel, <a href="/A309846/b309846.txt">Table of n, a(n) for n = 1..1000</a> %H A309846 Robert Israel, <a href="/A309846/a309846.pdf">Proofs of formulas</a> %F A309846 From _Robert Israel_, Oct 29 2023: (Start) %F A309846 a(8 k) = 16^k/8 + 256^k/32 for k >= 1. %F A309846 a(8 k + 1) = 16^k/4 + 256^k/16 for k >= 1. %F A309846 a(8 k + 2) = 256^k/8 for k >= 1. %F A309846 a(8 k + 3) = 256^k/4 for k >= 1. %F A309846 a(8 k + 4) = -16^k/2 + 256^k/2. %F A309846 a(8 k + 5) = 256^k. %F A309846 a(8 k + 6) = 2 * 256^k. %F A309846 a(8 k + 7) = 2 * 16^k + 4 * 256^k. %F A309846 G.f.: x^5 * (1 - 2*x + 2*x^2 - 2*x^3)/((1 - 2*x) * (1 - 2*x^2) * (1 - 2*x + 2*x^2)). (End) %e A309846 For n = 7, the a(7) = 6 (0,1)-polynomials of degree seven such that f(0) == f(1) == f(2) == f(3) == 0 (mod 3) are %e A309846 x^7 + x^6 + x^5 + x^4, %e A309846 x^7 + x^6 + x^4 + x^3, %e A309846 x^7 + x^6 + x^5 + x^2, %e A309846 x^7 + x^5 + x^4 + x^2, %e A309846 x^7 + x^6 + x^3 + x^2, and %e A309846 x^7 + x^4 + x^3 + x^2. %p A309846 f:= proc(n) local k, r; %p A309846 if n <= 4 then return 0 fi; %p A309846 r:= n mod 8; %p A309846 k:= (n-r)/8; %p A309846 if r = 0 then 16^k/8 + 256^k/32 %p A309846 elif r = 1 then 16^k/4 + 256^k/16 %p A309846 elif r = 2 then 256^k/8 %p A309846 elif r = 3 then 256^k/4 %p A309846 elif r = 4 then -16^k/2 + 256^k/2 %p A309846 elif r = 5 then 256^k %p A309846 elif r = 6 then 2 * 256^k %p A309846 else 2 * 16^k + 4 * 256^k %p A309846 fi %p A309846 end proc: %p A309846 map(f, [$1..50]); # _Robert Israel_, Oct 29 2023 %Y A309846 Cf. A329126, A329479. %K A309846 nonn %O A309846 1,6 %A A309846 _Peter Kagey_, Nov 18 2019 %E A309846 More terms from _Robert Israel_, Oct 29 2023