OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
115 is a term since 115 and 116 are both primitive binary Niven numbers.
MATHEMATICA
binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; q[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]); Select[Range[5000], q[#] && q[# + 1] &]
PROG
(PARI) isbinniv(n) = !(n % hammingweight(n));
isprim(n) = isbinniv(n) && !(!(n%2) && isbinniv(n/2));
is(n) = isprim(n) && isprim(n+1);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jun 22 2023
STATUS
approved