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

A132133 Number of n-digit "Punctual Birds" (cf. A131881).

Original entry on oeis.org

1, 9, 45, 270, 2104, 16941, 142245, 1226146
Offset: 0

Views

Author

Graeme McRae, Aug 11 2007

Keywords

Comments

The number of n-digit "Early Birds" is 9*10^(n-1) - A132133(n), which is 0, 45, 630, 6896, 73059, 757755, 7773854, ... for n = 1, 2, ...
Here a(0) = 1 corresponds to the number 0 which is punctual in the sense that it does not occur before position 0, and which may be considered to have 0 digits for convenience: The index of 10^n in A131881 is then Sum_{k=0..n} a(k). - M. F. Hasler, Oct 25 2019

Examples

			a(2) = 45 because there are 45 2-digit Punctual Birds (10, 11, 13-20, 22, 24-30, 33, 35-40, 44, 46-50, 55, 57-60, 66, 68-70, 77, 79, 80, 88 and 90)
		

Crossrefs

Extensions

Extended to a(0) = 1 by M. F. Hasler, Oct 25 2019

A132131 "Punctual Bird" numbers n with the additional property that n-1 is not a Punctual Bird (cf. A131881).

Original entry on oeis.org

1, 13, 22, 24, 33, 35, 44, 46, 55, 57, 66, 68, 77, 79, 88, 90, 100, 102, 113, 124, 133, 143, 153, 163, 173, 183, 193, 203, 224, 235, 244, 254, 264, 274, 284, 294, 304, 335, 346, 355, 365, 375, 385, 395, 405, 446, 457, 466, 476, 486, 496, 506, 557, 568, 577, 587
Offset: 1

Views

Author

Graeme McRae, Aug 11 2007

Keywords

Comments

Punctual Birds (A131881) are all numbers k with A132131(n) <= k < A132132(n) for some n Early Birds (A116700) are all numbers k with A132132(n) <= k < A132131(n+1) for some n

Examples

			a(1)=1 because 1 is the first Punctual Bird.
a(2)=13 because 1-11 are Punctual Birds and 12 is not a Punctual Bird.
a(3)=22 because 13-20 are Punctual Birds and 21 is not a Punctual Bird.
		

Crossrefs

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

A048991 Write down the numbers 1,2,3,... but omit any number (such as 12 or 23 or 31 ...) which appears in the concatenation of all earlier terms.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 32, 33, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50, 54, 55, 57, 58, 59, 60, 65, 66, 68, 69, 70, 76, 77, 79, 80, 87, 88, 90, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112
Offset: 1

Views

Author

Keywords

Comments

Similar to the "punctual birds" A131881, numbers which do not occur earlier than their "natural" position in the string 123...9101112..., but more complex to compute due to the fact that here the omitted numbers must be taken into account. Contains powers of ten A011557 as a subsequence, at indices (1, 10, 63, 402, 2954, ...), giving the number of n-digit terms as (9, 53, 339, 2552, ...). - M. F. Hasler, Oct 25 2019

Examples

			12 is omitted since we see "1,2" at the beginning of the sequence; 101 is omitted because we can see "10,1[1]"; etc.
Since 12 is omitted, 21 does not occur "earlier" and it is in this sequence, but not in A131881, since it occurs earlier in "12,13". - _M. F. Hasler_, Oct 25 2019
		

References

  • Invented by 10-year-old Hannah Rollman.

Crossrefs

See A048992 for the omitted numbers.
Cf. A105390.

Programs

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

Extensions

Edited by Patrick De Geest, Jun 02 2003

A083655 Numbers which do not appear prematurely in the binary Champernowne word (A030190).

Original entry on oeis.org

0, 1, 2, 4, 8, 10, 16, 32, 36, 64, 128, 136, 256, 512, 528, 1024, 2048, 2080, 4096, 8192, 8256, 16384, 32768, 32896, 65536, 131072, 131328, 262144, 524288, 524800, 1048576, 2097152, 2098176, 4194304, 8388608, 8390656, 16777216, 33554432
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2003

Keywords

Comments

In other words, numbers k whose binary expansion first appears in A030190 at its expected place, i.e., n appears first starting at position A296349(n). - N. J. A. Sloane, Dec 17 2017
a(n) are the Base 2 "Punctual Bird" numbers: write the nonnegative integers, base 2, in a string 011011100101110111.... Sequence gives numbers which do not occur in the string ahead of their natural place. - Graeme McRae, Aug 11 2007

