A299981 Lexicographic first sequence of positive integers such that a(n)*a(n+1) has a digit 1, and no term occurs twice.
1, 10, 11, 12, 9, 2, 5, 3, 4, 25, 6, 17, 7, 13, 8, 14, 15, 21, 31, 23, 18, 34, 24, 38, 27, 19, 22, 28, 29, 35, 26, 16, 32, 33, 36, 30, 37, 39, 40, 41, 42, 43, 44, 45, 47, 46, 59, 20, 50, 62, 51, 61, 52, 56, 57, 53, 55, 58, 54, 65, 48, 66, 63, 67, 73, 70, 74, 69, 49, 64, 80, 77, 82, 75, 68, 76, 81, 71, 72, 78, 79, 85, 60, 86, 83, 87, 91, 90, 89
Offset: 1
Examples
a(1) = 1 is the least positive integer, and a(1) has no other constraint to satisfy. a(2) = 10 is the least positive integer > a(1) = 1 such that a(2)*a(1) = 10 has a digit 1. (For all small choices 2, ..., 9 this is not the case.) a(3) = 11 is the smallest positive integer not in {1, 10} such that a(3)*a(2) (= 110) has a digit 1. a(4) = 12 is the least positive integer not in {1, 10, 11} such that a(4)*a(3) (= 132) has a digit 1: All smaller choices 2, 3, ..., 9 do not satisfy this.
Crossrefs
Programs
-
PARI
A299981(n,f=1,d=1,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]);while(#u>1&&u[2]==u[1]+1,u=u[^1]));a}
Comments