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!)
A277846 The digits of the absolute difference |a(n+1)-a(n)| are a sub(multi)set of the digits of a(n): Lexicographically first sequence with this property and without negative or repeated terms. 0
1, 2, 4, 8, 16, 10, 9, 18, 17, 24, 20, 22, 44, 40, 36, 30, 27, 25, 23, 21, 19, 28, 26, 32, 29, 31, 34, 37, 74, 67, 60, 54, 49, 45, 41, 42, 38, 35, 70, 63, 57, 50, 55, 110, 99, 90, 81, 73, 66, 72, 65, 59, 64, 58, 53, 48, 52, 47, 43, 39, 78, 71, 88, 80, 160, 100, 101, 91, 82, 84, 76, 69, 75, 68, 62, 56, 51, 46 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
In contrast to A277845, the order of the digits does not matter: for example, if a(n) = 123, the difference with the next term might be 21, 31, or 32, which is not possible in A277845 or in A277858.
This sequence differs from A277858 and A277845 from a(63) = 71 + 17 = 88 on, while A277858(63) = A277845(63) = 71 + 71 = 142. In contrast to A277858 and A277845 in which the 12 numbers {3, 5, 6, 7, 11, 12, 13, 14, 15, 33, 46, 61} do not appear, the number 46 = a(78) is in this sequence, and only the other 11 numbers are missing here.
It is easy to prove that this is not a permutation of the positive integers: for example, the number 5 cannot occur anywhere later in the sequence, since it has no possible successor (10 being already used). Relaxing the defining condition to "each digit of |a(n+1)-a(n)| is a digit of a(n)" (e.g., a step of 11 would be allowed after 123), leads to the variant A276070 which is a permutation.
LINKS
PROG
(PARI) /* 'a' subsequence of 'b'?*/ ss(a, b, i=1, k=1)={while(k < #b && #b-k >= #a-i, b[k] == a[i] && (i==#a || ss(a, b, i+1, k+1)) && return(1); k++); k==#b && i==#a && b[k] == a[i]}
AA277846(n, a=1, g=1)={u=[]; for(n=2, n, g&&print1(a", "); u=setunion(u, [a]); d=vecsort(digits(a)); for(k=u[1]+1, 2*a, (!setsearch(u, k) && ss(vecsort(digits(abs(a-k))), d))||next; p==a && u=setminus(u, [b]); p=a; a=k; next(2)); g&&print1("-- no: delete "a", go back to "); b=a; a=p); a} \\ This implementation of backtracking is actually not required.
CROSSREFS
Sequence in context: A082953 A009289 A070335 * A277845 A277858 A366031
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 05 2016
STATUS
approved

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 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)