cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A299996 Lexicographic first sequence of positive integers such that a(n)*a(n+1) has a digit 6, and no term occurs twice.

This page as a plain text file.
%I A299996 #5 Feb 23 2018 09:49:36
%S A299996 1,6,10,16,4,9,7,8,2,3,12,5,13,20,18,17,28,22,21,26,11,15,24,14,19,32,
%T A299996 23,27,25,64,29,34,39,35,36,31,44,37,38,42,30,52,33,49,40,41,43,48,45,
%U A299996 57,46,47,56,51,60,61,65,71,53,50,72,55,63,58,62,59,54,66,70,67,68,69,74,76,79,73,77,78,80,75,81,82,83,84,89,85,90,94,92
%N A299996 Lexicographic first sequence of positive integers such that a(n)*a(n+1) has a digit 6, and no term occurs twice.
%C A299996 A permutation of the positive integers.
%e A299996 a(1) = 1 is the least positive integer, and a(1) has no other constraint to satisfy.
%e A299996 a(2) = 6 is the least positive integer > a(1) = 1 such that a(2)*a(1) = 6 has a digit 6.
%e A299996 a(3) = 10 is the least positive integer not in {1, 6} such that a(3)*a(2) (= 60) has a digit 6: All smaller choices (2, 3, 4 or 5) do not satisfy this.
%e A299996 a(4) = 16 is the least positive integer not in {1, 6, 10} such that a(4)*a(3) (= 160) has a digit 6: All smaller choices 2,...,15 do not satisfy this.
%o A299996 (PARI) A299996(n,f=1,d=6,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}
%Y A299996 Cf. A299402, A299403, A298974, ..., A298979, A299997: analog with digit 2, 3, ..., 9, 7.
%Y A299996 Cf. A299957, A299969, ..., A299988 (analog with addition instead of multiplication, and different digits).
%K A299996 nonn,base
%O A299996 1,2
%A A299996 _M. F. Hasler_, Feb 22 2018