cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236402 Numbers with property that the sum of any pair of adjacent digits is a substring of the number.

This page as a plain text file.
%I A236402 #53 Mar 05 2024 11:28:37
%S A236402 0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,101,102,103,104,
%T A236402 105,106,107,108,109,200,201,202,203,204,205,206,207,208,209,300,301,
%U A236402 302,303,304,305,306,307,308,309,400,401,402,403,404,405,406,407
%N A236402 Numbers with property that the sum of any pair of adjacent digits is a substring of the number.
%C A236402 This sequence has density 1, since all numbers except a thin fraction have digits 0 through 18 in base 100. In particular, there are at most x^0.99782 non-members up to x for large enough x. (This can be improved.) - _Charles R Greathouse IV_, Jan 30 2014
%C A236402 1263907548 is the smallest term that contains all ten digits. - _M. F. Hasler_, Jan 30 2014
%C A236402 Where does this first differ from A032945? - _R. J. Mathar_, Feb 03 2014
%C A236402 This first differs from A032945 at a(110)=910 (followed by 1000, 1001, 1002, ...) while A032945(110)=1000 (followed by 1010, 1020, 1030, ...). - _M. F. Hasler_, Dec 28 2014
%H A236402 T. D. Noe, <a href="/A236402/b236402.txt">Table of n, a(n) for n = 1..8495</a> (terms < 10^6)
%F A236402 a(n) ~ n. - _Charles R Greathouse IV_, Jan 30 2014
%e A236402 Examples of numbers in the sequence:
%e A236402 80 --> 8+0=8
%e A236402 107 --> 1+0=1  /  0+7=7
%e A236402 910 --> 9+1=10  /  1+0=1
%e A236402 1037 --> 1+0=1  /  0+3=3  /  3+7=10
%e A236402 1459 --> 1+4=5  /  4+5=9  /  5+9=14
%e A236402 41358 --> 4+1=5  /  1+3=4  /  3+5=8  /  5+8=13
%t A236402 fQ[n_] := Module[{d, p, s}, d = IntegerDigits[n]; p = Partition[d, 2, 1]; s = Plus @@@ p; Complement[s, Union[d, FromDigits /@ p]] == {}]; Join[Range[0, 9], Select[Range[10, 1000], fQ]] (* _T. D. Noe_, Jan 30 2014 *)
%o A236402 (PARI) is(n)=my(d=digits(n),S=Set(d),v=List(),t); for(i=2,#d, listput(v, 10*d[i-1]+d[i])); S=Set(concat(S,Vec(v))); for(i=2,#d, t=d[i-1]+d[i]; if(!setsearch(S, t), return(0))); 1 \\ _Charles R Greathouse IV_, Jan 13 2015
%o A236402 (Python)
%o A236402 def ok(n):
%o A236402   s = str(n)
%o A236402   return all(str(sum(map(int, s[i:i+2]))) in s for i in range(len(s)-1))
%o A236402 print(list(filter(ok, range(408)))) # _Michael S. Branicky_, Jun 11 2021
%Y A236402 Cf. A236403 (complement).
%Y A236402 Cf. A198298, A203565, A203566, A203569.
%K A236402 nonn,base,easy
%O A236402 1,3
%A A236402 _Eric Angelini_, Jan 30 2014