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.

Showing 1-6 of 6 results.

A236403 Numbers not in A236402.

Original entry on oeis.org

11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Eric Angelini, Jan 30 2014

Keywords

Comments

This sequence has density 0, since all numbers except a thin fraction have digits 0 through 18 in base 100. In particular, there are at most x^0.99782 members up to x for large enough x. (This can be improved.) - Charles R Greathouse IV, Jan 30 2014
Where does this first differ from A038687? - R. J. Mathar, Feb 03 2014
Is this a shifted version of A031954? - R. J. Mathar, Feb 03 2014

Crossrefs

Subsequence of A052382.
Cf. A236402.

Programs

  • PARI
    is(n)=my(d=digits(n), S=Set(d), v=List()); for(i=2, #d, listput(v, 10*d[i-1]+d[i])); S=setunion(S,Set(v)); for(i=2, #d, if(!setsearch(S, d[i-1]+d[i]), return(1))); 0 \\ Charles R Greathouse IV, Mar 10 2021
    
  • Python
    def ok(n):
      s = str(n)
      return not all(str(sum(map(int, s[i:i+2]))) in s for i in range(len(s)-1))
    print(list(filter(ok, range(120)))) # Michael S. Branicky, Jun 11 2021

Extensions

Missing a(82) added by Charles R Greathouse IV, Mar 10 2021

A203565 Numbers that contain the product of any two adjacent digits as a substring.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 30, 31, 40, 41, 50, 51, 60, 61, 70, 71, 80, 81, 90, 91, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 126, 130, 131, 140, 141, 150, 151
Offset: 1

Views

Author

M. F. Hasler, Jan 03 2012

Keywords

Comments

Inspired by the problem restricted to pandigital numbers suggested by E. Angelini (cf. link).
E. Angelini observes that up to a(86) this is the same as "Numbers that contain the product of (all) their digits as a substring" (cf. A227510 for the zeroless terms); then 212 is here but not there, and 236 is there and not here. - M. F. Hasler, Oct 14 2014

Examples

			Any number having no two adjacent digits larger than 1 is trivially in the sequence.
The smallest nontrivial example is the number 126, which is in the sequence since 1*2=2 and 2*6=12 are both substrings of "126".
		

Crossrefs

Cf. A203569 (digits are permutations of 0...n).
Cf. A227510 (product of all digits is a substring and > 0).

Programs

  • Maple
    filter:= proc(n)
    local L,S,i;
    S:= convert(n,string);
    for i from 1 to length(S)-1 do
      if StringTools:-Search(convert(parse(cat(S[i],"*",S[i+1])),string),S) = 0 then
          return false
      fi
    od:
    true
    end proc:
    select(filter, [$0..1000]); # Robert Israel, Oct 15 2014
  • Mathematica
    d[n_] := IntegerDigits[n]; Select[Range[0, 151], And @@ Table[MemberQ[FromDigits /@ Partition[d[#], IntegerLength[k], 1], k], {k, Times @@@ Partition[d[#], 2, 1]}] &] (* Jayanta Basu, Aug 10 2013 *)
  • PARI
    has(n,m)={ my(p=10^#Str(m)); until( m>n\=10, n%p==m & return(1))}
    is_A203565(n)={ my(d); for(i=2,#d=eval(Vec(Str(n))), has(n,d[i]*d[i-1]) | return);1 }
    is_A203565(n)={ my(d=Vecsmall(Str(n))); for(i=2,#d, d[i]<50 & i++ & next; has(n,d[i-1]%48*(d[i]-48)) | return);1 } /* twice as fast */
    for( n=0,999, is_A203565(n) & print1(n","))

A032945 Numbers k whose base-10 representation Sum_{i=0..m} d(i)*10^(m-i) has d(i)=0 for all odd i. Here m is the position of the lead digit of k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 400, 401, 402, 403
Offset: 1

Views

Author

Keywords

Comments

Every nonnegative integer can be represented as the sum of two members of this sequence. - Franklin T. Adams-Watters, Aug 30 2014
This first differs from A236402 at a(110)=1000 (followed by 1010, 1020, 1030, ...), while A236402(110)=910 (followed by 1000, 1001, 1002, ...). - M. F. Hasler, Dec 28 2014

Crossrefs

Cf. A126684.

Programs

  • Maple
    N:= 6: # to get all terms with up to N digits
    A[1]:= 0:
    count:= 1:
    for d from 1 to N do
       dp:= ceil(d/2);
       for j from 10^(dp-1) to 10^dp-1 do
          L:= ListTools[Reverse](convert(j,base,10));
          L:= ListTools[Interleave](L,[0$(d-dp)]);
          count:= count+1;
          A[count]:= add(L[i]*10^(d-i),i=1..d);
        od
    od:
    seq(A[i],i=1..count); # Robert Israel, Aug 31 2014
  • PARI
    is(n)=!forstep(i=2,#n=digits(n),2,n[i]&&return) \\ M. F. Hasler, Dec 28 2014
    
  • Python
    def ok(n): return str(n)[1::2].strip('0') == ""
    print([k for k in range(404) if ok(k)]) # Michael S. Branicky, Apr 12 2022

Extensions

Definition corrected by Franklin T. Adams-Watters, Aug 30 2014

A227510 Numbers such that product of digits of n is positive and a substring of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 41, 51, 61, 71, 81, 91, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 126, 131, 141, 151, 153, 161, 171, 181, 191, 211, 236, 243, 311, 315, 324, 362, 411, 511, 611, 612
Offset: 1

Views

Author

Jayanta Basu, Jul 14 2013

Keywords

Comments

All numbers with at least one zero digit have a product of digits which is a substring; these have been kept out by the restriction on positivity.
The sequence is infinite: if n is a term 10n+1 is also a term. Are there any other patterns (except for prepending 1 to any term)? - Zak Seidov, Jul 24 2013
You can also insert 1 in any position outside the substring that gives the product of digits. - Robert Israel, Aug 26 2014
See also A203566 for a nontrivial subsequence of A203565. The zeroless members of the latter differ from this sequence from 212 on which is there but not here, while 236 is the first here but not there. - M. F. Hasler, Oct 14 2014

Examples

			The product of the digits of 236 is 36, a substring of 236, and hence 236 is a member.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n)
      local L;
      L:= convert(n,base,10);
      if has(L,0) then return false fi;
      verify(convert(convert(L,`*`),base,10),L,'sublist');
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Aug 26 2014
  • Mathematica
    Select[Range[650], FreeQ[x = IntegerDigits[#], 0] && MemberQ[FromDigits /@ Partition[x, IntegerLength[y = Times @@ x], 1], y] &]
  • PARI
    {isok(n)=d=digits(n);p=prod(i=1,#d,d[i]);k=1;while(p&&k<=(#d-#digits(p)+1),v=[];for(j=k,k+#digits(p)-1,v=concat(v,d[j]));if(v==digits(p),return(1));k++);return(0);}
    n=1;while(n<10^4,if(isok(n),print1(n,", "));n++) \\ Derek Orr, Aug 26 2014
    
  • PARI
    is_A227510(n)={(t=digits(prod(i=1,#n=digits(n),n[i])))&&for(i=0,#n-#t,vecextract(n,2^(i+#t)-2^i)==t&&return(1))} \\ M. F. Hasler, Oct 14 2014
  • Python
    from operator import mul
    from functools import reduce
    A227510 = [int(n) for n in (str(x) for x in range(1, 10**5)) if not n.count('0') and str(reduce(mul, (int(d) for d in n))) in n]
    # Chai Wah Wu, Aug 26 2014
    

Extensions

Edited by M. F. Hasler, Oct 14 2014

A236404 Numbers not in A203565.

Original entry on oeis.org

22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 99, 122, 123, 124, 125, 127, 128, 129, 132, 133, 134, 135, 136, 137, 138, 139, 142, 143, 144, 145, 146
Offset: 1

Views

Author

N. J. A. Sloane, Jan 30 2014

Keywords

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,d,i,p,np;
      L:= convert(n,base,10);
      d:= nops(L);
      for i from 1 to d-1 do
        p:= convert(L[i]*L[i+1],base,10);
        np:= nops(p);
        if andmap(j -> L[j..j+np-1] <> p, [$1..d-np+1]) then return true fi
      od;
      false
    end proc:
    select(filter, [$1..200]); # Robert Israel, Oct 18 2023

A366068 Numbers having exactly 10 distinct digits arranged in such a way that the sum of any pair of adjacent digits is a substring of the number.

Original entry on oeis.org

1263907548, 1263908457, 1275480639, 1275480936, 1326708549, 1326709458, 1327608549, 1327609458, 1349067258, 1349076258, 1349085267, 1349085276, 1358067249, 1358076249, 1358094267, 1358094276, 1362708549, 1362709458, 1367085249, 1367094258, 1367208549, 1367209458, 1367245809, 1367249058, 1367249085, 1367254908, 1367258049, 1367258094, 1427086359, 1427095368, 1435907268
Offset: 1

Views

Author

Keywords

Comments

There are 2778 numbers with this property and the last one is 9817263540.

Examples

			The first term is 1263907548 and we see that the 9 successive sums of two adjacent digits are, from left to right, 1+2 (=3), 2+6 (=8), 6+3 (=9), 3+9 (=12), 9+0 (=9), 0+7 (=7), 7+5 (=12), 5+4 (=9) and 4+8 (=12); the results between brackets are substrings of the first term.
		

Crossrefs

Cf. A236402.

Programs

  • Python
    from itertools import permutations
    def afull(): return [int(s) for s in ("".join(c) for c in permutations("0123456789") if c[0]!="0") if all(str(sum(map(int, s[i:i+2]))) in s for i in range(len(s)-1))] # Michael S. Branicky, Oct 15 2023
Showing 1-6 of 6 results.