OFFSET
1,1
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..120
EXAMPLE
n=18 -> '10010' contains only 1 distinct binary substring which is prime: '10' (10bbb or bbb10), therefore 18 is a term.
MATHEMATICA
primeCount[n_] := (bits = IntegerDigits[n, 2]; lg = Length[bits]; Reap[Do[If[PrimeQ[p = FromDigits[bits[[i ;; j]], 2]], Sow[p]], {i, 1, lg-1}, {j, i+1, lg}]][[2, 1]] // Union // Length); primeCount[1] = 0; Select[Range[3000], primeCount[#] == 1 &] (* Jean-François Alcover, May 23 2013 *)
PROG
(Haskell)
a078829 n = a078829_list !! (n-1)
a078829_list = filter ((== 1) . a078826) [1..]
-- Reinhard Zumkeller, Jul 17 2015
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
Reinhard Zumkeller, Dec 08 2002
STATUS
approved