Crossrefs

A000079 is a subsequence.
For the complement, the "Early Bird" numbers, see A296365.

Programs

  • Mathematica
    LinearRecurrence[{0,0,6,0,0,-8},{0,1,2,4,8,10,16,32,36},50] (* Harvey P. Dale, Aug 19 2020 *)
  • PARI
    a(n)= if (n<=2, n, my (m=n\3); if (n%3==0, 2^(2*m), n%3==1, 2^(2*m+1), 2^m + 2^(2*m+1)))  \\ Rémy Sigrist, Jun 14 2020
    
  • PARI
    concat(0, Vec(x*(1 + 2*x + 4*x^2 + 2*x^3 - 2*x^4 - 8*x^5 - 8*x^6 - 8*x^7) / ((1 - 2*x^3)*(1 - 4*x^3)) + O(x^40))) \\ Colin Barker, Jun 14 2020
    
  • PARI
    a(n) = 2^((2*n+1)\3) + (n%3==2)<<(n\3) - (n<3) \\ Charles R Greathouse IV, Dec 16 2022

Formula

A083653(a(n))=a(n), A083654(a(n))=1.
a(0)=0, a(1)=1, a(2)=2; then for n>=1, a(3n)=2^(2n), a(3n+1)=2^(2n+1), a(3n+2)=2^(2n+1)+2^n. - Graeme McRae, Aug 11 2007
From Colin Barker, Jun 14 2020: (Start)
G.f.: x*(1 + 2*x + 4*x^2 + 2*x^3 - 2*x^4 - 8*x^5 - 8*x^6 - 8*x^7) / ((1 - 2*x^3)*(1 - 4*x^3)).
a(n) = 6*a(n-3) - 8*a(n-6) for n>8. (End)
a(n) = 2^floor(2*(n+2)/3-1) + (floor((n+1)/3)-floor(n/3))*2^(floor(n/3)) - floor(5/(n+3)). - Alan Michael Gómez Calderón, Dec 15 2022

Extensions

More terms from Graeme McRae, Aug 11 2007

A131981 Number of early bird 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, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 9, 10, 10, 10, 10, 10, 10, 11, 12, 13, 14, 14, 15, 15, 15, 15, 15, 16, 17, 18, 19, 20, 20, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, 27, 28, 28, 28, 29, 30, 31, 32
Offset: 1

Views

Author

Klaus Brockhaus, Aug 15 2007

Keywords

Comments

a(n) = number of k such that A116700(k) <= n; a(n) = n - number of k such that A131881(k) <= n.
A131982 gives numbers n such that a(n) = n/2, or numbers n such that (number of k such that A116700(k) <= n) = (number of k such that A131881(k) <= n).

Examples

			There are two early bird numbers <= 21, viz. 12 and 21, hence a(21) = 2.
		

Crossrefs

Cf. A116700 (early bird numbers), A131881 (complement of A116700), A132133 (number of n-digit terms of 131881), A105390 (number of Rollman numbers <= n), A131982 (numbers n such that A131981(n) = n/2).

Programs

  • JBASIC
    s$ = "" : d = 0
    FOR n = 1 TO 84
    sn$ = str$(n)
    IF instr(s$, sn$) > 0 THEN d = d+1
    s$ = s$ + sn$ : print d ; ",";
    NEXT

A132132 "Early Bird" numbers n such that n-1 is not an Early Bird (cf. A116700).

Original entry on oeis.org

12, 21, 23, 31, 34, 41, 45, 51, 56, 61, 67, 71, 78, 81, 89, 91, 101, 110, 121, 131, 141, 151, 161, 171, 181, 191, 201, 210, 231, 241, 251, 261, 271, 281, 291, 301, 310, 341, 351, 361, 371, 381, 391, 401, 410, 451, 461, 471, 481, 491, 501, 510, 561, 571, 581
Offset: 1

Views

Author

Graeme McRae, Aug 11 2007

Keywords

Comments

Punctual Birds (A131881) are all numbers k with A132131(n) <= k < A132132(n) for some n Early Birds (A116700) are all numbers k with A132132(n) <= k < A132131(n+1) for some n

