|
|
A278454
|
|
Primes p such that every suffix of the binary representation of p is either a prime or 1.
|
|
3
|
|
|
3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 43, 61, 67, 71, 83, 101, 107, 131, 139, 151, 157, 199, 211, 229, 257, 263, 269, 293, 317, 467, 523, 541, 613, 619, 643, 769, 829, 1031, 1061, 1091, 1163, 1181, 1223, 1637, 1667, 2053, 2131, 2179, 2311, 2341, 3079, 3109, 3229, 3271, 4099, 4133, 4139, 4157, 4253, 4637, 8209, 8221, 8263, 8293, 8461, 9283, 9829, 9859
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
Jon E. Schoenfield, Table of n, a(n) for n = 1..10000
|
|
EXAMPLE
|
211=11010011_2 is in the sequence, since each of its base-2 suffixes (1010011_2=83, 10011_2=19, 11_2=3, and 1_2=1) is either prime or 1.
|
|
MATHEMATICA
|
First /@ DeleteCases[Map[NestWhileList[# - 2^Floor@ Log2@ # &, #, # > 1 &] &, Prime@ Range[2, 1250]], w_ /; Times @@ Boole[PrimeQ /@ Most@ w] != 1] (* Michael De Vlieger, Nov 22 2016 *)
|
|
PROG
|
(Magma)
/* generates b-file through a(1027)=1770887435474165579843 in a couple of seconds */ /* Note: A[j] is a(j-1) */ A:=[1]; for d in [1..70] do for j in [1..#A] do t:=2^d+A[j]; if IsPrime(t) then A[#A+1]:=t; #A-1, A[#A]; end if; end for; end for; // Jon E. Schoenfield, Nov 23 2016
(PARI)
red(n)=n-(1<<logint(n, 2));
isok(n)=if(n==1, 1, my(r=red(n)); isprime(n)&&isok(red(n)));
forprime (p=3, 10^3, if(isok(p), print1(p, ", ")));
\\ Joerg Arndt, Nov 23 2016
|
|
CROSSREFS
|
Cf. A278455.
Sequence in context: A130057 A226181 A120637 * A064534 A139758 A306084
Adjacent sequences: A278451 A278452 A278453 * A278455 A278456 A278457
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Randy L. Ekl, Nov 22 2016
|
|
STATUS
|
approved
|
|
|
|