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.
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
Examples
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] ...
Links
- Lars Blomberg, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
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 *)
-
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
Comments