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!)
A299984 Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 4, and no term occurs twice. 1

%I #5 Feb 23 2018 09:49:02

%S 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 24,25,29,35,39,45,49,55,59,65,69,71,33,31,43,41,53,51,63,61,73,67,37,

%U 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 Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 4, and no term occurs twice.

%C A permutation of the nonnegative integers.

%o (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 Cf. A299974 (analog with positive terms), A299957 (analog with digit 1), A299970, A299982, ..., A299988, A299969 (digit 0, 2, ..., 8, 9).

%K nonn,base

%O 0,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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)