login
A299952
The sum a(n) + a(n+1) is a substring of the concatenation of all terms up to a(n+1). Lexicographic first sequence of positive integers without duplicate terms having this property.
3
1, 10, 99, 11, 80, 19, 61, 30, 31, 49, 12, 2, 4, 5, 3, 6, 7, 15, 9, 13, 17, 14, 8, 16, 20, 25, 23, 22, 26, 27, 18, 34, 28, 21, 24, 29, 32, 35, 36, 44, 37, 43, 38, 33, 41, 39, 42, 40, 51, 45, 46, 47, 52, 57, 53, 56, 54, 55, 63, 59, 50, 60, 58, 64, 66, 65, 74, 48, 62, 68, 71, 77, 72, 67, 78, 70
OFFSET
1,2
COMMENTS
The sequence starts with a(1) = 1 and is always extended with the smallest integer not yet present that does not lead to a contradiction.
This is probably a permutation of the natural numbers (after 10000 terms, the smallest integer not yet present is 9990).
LINKS
EXAMPLE
a(1) + a(2) = 1 + 10 = 11 and “11” is visible in [1,10]
a(2) + a(3) = 10 + 99 = 109 and “109” is visible in [10,99]
a(3) + a(4) = 99 + 11 = 110 and “110” is visible in [1,10]
a(4) + a(5) = 11 + 80 = 91 and “91” is visible in [99,11]
a(5) + a(6) = 80 + 19 = 99 and “99” is visible in [99]
a(6) + a(7) = 19 + 61 = 80 and “80” is visible in [80]
...
MATHEMATICA
Nest[Function[a, Append[a, Block[{k = 1, d}, While[Nand[FreeQ[a, k], SequenceCount[Flatten@ IntegerDigits[Append[a, k]], IntegerDigits[a[[-1]] + k]] > 0], k++]; k]]], {1}, 75] (* Michael De Vlieger, Feb 22 2018 *)
PROG
(PARI) a(n, show=1, a=1, s=a, u=[a], t, m)={for(n=2, n, show&&print1(a", "); for(k=u[1]+1, oo, setsearch(u, k)&&next; m=Mod(a+k, 10^#Str(a+k)); t=s*10^#Str(k)+k; until(k>=t\=10, t==m&&(a=k)&&break(2))); s=s*10^#Str(a)+a; u=setunion(u, [a]); u[2]==u[1]+1&&u=u[^1]); a} \\ M. F. Hasler, Feb 22 2018
CROSSREFS
Cf. A300000.
For a different constraint on a(n)+a(n+1) (must have a digit '1'), see A299957 and A299970, A299982, ..., A299988, A299969 (nonnegative analog with digit 0, 2, ..., 9), A299971, A299972, ..., A299979 (positive analog with digit 0, 2, ..., 9).
Cf. A299980, A299981, A299402, A299403, A298974, A298975, A299996, A299997, A298978, A298979 for the analog using multiplication: a(n)*a(n+1) has a digit 0, resp. 1, ..., resp. 9.
Sequence in context: A007137 A361137 A135927 * A278672 A129542 A359482
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Lars Blomberg, Feb 22 2018
STATUS
approved