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.

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

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