login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A299972 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 2, and no term occurs twice. 11

%I #6 Feb 23 2018 09:46:49

%S 1,11,9,3,17,4,8,12,10,2,18,5,7,13,14,6,15,27,25,37,35,47,45,57,55,65,

%T 56,16,26,36,46,66,54,28,24,38,34,48,44,58,62,20,22,30,32,40,42,50,52,

%U 60,61,21,31,41,51,69,23,19,33,29,43,39,53,49,63,59,64,68

%N Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 2, and no term occurs twice.

%C A permutation of the positive integers.

%o (PARI) a(n,f=1,d=2,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. A299970 (analog with digit 0), A299957 (digit 1), A299973..A299979 (digit 3..9).

%K nonn,base

%O 1,2

%A _M. F. Hasler_ and _Eric Angelini_, Feb 22 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 11:02 EDT 2024. Contains 371779 sequences. (Running on oeis4.)