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.

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

This page as a plain text file.
%I A299982 #23 Mar 05 2018 14:31:41
%S A299982 0,2,10,11,1,19,3,9,12,8,4,16,5,7,13,14,6,15,17,25,27,35,37,45,47,55,
%T A299982 57,63,29,23,39,33,49,43,59,53,67,54,18,24,28,34,38,44,48,64,56,26,36,
%U A299982 46,66,58,62,20,22,30,32,40,42,50,52,60,61,21,31,41,51,69,73,79,83,89,93,99,101,71,81,91,109,92,70
%N A299982 Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 2, and no term occurs twice.
%C A299982 A permutation of the nonnegative integers.
%o A299982 (PARI) a(n,f=1,d=2,a=0,u=[a])={for(n=1,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 A299982 Cf. A299972 (analog with positive terms), A299957 (analog with digit 1), A299970, A299983, ..., A299988, A299969 (digit 0, 3, ..., 9).
%K A299982 nonn,base
%O A299982 0,2
%A A299982 _M. F. Hasler_ and _Eric Angelini_, Feb 22 2018