login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2

%I

%S 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,

%T 23,22,26,27,18,34,28,21,24,29,32,35,36,44,37,43,38,33,41,39,42,40,51,

%U 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

%N 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.

%C 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.

%C This is probably a permutation of the natural numbers (after 10000 terms, the smallest integer not yet present is 9990).

%H Lars Blomberg, <a href="/A299952/b299952.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) + a(2) = 1 + 10 = 11 and “11” is visible in [1,10]

%e a(2) + a(3) = 10 + 99 = 109 and “109” is visible in [10,99]

%e a(3) + a(4) = 99 + 11 = 110 and “110” is visible in [1,10]

%e a(4) + a(5) = 11 + 80 = 91 and “91” is visible in [99,11]

%e a(5) + a(6) = 80 + 19 = 99 and “99” is visible in [99]

%e a(6) + a(7) = 19 + 61 = 80 and “80” is visible in [80]

%e ...

%t 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 *)

%o (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

%Y Cf. A300000.

%Y 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).

%Y 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.

%K nonn,base

%O 1,2

%A _Eric Angelini_ and _Lars Blomberg_, Feb 22 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 23 06:13 EST 2020. Contains 332159 sequences. (Running on oeis4.)