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-10 of 10 results.

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

A203566 Numbers that contain the product of any two adjacent digits as a substring, and have at least one pair of adjacent digits > 1.

Original entry on oeis.org

126, 153, 1025, 1052, 1126, 1153, 1260, 1261, 1262, 1530, 1531, 1535, 2045, 2054, 2126, 2137, 2153, 2173, 2204, 2214, 2306, 2316, 2408, 2418, 2510, 2612, 2714, 2816, 2918, 3056, 3065, 3126, 3153, 3206, 3216, 3309, 3319, 3412, 3515, 3618, 4022, 4058, 4085, 4122, 4126, 4153, 4208, 4218
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).
Any number having no two adjacent digits larger than 1 is trivially in the sequence A203565, which motivated the present sequence.
In the same way, any number obtained from some a(n) of this sequence by adding any number of digits '0' and '1' on either side is again in this sequence (126 -> 1126, 1260, 1261, ...). This suggests that "primitive" numbers of this kind be defined.

Examples

			The number 126 is in the sequence since 1*2=2 and 2*6=12 are both substrings of "126".
		

Crossrefs

Programs

  • PARI
    has(n,m)={ my(p=10^#Str(m)); until( m>n\=10, n%p==m & return(1))}
    is_A203566(n)={ my(d,f=0); n>21 & vecsort(d=eval(Vec(Str(n))))[#d-1]>1 & for( i=2,#d, d[i]<2 & i++ & next; d[i-1]>1 | next; has(n,d[i]*d[i-1]) | return; f=1);f }
    for( n=22,9999, is_A203566(n) & print1(n","))

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

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, 404, 405, 406, 407
Offset: 1

Views

Author

Eric Angelini, Jan 30 2014

Keywords

Comments

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
1263907548 is the smallest term that contains all ten digits. - M. F. Hasler, Jan 30 2014
Where does this first differ from A032945? - R. J. Mathar, Feb 03 2014
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

Examples

			Examples of numbers in the sequence:
80 --> 8+0=8
107 --> 1+0=1  /  0+7=7
910 --> 9+1=10  /  1+0=1
1037 --> 1+0=1  /  0+3=3  /  3+7=10
1459 --> 1+4=5  /  4+5=9  /  5+9=14
41358 --> 4+1=5  /  1+3=4  /  3+5=8  /  5+8=13
		

Crossrefs

Cf. A236403 (complement).

Programs

  • Mathematica
    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 *)
  • 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
    
  • Python
    def ok(n):
      s = str(n)
      return all(str(sum(map(int, s[i:i+2]))) in s for i in range(len(s)-1))
    print(list(filter(ok, range(408)))) # Michael S. Branicky, Jun 11 2021

Formula

a(n) ~ n. - Charles R Greathouse IV, Jan 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

A342127 Numbers m such that the product of m and the string m in reverse contains m as a substring.

Original entry on oeis.org

0, 1, 5, 6, 10, 47, 50, 60, 75, 78, 100, 125, 152, 457, 500, 600, 750, 1000, 1025, 1052, 1250, 1520, 5000, 5625, 6000, 7500, 10000, 10025, 10052, 10250, 10520, 12266, 12500, 15200, 23258, 43567, 50000, 56250, 60000, 62656, 75000, 82291, 90625, 98254, 100000, 100025, 100052, 100250, 100520
Offset: 1

Views

Author

Scott R. Shannon, Mar 01 2021

Keywords

Comments

Numerous patterns exist in the terms, e.g., all numbers of the form 1*10^k, 5*10^k, 6*10^k, 75*10^k, 10^(k+2)+25, where k>=0, are in the sequence.

Examples

			6 is a term as 6*reverse(6) = 6*6 = 36 contains '6' as a substring.
47 is a term as 47*reverse(47) = 47*74 = 3478 contains '47' as a substring.
1052 is a term as 1052*reverse(1052) = 1052*2501 = 2631052 contains '1052' as a substring.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,d,Lp,r,i;
      L:= convert(n,base,10);
      d:= nops(L);
      r:= add(L[-i]*10^(i-1),i=1..d);
      Lp:= convert(n*r,base,10);
      ormap(t -> Lp[t..t+d-1] = L, [$1..nops(Lp)+1-d])
    end proc:
    select(filter, [$0..120000]); # Robert Israel, Mar 24 2024
  • Mathematica
    Select[Range[0,110000],SequenceCount[IntegerDigits[# IntegerReverse[#]],IntegerDigits[#]]>0&] (* Harvey P. Dale, Apr 20 2024 *)
  • PARI
    isok(m) = #strsplit(Str(m*fromdigits(Vecrev(digits(m)))), Str(m)) > 1; \\ Michel Marcus, Mar 01 2021
    
  • Python
    def ok(n): return (s:=str(n)) in str(n*int(s[::-1]))
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Mar 25 2024

A342130 Decimal numbers m such that the product of the binary string of m and the binary string of m in reverse contains the binary string of m as a substring.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 27, 32, 54, 64, 108, 128, 139, 165, 256, 512, 815, 1024, 1630, 2048, 2821, 3167, 3693, 3941, 4096, 4747, 5642, 6334, 7737, 7881, 8192, 9494, 10837, 11284, 12479, 13363, 16384, 18988, 22568, 24669, 24958, 27945, 31205, 32768, 38869, 40861, 45136, 48367, 49338, 49535, 55121
Offset: 1

Views

Author

Scott R. Shannon, Mar 01 2021

Keywords

Comments

All numbers of the form 2^k, k>=0, are in the sequence.

Examples

			8 is a term as bin(8)*reverse(bin(8)) = 100_2*1_2 = 100_2 contains '100' as a substring.
27 is a term as bin(27)*reverse(bin(27)) = 11011_2*11011_2 = 1011011001_2 contains '11011' as a substring.
108 is a term as bin(108)*reverse(bin(108)) = 1101100_2*11011_2 = 101101100100_2 contains '1101100' as a substring.
139 is a term as bin(139)*reverse(bin(139)) = 10001011_2*11010001_2 = 111000101111011_2 contains '10001011' as a substring.
		

Crossrefs

Programs

  • PARI
    strbin(x) = Str(fromdigits(binary(x), 10));
    isok(m) = {my(p = m*fromdigits(Vecrev(binary(m)), 2)); #strsplit(strbin(p), strbin(m)) > 1;} \\ Michel Marcus, Mar 01 2021

A352463 Numbers k with the property that the product of the digits of k starts k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 21, 31, 41, 51, 61, 71, 81, 91, 111, 126, 153, 211, 243, 311, 362, 411, 511, 611, 711, 811, 911, 1111, 1216, 1223, 1232, 1261, 1288, 1359, 1449, 1513, 1531, 1755, 2111, 2413, 2431, 3111, 3612, 3621, 3844, 4111, 5111, 6111, 6728, 7111, 7357, 8111, 9111, 11111, 11278, 11287
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Mar 17 2022

Keywords

Examples

			a(10) = 11 starts with 1, which is the product 1*1;
a(20) = 126 starts with 12, which is the product 1*2*6;
a(42) = 1755 starts with 175, which is the product ; 1*7*5*5; etc.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n], p, dp, ndp}, p = Times @@ d; dp = IntegerDigits[p]; ndp = Length[dp]; dp == d[[1 ;; ndp]]]; Select[Range[12000], q] (* Amiram Eldar, Mar 18 2022 *)
  • Python
    from math import prod
    def ok(n): s = str(n); return s.startswith(str(prod(map(int, s))))
    print([k for k in range(1, 12000) if ok(k)]) # Michael S. Branicky, Mar 17 2022

A352464 Numbers k whose decimal expansion ends in the product of digits of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 236, 240, 250, 260, 270, 280, 290, 300, 310, 315, 320, 324, 330, 340, 350, 360, 370, 380, 390, 400
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Mar 17 2022

Keywords

Examples

			   10 is a term because  "10" ends in  "0" = 1*0;
  118 is a term because "118" ends in  "8" = 1*1*8;
  236 is a term because "236" ends in "36" = 2*3*6; etc.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n], p, dp, ndp}, p = Times @@ d; dp = IntegerDigits[p]; ndp = Length[dp]; dp == d[[-ndp ;; -1]]]; Select[Range[400], q] (* Amiram Eldar, Mar 17 2022 *)
  • Python
    from math import prod
    def ok(n): s = str(n); return s.endswith(str(prod(map(int, s))))
    print([k for k in range(1, 401) if ok(k)]) # Michael S. Branicky, Mar 17 2022

A307177 Decimal expansion of smallest nontrivial base-10 number that contains all pairwise products of its digits as substrings.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 4, 0, 1, 5, 2, 1, 6, 2, 4, 2, 5, 3, 0, 3, 2, 7, 2, 8, 1, 8, 3, 5, 4, 5, 6, 3, 6, 4, 8, 4, 9
Offset: 37

Views

Author

Rob Pratt, Mar 27 2019

Keywords

Comments

"Pairwise products" includes the squares of the digits.
Suggested by Ricardo Palomino, who mentioned the trivial numbers A007088.
If any digit other than 0 or 1 appears, then all ten digits appear, as can easily be checked for each digit. For example, if 2 appears then 2*2 = 4 appears, which implies that 2*4 = 8 appears and {1,6} (from 4*4 = 16) appear, which implies that 3 appears (from 4*8 = 32), which implies that 3*3 = 9 appears, which implies that {2,7} appear (from 3*9), which implies that {5,6} appear (from 7*8), which implies that 0 appears (from 2*5 = 10).
There are 37 distinct products (10 with one digit and 27 with two digits) of pairs of digits from {0,1,...,9}.
Rob Pratt solved an asymmetric traveling salesman problem (ATSP) on 38 nodes to find the minimum number of digits, which turns out to be 37, and then solved a sequence of integer linear programming problems (minimizing one digit at a time from left to right) to find the minimum such 37-digit number.

Examples

			1012014015216242530327281835456364849.
		

Crossrefs

A203565 considers only products of adjacent digits.

A336621 Lexicographically earliest sequence of distinct positive terms starting with a(1) = 2 such that the product of the last two digits of the sequence (when extended with a new term) is not in the sequence.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 10, 11, 16, 23, 26, 27, 29, 30, 32, 34, 36, 37, 38, 40, 43, 45, 46, 47, 50, 53, 54, 55, 57, 60, 61, 62, 63, 64, 67, 68, 70, 73, 74, 75, 76, 77, 78, 80, 83, 86, 87, 89, 90, 92, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 116, 120, 123, 126, 127, 129, 130, 132
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jul 27 2020

Keywords

Examples

			As a(1) = 2 and a(2) = 3, the product 2 * 3 = 6 cannot be in the sequence;
as a(2) = 3 and a(3) = 4, the product 3 * 4 = 12 cannot be in the sequence;
(...)
as a(6) = 8 and a(7) = 9, the product 8 * 9 = 72 cannot be in the sequence;
as a(8) = 10, the product 1 * 0 = 0 cannot be in the sequence;
as a(9) = 11, the product 1 * 1 = 1 cannot be in the sequence; etc.
		

Crossrefs

Cf. A203565.

Programs

  • Mathematica
    lst={};a[1]=2;a[n_]:=a[n]=Block[{k=2},While[s=Array[a,n-1];AppendTo[lst,p=Times@@(Flatten[IntegerDigits/@Join[Last@s,{k}]][[-2;;]])];MemberQ[s,p]||MemberQ[s,k]||MemberQ[lst,k],k++;lst=Most@lst];k];Array[a,73] (* Giorgos Kalogeropoulos, May 12 2022 *)
Showing 1-10 of 10 results.