Examples

			a(1)=12 because 12 is the first Early Bird.
a(2)=21 because 21 is the second Early Bird.
a(3)=23 because 23 is the third Early Bird.
a(4)=31 because 31 is the fourth Early Bird.
a(5)=34 because 31-32 are Early Birds and 33 is not an Early Bird.
		

Crossrefs

A333921 a(n) is the least k such that the decimal representation of n appears as a substring in the concatenation of 0, 1, ..., k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 2, 13, 14, 15, 16, 17, 18, 19, 20, 13, 22, 3, 24, 25, 26, 27, 28, 29, 30, 14, 24, 33, 4, 35, 36, 37, 38, 39, 40, 15, 25, 35, 44, 5, 46, 47, 48, 49, 50, 16, 26, 36, 46, 55, 6, 57, 58, 59, 60, 17, 27, 37, 47, 57, 66, 7, 68
Offset: 0

Views

Author

Rémy Sigrist, Apr 10 2020

Keywords

Comments

Every nonnegative integer appears finitely many times in this sequence.

Crossrefs

Cf. A007908, A116700, A131881, A333920 (binary variant).

Programs

  • PARI
    a(n, base=10) = { my (w=base^#digits(n, base), m=0); for (k=0, oo, my (d=if (k, digits(k, base), [0])); for (i=1, #d, m=(base*m+d[i])%w; if (m==n, return (k)))) }

Formula

a(n) <= n with equality iff n = 0 or n belongs to A131881.
a(A007908(n)) = n for any n > 0.

A131982 Numbers n such that A131981(n) = n/2.

Original entry on oeis.org

576, 584, 588, 592, 600, 1650, 1654, 3430, 3440, 3448, 3452, 3458, 3462, 3466, 3474, 3520, 3600, 3608, 3610
Offset: 1

Views

Author

Klaus Brockhaus, Aug 15 2007

Keywords

Comments

Numbers n such that number of terms <= n of A116700 equals number of terms <= n of A131881.
Numbers n such that numbers of numbers that occur in the concatenation of 1,2,3...,n-1 equals numbers of numbers that do not occur in the concatenation of 1,2,3...,n-1.
There are no other terms <= 600000. The plots in the link strongly suggest that the sequence is complete.

Examples

			A131981(n) < n/2 for 1 <=n < 576,
A131981(n) < n/2 for 576 < n < 584,
A131981(n) > n/2 for 584 < n < 588,
A131981(n) < n/2 for 588 < n < 592,
A131981(n) > n/2 for 592 < n < 600,
A131981(n) > n/2 for 600 < n < 1650,
A131981(n) > n/2 for 1650 < n < 1654,
A131981(n) < n/2 for 1654 < n < 3430,
A131981(n) > n/2 for 3430 < n < 3440,
..............
A131981(n) < n/2 for 3608 < n <= 3610,
A131981(n) > n/2 for 3610 < n <= 600000.
		

Crossrefs

Cf. A116700 (early bird numbers), A131881 (complement of A116700), A131981 (number of early bird numbers <= n), A105390 (number of Rollman numbers <= n), A105391 (numbers n such that A105390(n) = n/2).

Programs

  • JBASIC
    s$ = "" : c = 0 : d = 0
    FOR n = 1 TO 4000
    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

Extensions

Edited by Charles R Greathouse IV, Oct 28 2009

A132134 Base 3 "Punctual Bird" numbers: write the natural numbers, base 3, in a string 12101112202122100101102... Sequence gives numbers which do not occur in the string ahead of their natural place.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 11, 15, 18, 27, 29, 30, 32, 33, 35, 42, 45, 54, 60, 81, 83, 86, 87, 89, 92, 95, 96, 98, 99, 101, 104, 105, 107, 123, 126, 135, 141, 153, 162, 243, 245, 248, 249, 251, 252, 254, 257, 258, 260, 261, 263, 266, 267, 269, 275, 276, 278, 285, 287, 288
Offset: 1

Views

Author

Graeme McRae, Aug 11 2007

Keywords

Examples

			a(5)=6 because 6 (20, base 3) is the fifth number that appears first in its "natural" place in the string of concatenated base-3 numbers.
		

Crossrefs

Showing 1-10 of 11 results. Next