OFFSET
1,1
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..18
EXAMPLE
61 is the smallest prime with 4 steps: 61 (-32) -> 29 (-16) -> 13 (-8) -> 5 (-4) -> 1.
23 is the smallest prime with 3 steps: 23 -> 7 -> 3 -> 1
MATHEMATICA
First /@ DeleteDuplicatesBy[#, Last] &@ Map[{First@ #, Length@ # - 1} &, DeleteCases[Map[NestWhileList[# - 2^Floor@ Log2@ # &, #, # > 1 &] &, Prime@ Range[2, 200000]], w_ /; Times @@ Boole[PrimeQ /@ Most@ w] != 1]] (* Michael De Vlieger, Nov 22 2016 *)
PROG
(Magma)
a:=[]; A:=[<1, 0>]; /* A[j] is a pair: (A278454(j-1) & its no. of steps) */ maxSteps:=0; for d in [1..60] do for j in [1..#A] do t:=2^d+A[j][1]; if IsPrime(t) then A[#A+1]:=<t, A[j][2]+1>; if A[#A][2] gt maxSteps then maxSteps:=A[#A][2]; a[#a+1]:=A[#A][1]; end if; end if; end for; end for; a; //Jon E. Schoenfield, Nov 23 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Randy L. Ekl, Nov 22 2016
EXTENSIONS
a(10)-a(15) from Jon E. Schoenfield, Nov 22 2016
STATUS
approved