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.

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

This page as a plain text file.
%I A299977 #4 Feb 23 2018 09:47:56
%S A299977 1,6,11,16,21,26,31,36,34,3,4,13,14,23,24,33,37,10,7,20,17,30,27,40,
%T A299977 32,5,2,15,12,25,22,35,38,9,8,19,18,29,28,39,48,49,58,59,68,69,78,79,
%U A299977 88,82,45,42,55,52,65,62,75,72,85,86,41,46,51,56,61,66,71,76,81,89,83,44,43,54,53,64,63,74,73,84,87,50,47,60,57,70,67,80,77,90,97
%N A299977 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 7, and no term occurs twice.
%C A299977 A permutation of the positive integers.
%o A299977 (PARI) a(n,f=1,d=7,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 A299977 Cf. A299987 (analog with nonnegative terms), A299957 (analog with digit 1), A299971, A299972, ..., A299979 (digit 0, 2, ..., 9).
%K A299977 nonn,base
%O A299977 1,2
%A A299977 _M. F. Hasler_ and _Eric Angelini_, Feb 22 2018