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 19 results. Next

A048992 Hannah Rollman's numbers: the numbers excluded from A048991.

Original entry on oeis.org

12, 23, 31, 34, 41, 42, 45, 51, 52, 53, 56, 61, 62, 63, 64, 67, 71, 72, 73, 74, 75, 78, 81, 82, 83, 84, 85, 86, 89, 91, 92, 93, 94, 95, 96, 97, 98, 101, 111, 113, 121, 122, 123, 131, 141, 151, 161, 171, 181, 191, 192, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217
Offset: 1

Views

Author

Keywords

Comments

A105390(n) = number of terms <= n; for n < 740: A105390(n) < n/2. - Reinhard Zumkeller, Apr 04 2005
A116700 is a similar sequence. Note that 21 is missing from the current sequence, because we deleted 12 in computing A048991 and now 21 is no longer "earlier in the sequence". On the other hand 21 is present in A116700. - N. J. A. Sloane, Aug 05 2007
Otherwise said: Numbers which occur in the concatenation of all smaller numbers not listed in this sequence. - M. F. Hasler, Dec 29 2012
Number of terms < 10^n, n = 1, 2, ...: (0, 37, 589, 7046, ...), gives number of n-digit terms as first differences: (37, 552, 6457, ...). - M. F. Hasler, Oct 25 2019

Crossrefs

Complement of A048991.
Similar to A116700: "early birds" in the Barbier word A007376 or Champernowne sequence A033307.

