login
Two adjacent integers sum up to a term of A036301.
2

%I #22 Sep 08 2022 08:46:26

%S 0,112,9,103,18,94,27,85,36,76,45,67,54,58,63,49,72,40,81,31,90,22,99,

%T 13,108,4,117,17,95,26,86,35,77,44,68,53,59,62,50,71,41,80,32,89,23,

%U 98,14,107,5,116,198,138,73,39,82,30,91,21,100,12,109,3,118,16,96,25

%N Two adjacent integers sum up to a term of A036301.

%C This is the lexicographically earliest sequence of distinct nonnegative terms with this property.

%H Carole Dubois, <a href="/A340470/b340470.txt">Table of n, a(n) for n = 1..10002</a>

%e a(1) + a(2) = 0 + 112 = 112 (a term of A036301);

%e a(2) + a(3) = 112 + 9 = 121 (a term of A036301);

%e a(3) + a(4) = 9 + 103 = 112;

%e a(4) + a(5) = 103 + 18 = 121; etc.

%o (Magma) f:=func<n|&+[(-1)^c*c:c in Intseq(n)] eq 0>; a:=[0]; for n in [2..80] do k:=1; while k in a or not f(k+a[n-1]) do k:=k+1; end while; Append(~a,k); end for; a; // _Marius A. Burtea_, Jan 12 2021

%Y Cf. A036301 (even digits sum = odd digits sum).

%K base,nonn

%O 1,2

%A _Eric Angelini_ and _Carole Dubois_, Jan 08 2021