login
A363791
Starts of runs of 3 consecutive integers that are primitive binary Niven numbers (A363787).
3
4184046, 5234670, 6285294, 7861230, 8123886, 8255214, 8255215, 8320878, 8353710, 8370126, 8379247, 12238830, 12451631, 12572622, 13623246, 13629935, 14515182, 14646510, 14673870, 14673871, 14679342, 15040494, 15335375, 15449071, 15531759, 15708078, 15986543, 16178670
OFFSET
1,1
LINKS
EXAMPLE
4184046 is a term since 4184046, 4184047 and 4184048 are all primitive binary Niven numbers.
MATHEMATICA
binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; primBinNivQ[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]);
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]
PROG
(PARI) isbinniv(n) = !(n % hammingweight(n));
isprim(n) = isbinniv(n) && !(!(n%2) && isbinniv(n/2));
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++); }
CROSSREFS
Subsequence of A049445, A330931, A330932, A363787 and A363790.
A363792 is a subsequence.
Sequence in context: A251371 A234232 A140968 * A251496 A011572 A022538
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jun 22 2023
STATUS
approved