Programs

  • Haskell
    import Data.List (isInfixOf)
    a048992 n = a048992_list !! (n-1)
    a048992_list = g [1..] [] where
       g (x:xs) ys | xs' `isInfixOf` ys = x : g xs ys
                   | otherwise          = g xs (xs' ++ ys)
                   where xs' = reverse $ show x
    -- Reinhard Zumkeller, Dec 05 2011
    
  • Mathematica
    a[0] = 1; s = "1"; a[n_] := a[n] = For[k = a[n-1] + 1, True, k++, If[StringFreeQ[s, t = ToString[k]], s = s <> t, Return[k]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 25 2013 *)
  • PARI
    D=[]; for(n=1, 999, for(i=0, #D-#d=digits(n), D[i+1..i+#d]!=d || print1(n",") || next(2)); D=concat(D, d)) \\ M. F. Hasler, Oct 25 2019
  • Python
    # see Hobson link
    

Extensions

Edited by Patrick De Geest, Jun 02 2003

A105391 Numbers m such that there are an equal number of numbers <= m that are contained and that are not contained in the concatenation of terms <= m in A048991.

Original entry on oeis.org

740, 1260, 1262, 5230, 15804, 15814, 15816, 36294, 194876, 213868
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 04 2005

Keywords

Comments

A105390(a(n)) = a(n)/2.
There are no other terms <= 600000. The plots in a105390.gif strongly suggest that the sequence is complete. - Klaus Brockhaus, Aug 15 2007

Examples

			A105390(n) < n/2 for n < a(1)=740;
A105390(n) > n/2 for n with 740 < n < a(2)=1260;
A105390(1261)=631, A105390(a(3))=A105390(1262)=631;
A105390(n) < n/2 for n with 1262 < n < a(4)=5230;
A105390(n) > n/2 for n with 5230 < n < a(5)=15804;
A105390(n) < n/2 for n with 15804 < n < a(6)=15814;
A105390(15815)=7908, A105390(a(7))=A105390(15816)=7909;
A105390(n) < n/2 for n with 15816 < n < a(8)=36294;
A105390(n) > n/2 for n with 36294 < n < a(9)=194876; etc.
		

Crossrefs

Cf. A048991, A048992, A105390, A131982 (numbers n such that A131981(n) = n/2).

Programs

  • JBASIC
    s$ = "" : c = 0 : d = 0
    FOR n = 1 TO 40000
    sn$ = str$(n)
    IF instr(s$, sn$) > 0 THEN d = d+1 ELSE c = c+1 : s$ = s$ + sn$
    IF c = d THEN print n ; "," ;
    NEXT ' Klaus Brockhaus, Aug 15 2007

A116700 "Early bird" numbers: write the natural numbers in a string 12345678910111213.... Sequence gives numbers that occur in the string ahead of their natural place, sorted into increasing order (cf. A117804).

Original entry on oeis.org

12, 21, 23, 31, 32, 34, 41, 42, 43, 45, 51, 52, 53, 54, 56, 61, 62, 63, 64, 65, 67, 71, 72, 73, 74, 75, 76, 78, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 110, 111, 112, 121, 122, 123, 131, 132, 141, 142, 151, 152, 161, 162, 171
Offset: 1

Views

Author

Bernardo Recamán, Jul 22 2007

Keywords

Comments

Based on an idea by Argentinian puzzle creator Jaime Poniachik, these numbers were introduced by Martin Gardner in 2005 in the magazine Math. Horizons, published by the MAA.
A048992 is a similar sequence, but is different because it does not contain 21, etc. - see comments in A048992.
A220376(n) = position of a(n) in 1234567891011121314151617181... . - Reinhard Zumkeller, Dec 13 2012

Examples

			"12" appears at the start of the string, ahead of its position after "11", so is a member.
So are 123, 23, 1234, 234, 34, ... and sorting these into increasing order we get 12, 21, 23, 31, ... - _N. J. A. Sloane_, Aug 28 2019
		

References

  • Martin Gardner, Transcendentals and early birds, Math. Horizons, XIII(2) (2005), pp. 5, 34 (published by Math. Assoc. America).

Crossrefs

Cf. A117804. A131881 gives complement.
Cf. A048991 and A048992 (Rollman numbers).
Cf. A007908 (subsequence, apart from initial 1).

Programs

  • ARIBAS
    s:= ""; for n:=1 to 200 do sn:=itoa(n);
    if substr_index(s, sn) >= 0 then write(n, ","); end;
    s:=concat(s, sn); end; (* Klaus Brockhaus, Jul 23 2007 *)
    
  • Haskell
    import Data.List (isPrefixOf, find)
    import Data.Maybe (fromJust)
    a116700 n = a116700_list !! (n-1)
    a116700_list = filter early [1 ..] where
       early z = not (reverse (show (z - 1)) `isPrefixOf` fst bird) where
          bird = fromJust $ find ((show z `isPrefixOf`) . snd) xys
       xys = iterate (\(us, v : vs) -> (v : us, vs))
                     ([], concatMap show [0 ..])
    -- Reinhard Zumkeller, Dec 13 2012
    
  • Mathematica
    s = ""; Reap[For[n=1, n <= 200, n++, sn = ToString[n]; If[StringPosition[s, sn, 1] =!= {}, Sow[n]]; s = s <> sn]][[2, 1]] (* Jean-François Alcover, Nov 04 2016, after Klaus Brockhaus *)
  • Python
    def aupto(limit):
        s, alst = "", []
        for k in range(1, limit+1):
            sk = str(k)
            if sk in s: alst.append(k)
            s += sk
        return alst
    print(aupto(171)) # Michael S. Branicky, Dec 21 2021
  • UBASIC
    10 X=""
    20 for N=1 to 396
    30 A=cutspc(str(N))
    40 if instr(X,A)>0 then print N;
    50 X+=A
    60 next N
    70 'Warut Roonguthai, Jul 23 2007
    

Formula

Asymptotically, the early bird numbers have density 1 [Golomb].

Extensions

More terms from Warut Roonguthai and Klaus Brockhaus, Jul 23 2007
Golomb links from Jeremy Gardiner, Jul 23 2007

A118248 Least nonnegative integer whose binary representation does not occur in the concatenation of the binary representations of all earlier terms.

Original entry on oeis.org

0, 1, 2, 4, 7, 8, 11, 16, 18, 21, 22, 25, 29, 31, 32, 35, 36, 38, 40, 58, 64, 67, 68, 70, 75, 76, 78, 87, 88, 90, 93, 99, 101, 104, 107, 122, 128, 131, 133, 134, 136, 138, 140, 144, 148, 150, 152, 155, 156, 159, 161, 169, 170, 172, 178, 183, 188, 190
Offset: 0

Views

Author

Leroy Quet, Apr 18 2006

Keywords

Comments

Otherwise said: Omit numbers whose binary representation already occurs in the concatenation of the binary representation of earlier terms. As such, a binary analog of A048991 / A048992 (Hannah Rollman's numbers), rather than "early bird" binary numbers A161373. - M. F. Hasler, Jan 03 2013

Crossrefs

Cf. A118247 (concatenation of binary representations), A118250, A118252 (variants where binary representations are reversed).

Programs

  • Mathematica
    Block[{b = {{0}}, a = {0}, k, d}, Do[k = FromDigits[#, 2] &@ Last@ b + 1; While[SequenceCount[Flatten@ b, Set[d, IntegerDigits[k, 2]]] > 0, k++]; AppendTo[b, d]; AppendTo[a, k], {i, 57}]; a] (* Michael De Vlieger, Aug 19 2017 *)
  • PARI
    A118248(n,show=0,a=0)={my(c=[a],find(t,s,L)=L || L=#s; for(i=0,#t-L, vecextract( t,(2^L-1)<M. F. Hasler, Jan 03 2013
    
  • Perl
    $s="";$i=0;do{$i++;$b=sprintf("%b",$i);if(index($s,$b)<0){print("$i=$b\n");$s.=$b}}while(1);

Extensions

More terms from Graeme McRae, Apr 19 2006
Explicit definition from M. F. Hasler, Dec 29 2012
Perl program by Phil Carmody, Mar 19 2015
Crossref and Perl program by Phil Carmody, Mar 19 2015

A161373 "Early bird" binary numbers: write the natural numbers in binary representation in a string 011011100101110111.... Sequence gives numbers which occur in the string strictly ahead of their natural place.

Original entry on oeis.org

3, 5, 6, 7, 9, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65
Offset: 1

Author

Keywords

Comments

In contrast to sequences A048991, A048992 (Hannah Rollman's numbers), and binary analogs A190784 and related, the numbers listed here are repeated in their natural position when forming the concatenation of binary digits, even though they occur already earlier in the string. - M. F. Hasler, Jan 01 2013

Examples

			Decimal 0 1 2 3 4 5 ... Binary 0 1 10 11 100 101 ... 3 is before its natural position ('1' + beginning of '2' -> 011...) The same for : 5: '2' + beginning of '3' -> 01101... 6: '1' + '2' -> 0110... etc. In the first 5 binary numbers we can find ahead of their natural place: 3,5,6,7,9,11,12,13,14,18,23,25,27,28,37,46,50,55,57
20 ('10100') occurs at the joint of 18 and 19: the last 2 digits of '10010' and the first three of '10011'
		

Crossrefs

Extensions

"Strictly" added to definition, offset corrected as customary for lists, 20 added by Hagen von Eitzen, Jun 27 2009

A105390 Number of Hannah Rollman's numbers <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 11, 11, 11, 11, 11, 12, 13, 14, 15, 15, 15, 16, 16, 16, 16, 17, 18, 19, 20, 21, 21, 21, 22, 22, 22, 23, 24, 25, 26, 27, 28, 28
Offset: 1

Author

Reinhard Zumkeller, Apr 04 2005

Keywords

Comments

a(n) = #{k: A048992(k)<=n} = n - #{k: A048991(k)<=n};
a(n) < n/2 for n < 740; a(n) > n/2 for 740 < n < 1260,
see A105391 for numbers m with a(m) = m/2.

Crossrefs

A084383 a(0)=0; for n>0, a(n) = smallest number that is not a concatenation of any number of distinct earlier terms in increasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 30, 31, 32, 33, 40, 41, 42, 43, 44, 50, 51, 52, 53, 54, 55, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 112, 113, 114, 115, 116, 117, 118, 119, 200, 201, 202
Offset: 0

Author

Amarnath Murthy, May 29 2003

Keywords

Comments

After 11 we can see 1,2 -> 12, 1,3 -> 13, etc., but not 20.

Crossrefs

Hannah Rollman's numbers: A048991, A048992.

Programs

  • Python
    from itertools import islice
    def incats(s, L):
        if s == "": return True
        return any(s.startswith(w) and incats(s[len(w):], L[i+1:]) for i, w in enumerate(L))
    def agen(): # generator of terms
        L, an, s = ["0"], 1, "1"
        yield from [0]
        while True:
            yield an
            L.append(s)
            while incats((s:=str(an)), L):
                an += 1
    print(list(islice(agen(), 70))) # Michael S. Branicky, Feb 01 2024

Extensions

More terms from Patrick De Geest, Jun 03 2003

A355790 Numbers that can be written as the product of two divisors greater than 1 such that the number is contained in the string concatenation of the divisors.

Original entry on oeis.org

64, 95, 110, 210, 325, 510, 624, 640, 664, 950, 995, 1010, 1100, 1110, 3250, 3325, 5134, 6240, 6400, 6640, 6664, 7125, 7616, 8145, 9500, 9950, 9995, 11000, 11100, 11110, 20100, 21052, 21175, 25100, 26208, 32500, 33250, 33325, 35126, 50100, 51020, 51204, 51340, 57125, 62400, 64000, 65114
Offset: 1

Author

Scott R. Shannon, Jul 17 2022

Keywords

Examples

			64 is a term as 64 = 16 * 4 and "16" + "4" = "164" contains "64".
65114 is a term as 65114 = 4651 * 14 and "4651" + "14" = "465114" contains "65114".
See the attached text file for other examples.
		

Programs

  • Python
    from sympy import divisors
    def ok(n):
        s, divs = str(n), divisors(n)[1:-1]
        return any(s in str(d)+str(n//d) for d in divs)
    print([k for k in range(1, 10**5) if ok(k)]) # Michael S. Branicky, Jul 27 2022

A382441 Lexicographically earliest sequence of positive integers such that for any n > 1, a(n) does not divide any of the positive numbers whose decimal expansion appears as a contiguous subword in the concatenation of the previous terms.

Original entry on oeis.org

1, 2, 5, 7, 8, 9, 10, 16, 20, 32, 40, 50, 51, 53, 64, 83, 93, 100, 117, 118, 126, 160, 186, 200, 207, 224, 250, 288, 311, 320, 352, 372, 391, 400, 448, 480, 500, 625, 640, 713, 800, 960, 979, 1000, 1011, 1039, 1043, 1097, 1099, 1173, 1200, 1250, 1359, 1426
Offset: 1

Author

Rémy Sigrist, Mar 25 2025

Keywords

Comments

This sequence contains all powers of 10.

Examples

			a(1) = 1.
a(2) must not divide 1; we can take a(2) = 2.
a(3) must not divide 1, 2 or 12; we can take a(3) = 5.
		

Crossrefs

Cf. A048991, A382442 (binary variant), A382445.

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        an, s, d = 1, "1", [1]
        while True:
            yield an
            an = next(k for k in count(an+1) if not any(di%k == 0 for di in d))
            for di in str(an):
                s += di
                d += [si for i in range(len(s)) if (si:=int(s[i:])) > an]
            d = sorted(set(d))
    print(list(islice(agen(), 54))) # Michael S. Branicky, Mar 26 2025
    (C++) // See Links section.

A128291 Complement of A118248.

Original entry on oeis.org

3, 5, 6, 9, 10, 12, 13, 14, 15, 17, 19, 20, 23, 24, 26, 27, 28, 30, 33, 34, 37, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 66, 69, 71, 72, 73, 74, 77, 79, 80, 81, 82, 83, 84, 85, 86, 89, 91, 92, 94, 95, 96, 97, 98, 100
Offset: 0

Author

Nick Hobson, Feb 24 2007

Keywords

Comments

Also: Numbers whose binary representation is a substring of the concatenation of the binary representation of all smaller nonnegative integers not listed earlier. - M. F. Hasler, Dec 29 2012

Examples

			The first term is 3, smallest integer whose binary representation "11"[2] is a substring of the concatenation of the smaller numbers 0,1,2 ~> concat(0,1,10)="0110".
Next is 5="101"[2], which is a substring of concat(0,1,2="10",4="100") = "0110100". Note that 3, since it occurs earlier, is excluded from the list of numbers which are concatenated. - _M. F. Hasler_, Dec 29 2012
		

Crossrefs

Showing 1-10 of 19 results. Next