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.

A363792 Starts of runs of 4 consecutive integers that are primitive binary Niven numbers (A363787).

This page as a plain text file.
%I A363792 #6 Jun 24 2023 13:23:11
%S A363792 8255214,14673870,29092590,33185646,41743854,47697390,48069486,
%T A363792 56348622,56999790,58116078,59604462,60534702,60813774,61837038,
%U A363792 62581230,64069614,64999854,65371950,66581262,66674286,75232494,83418606,86767470,88069806,92255886,95418702,96441966,99511758,99604782
%N A363792 Starts of runs of 4 consecutive integers that are primitive binary Niven numbers (A363787).
%C A363792 There are no runs of 5 or more consecutive integers that are primitive binary Niven numbers (see the second comment in A330933).
%H A363792 Amiram Eldar, <a href="/A363792/b363792.txt">Table of n, a(n) for n = 1..10000</a>
%e A363792 8255214 is a term since 8255214, 8255215, 8255216 and 8255217 are all primitive binary Niven numbers.
%t A363792 binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; primBinNivQ[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]);
%t A363792 seq[kmax_] := Module[{quad = primBinNivQ /@ Range[4], s = {}, k = 5}, While[k < kmax, If[And @@ quad, AppendTo[s, k - 4]]; quad = Join[Rest[quad], {primBinNivQ[k]}]; k++]; s]; seq[3*10^7]
%o A363792 (PARI) isbinniv(n) = !(n % hammingweight(n));
%o A363792 isprim(n) = isbinniv(n) && !(!(n%2) && isbinniv(n/2));
%o A363792 lista(kmax) = {my(quad = vector(4, i, isprim(i)), k = 5); while(k < kmax, if(vecsum(quad) == 4, print1(k-4, ", ")); quad = concat(vecextract(quad, "^1"), isprim(k)); k++); }
%Y A363792 Subsequence of A049445, A330931, A330932, A330933, A363787, A363790 and A363791.
%K A363792 nonn,base
%O A363792 1,1
%A A363792 _Amiram Eldar_, Jun 22 2023