%I #4 Feb 23 2018 09:47:09
%S 1,3,11,13,21,19,5,9,15,25,16,8,6,18,22,2,12,28,14,10,4,20,23,17,7,27,
%T 37,47,57,67,73,31,33,41,43,51,53,61,63,71,69,35,29,45,39,55,49,65,59,
%U 75,66,38,26,48,36,58,46,68,56,78,62,32,42,52,72,70,24,30,34,40,44,50,54,60,64,76,88,86,98,96,108,106,118,116,124,80,74,90,84
%N Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 4, and no term occurs twice.
%C A permutation of the positive integers.
%o (PARI) a(n,f=1,d=4,a=1,u=[a])={for(n=2,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}
%Y Cf. A299984 (analog with nonnegative terms), A299957 (analog with digit 1), A299971, A299972, ..., A299979 (digit 0, 2, ..., 9).
%K nonn,base
%O 1,2
%A _M. F. Hasler_ and _Eric Angelini_, Feb 22 2018
|