OFFSET
1,2
EXAMPLE
a(1)=1 (0 < 3 < 4);
a(2)=2 (1 < 3,5 < 6);
a(3)=1 (8 < 11 <12);
a(4)=3 (9 < 11,13,17 < 18);
a(5)=5 (10 < 11,13,17,19,29 < 30);
a(6)=5 (14 < 17,19,29,31,41 < 42);
a(7)=7 (15 < 17,19,29,31,41,43,59 < 60);
a(8)=9 (16 < 17,19,29,31,41,43,59,61,71 < 72).
MAPLE
A164276 := proc(n) option remember; if n = 1 then 0; else for a from procname(n-1)+1 do if isA164276(a) then return a; end if; end do; end if: end proc:
A001097 := proc(n) option remember; if n =1 then 3; else for a from procname(n-1)+2 by 2 do if isA001097(a) then return a; end if; end do: end if; end proc:
A167595 := proc(n) a := 0 ; for k from A164276(n)+1 to A014574(n)-1 do if isA001097(k) then a := a+1 ; end if; end do: a ; end proc:
seq(A167595(n), n=1..120) ; # R. J. Mathar, May 30 2010
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Nov 06 2009
EXTENSIONS
More terms from R. J. Mathar, May 30 2010
STATUS
approved