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.

A363791 Starts of runs of 3 consecutive integers that are primitive binary Niven numbers (A363787).

This page as a plain text file.
%I A363791 #6 Jun 24 2023 13:23:02
%S A363791 4184046,5234670,6285294,7861230,8123886,8255214,8255215,8320878,
%T A363791 8353710,8370126,8379247,12238830,12451631,12572622,13623246,13629935,
%U A363791 14515182,14646510,14673870,14673871,14679342,15040494,15335375,15449071,15531759,15708078,15986543,16178670
%N A363791 Starts of runs of 3 consecutive integers that are primitive binary Niven numbers (A363787).
%H A363791 Amiram Eldar, <a href="/A363791/b363791.txt">Table of n, a(n) for n = 1..10000</a>
%e A363791 4184046 is a term since 4184046, 4184047 and 4184048 are all primitive binary Niven numbers.
%t A363791 binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; primBinNivQ[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]);
%t A363791 seq[kmax_] := Module[{tri = primBinNivQ /@ Range[3], s = {}, k = 4}, While[k < kmax, If[And @@ tri, AppendTo[s, k - 3]]; tri = Join[Rest[tri], {primBinNivQ[k]}]; k++]; s]; seq[10^7]
%o A363791 (PARI) isbinniv(n) = !(n % hammingweight(n));
%o A363791 isprim(n) = isbinniv(n) && !(!(n%2) && isbinniv(n/2));
%o A363791 lista(kmax) = {my(tri = vector(3, i, isprim(i)), k = 4); while(k < kmax, if(vecsum(tri) == 3, print1(k-3, ", ")); tri = concat(vecextract(tri, "^1"), isprim(k)); k++); }
%Y A363791 Subsequence of A049445, A330931, A330932, A363787 and A363790.
%Y A363791 A363792 is a subsequence.
%K A363791 nonn,base
%O A363791 1,1
%A A363791 _Amiram Eldar_, Jun 22 2023