login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A308075
Lexicographically earliest sequence of distinct positive integers such that the sum of the digits of a(n) is either the sum of all the digits of a(n-1) and a(n+1), or is the absolute difference |(sum of digits of a(n-1)) - (sum of digits of a(n+1))|, for n > 1.
2
1, 2, 3, 5, 8, 12, 14, 11, 7, 9, 20, 16, 18, 79, 25, 27, 88, 34, 36, 97, 43, 45, 101, 29, 49, 110, 38, 54, 200, 47, 58, 699, 56, 67, 789, 65, 76, 798, 74, 85, 879, 83, 94, 888, 92, 139, 897, 119, 148, 969, 128, 157, 978, 137, 166, 987, 146, 175, 996, 155, 184, 1001, 69, 89, 1010, 78, 98, 1100, 87, 179, 2000, 96, 188, 5999, 159, 197, 6899
OFFSET
1,2
COMMENTS
To get the "New sequence" below, replace all terms by the sum of their digits:
This seq = 1,2,3,5,8,12,14,11,7,9,20,16,18,79,25,27,88,...
New seq = 1,2,3,5,8, 3, 5, 2,7,9, 2, 7, 9,16, 7, 9,16,...
We see that every term of the "New sequence" is either the sum of its two adjacent terms, or their absolute difference.
This sequence may not be a permutation of the positive integers as the number 10 does not appear among the first 1000000 terms (according to Rémy Sigrist).
EXAMPLE
a(2) = 2 is |1-3|;
a(3) = 3 is |2-5|;
a(4) = 5 is |3-8|;
a(5) = 8 is (5+1+2);
a(6) = 12 because 12 gives (1+2) = 3 and this 3 is (8-1-4);
a(7) = 14 because 14 gives (1+4) = 5 and this 5 is (1+2+1+1);
a(8) = 11 because 11 gives (1+1) = 2 and this 2 is |1+4-7|;
etc.
PROG
(PARI) See Links section.
CROSSREFS
Cf. A007953 (Digital sum (i.e., sum of digits) of n; also called digsum(n)), A307638 (digital sums of this sequence).
Sequence in context: A336993 A176746 A067288 * A211181 A028766 A342494
KEYWORD
base,nonn
AUTHOR
STATUS
approved