OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2490
MATHEMATICA
fh[n_, h_] := If[h==1, Mod[n, 2], If[Mod[n, 4]>=2, 1, 0]]; half[n_, h_ ] := Module[{t=1, s=0, m=n}, While[m>0, s += fh[m, h]*t; m=Quotient[m, 4]; t *= 2]; s]; mb[n_] := FromDigits[Riffle[IntegerDigits[n, 2], 0], 2]; aQ[n_] := PrimeQ[n] && mb[half[ n, 1]] < mb[half[n, 2]]; Select[Range[730], aQ] (* Amiram Eldar, Dec 16 2018 from the PARI code *)
PROG
(PARI) a000695(n) = fromdigits(binary(n), 4);
half1(n) = { my(t=1, s=0); while(n>0, s += (n%2)*t; n \= 4; t *= 2); (s); }; \\ A059905
half2(n) = { my(t=1, s=0); while(n>0, s += ((n%4)>=2)*t; n \= 4; t *= 2); (s); }; \\ A059906
isok(n) = isprime(n) && a000695(half1(n)) < a000695(half2(n)); \\ Michel Marcus, Dec 15 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Dec 13 2008
EXTENSIONS
More terms from Michel Marcus, Dec 15 2018
STATUS
approved