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

A131881 Complement of A116700. Might be called "punctual birds".

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jul 23 2007

Keywords

Comments

Numbers n that do not occur in the concatenation of 1,2,3...,n-1.
Every power of 10 is a member, which proves that the sequence is infinite. - N. J. A. Sloane, Jul 23 2007
The asymptotic density of the sequence is zero. The number of k-digit terms is A132133 = (9, 45, 270, 2104, ...), k = 1, 2, .... These are the first difference of the indices of powers of 10, T = (1, 10, 55, 325, 2429, ...), which we get as partial sums if we prefix A132133(0) = 1 corresponding to the number 0. - M. F. Hasler, Oct 24 2019

Examples

			The first number not in this sequence is the early bird "12" which occurs as concatenation of 1 and 2.
		

Crossrefs

Cf. A116700 (early birds), A132133 (number of n-digit terms).
Cf. A007376 (Barbier word ...,8,9,1,0,1,1,...), A033307 (Champernowne constant).

Programs

  • PHP
    $s="0"; for(; ++$i < 2000; $s .= $i) if( !strpos($s,"$i")) echo $i,", ";

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

A220376 a(n) = position of first occurrence of n-th "early bird" number (cf. A116700) in the string 1234567891011121314151617181920212223242526272... .

Original entry on oeis.org

1, 15, 2, 17, 37, 3, 19, 39, 59, 4, 21, 41, 61, 81, 5, 23, 43, 63, 83, 103, 6, 25, 45, 65, 85, 105, 125, 7, 27, 47, 67, 87, 107, 127, 147, 8, 9, 29, 49, 69, 89, 109, 129, 149, 169, 10, 195, 12, 13, 14, 33, 1, 16, 53, 18, 73, 20, 93, 22, 113, 24, 133, 26, 153
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 13 2012

Keywords

Examples

			.  1   5    10   15   20   25   30   35   40   45   50   55   60
.  ....v....x....v....x....v....x....v....x....v....x....v....x....
.  12345678910111213141516171819202122232425262728293031323334353...
.  |||           | | |                 | |
.  |||           | | |                 | |
.  |||           | | |                 | +---  A116700(8) = 42
.  |||           | | |                 |          -> a(8) = 39
.  |||           | | |                 |
.  |||           | | |                 +--- A116700(5) = 32
.  |||           | | |                         -> a(5) = 37
.  |||           | | |
.  |||           | | + --- A116700(7) = 41  -> a(7) = 19
.  |||           | |
.  |||           | +--- A116700(4) = 31  -> a(4) = 17
.  |||           |
.  |||           +--- A116700(2) = 21  -> a(2) = 15
.  |||
.  ||+--- A116700(6) = 34  -> a(6) = 3
.  ||
.  |+--- A116700(3) = 23  -> a(3) = 2
.  |
.  +--- A116700(1) = 12  -> a(1) = 1, see also A007908.
		

Crossrefs

Cf. A117804.

Programs

  • Haskell
    import Data.List (isPrefixOf, find)
    import Data.Maybe (fromJust)
    a220376 n = a220376_list !! (n-1)
    a220376_list = at 1 where
       at z | (reverse (show (z - 1)) `isPrefixOf` fst bird) = at (z + 1)
            | otherwise                = (length $ fst bird) : at (z + 1)
            where bird = fromJust $ find ((show z `isPrefixOf`) . snd) xys
       xys = iterate (\(us, v : vs) -> (v : us, vs))
                     ([], concatMap show [0 ..])

A160234 Number of n-digit "early bird numbers" A116700.

Original entry on oeis.org

0, 45, 630, 6896, 73059, 757755, 7773854, 79228098, 803943262, 8133323510
Offset: 1

Views

Author

Zak Seidov, May 04 2009

Keywords

Examples

			a(1) = 0 because there are no 1-digit terms in A116700;
a(1) = 45 because there are 45 2-digit terms in A116700: 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.
		

Crossrefs

Cf. A116700 ("Early bird" numbers).

Programs

  • Mathematica
    s="1";ss={};Do[tsn=ToString[n];If[ !StringFreeQ[s,tsn],AppendTo[ss,n]];s=s<>tsn,{n,2,99999}];Table[Length[Select[ss,10^(n-1)<=#<10^n&]],{n,1,5}]
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        s = ""
        for digits in count(1):
            c = 0
            for k in range(10**(digits-1), 10**digits):
                sk = str(k)
                if sk in s: c += 1
                s += sk
            yield c
    print(list(islice(agen(), 5))) # Michael S. Branicky, Mar 17 2022

Extensions

a(6)-a(7) from Michael S. Branicky, Mar 17 2022
a(8) from Michael S. Branicky, Dec 21 2022
a(9)-a(10) from Michael S. Branicky, Feb 06 2023

A007908 Triangle of the gods: to get a(n), concatenate the decimal numbers 1,2,3,...,n.

Original entry on oeis.org

1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011, 123456789101112, 12345678910111213, 1234567891011121314, 123456789101112131415, 12345678910111213141516, 1234567891011121314151617, 123456789101112131415161718
Offset: 1

Views

Author

R. Muller

Keywords

Comments

For the name "triangle of the gods" see Pickover link. - N. J. A. Sloane, Dec 15 2019
Number of digits: A058183(n) = A055642(a(n)); sums of digits: A037123(n) = A007953(a(n)). - Reinhard Zumkeller, Aug 10 2010
Charles Nicol and John Selfridge ask if there are infinitely many primes in this sequence - see the Guy reference. - Charles R Greathouse IV, Dec 14 2011
Stephan finds no primes in the first 839 terms. I checked that there are no primes in the first 5000 terms. Heuristically there are infinitely many, about 0.5 log log n through the n-th term. - Charles R Greathouse IV, Sep 19 2012 [Expanded search to 20000 without finding any primes. - Charles R Greathouse IV, Apr 17 2014] [Independent search extended to 64000 terms without finding any primes. - Dana Jacobsen, Apr 25 2014]
Elementary congruence arguments show that primes can occur only at indices congruent to 1, 7, 13, or 19 mod 30. - Roderick MacPhee, Oct 05 2015
A note on heuristics: I wrote a quick program to count primes in sequences which are like A007908 but start at k instead of 1. I ran this for k = 1 to 100 and counted the primes up to 1000 (1000 possibilities for k = 1, 999 for k = 2, etc. up to 901 for k = 100). I then compared this to the expected count which is 0 if the number N is divisible by 2, 3, or 5 and 15/(4 log N) otherwise. (If N < 43 I counted the number as 1 instead.) k = 1 has 1.788 expected primes but only 0 actual (of course). k = 2 has 2.268 expected but 4 actual (see A262571, A089987). In total the expectation is 111.07 and the actual count is 110, well within the expected error of +/- 10.5. - Charles R Greathouse IV, Sep 28 2015
Early bird numbers for n > 1: a(2) = A116700(1) = 12; a(3) = A116700(52) = 123; a(4) = A116700(725) = 1234; a(5) = A116700(8074) = 12345; a(6) = A116700(85846) = 123456. - Reinhard Zumkeller, Dec 13 2012
For n < 10^6, a(n)/A000217(n) is an integer for n = 1, 2, and 5. The integers are 1, 4, and 823 (a prime), respectively. - Derek Orr, Sep 04 2014; Max Alekseyev, Sep 30 2015
In order to be a prime, a(n) must end in a digit 1, 3, 7 or 9, so only 4 among 10 consecutive values can be prime. (But a(64000) already has A058183(64000) > 300000 digits.) Also, a(64001) and a(64011) and more generally a(64001+10k) is divisible by 3 unless k == 2 (mod 3), but for k = 2, 5, 8, ... 23 these are divisible by small primes < 999. a(64261) is the first serious candidate in this subsequence. - M. F. Hasler, Sep 30 2015
There are no primes in the first 10^5 terms. - Max Alekseyev, Oct 03 2015; Oct 11 2015
There are no primes in the first 200000 terms. - Serge Batalov, Oct 24 2015
There is a distributed project for continued search, using PRPNet/PFGW software; see the Mersenne Forum link below. - Serge Batalov, Oct 18 2015
It appears that the Mersenne Forum search reached n = 344869 without finding a prime, and was then abandoned. It would be nice if someone could recover the final version of that link from the Wayback machine - the Great Smarandache PRPrime search, http://99.121.249.54:1200 - so that we have a record of how far they searched. - N. J. A. Sloane, Apr 09 2018
The web page https://www.mersenneforum.org/showthread.php?t=20527&page=9 has a comment from Serge Balatov that seems to say that the search reached 10^6 without finding a prime. It would be nice to have this confirmed, and to get more details about how it was done. - N. J. A. Sloane, Dec 15 2019
The expected number of primes among the first million terms is about 0.6. - Ernst W. Mayer, Oct 09 2015
A few semiprimes exist among the early terms, but then become scarce: see A046461. For the base-2 analog of this sequence (A047778), there is a 15-decimal digit prime, but Hans Havermann has shown that the second prime would have more than 91000 digits. - N. J. A. Sloane, Oct 08 2015

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A3, page 15, of 3rd edition, Springer, 2010.

Crossrefs

See A057137 for another version.
Cf. A033307, A053064, A000422 (left concatenations)
If we concatenate 1 through n but leave out k, we get sequences A262571 (leave out 1) through A262582 (leave out 12), etc., and again we can ask for the smallest prime in each sequence. See A262300 for a summary of these results. Primes seem to exist if we search far enough. - N. J. A. Sloane, Sep 29 2015
Concatenation of first n numbers in other bases: 2: A047778, 3: A048435, 4: A048436, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: this sequence, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: A048446, 16: A048447. - Dylan Hamilton, Aug 11 2010
Entries that give the primes in sequences of this type: A089987, A262298, A262300, A262552, A262555.
For semiprimes see A046461.
See also A007376 (the almost-natural numbers), A071620 (primes in that sequence).
See also A033307 (the Champernowne constant) and A176942 (the Champernowne primes). A262043 is a variant of the present sequence.
A002782 is an amusing cousin of this sequence.
Least prime factor: A075019.

Programs

  • Haskell
    a007908 = read . concatMap show . enumFromTo 1 :: Integer -> Integer
    -- Reinhard Zumkeller, Dec 13 2012
    
  • Magma
    [Seqint(Reverse(&cat[Reverse(Intseq(k)): k in [1..n]])): n in [1..17]];  // Bruno Berselli, May 27 2011
    
  • Maple
    A055642 := proc(n) max(1, ilog10(n)+1) ; end: A007908 := proc(n) if n = 1 then 1; else A007908(n-1)*10^A055642(n)+n ; fi ; end: seq(A007908(n),n=1..12) ; # R. J. Mathar, May 31 2008
    # second Maple program:
    a:= proc(n) a(n):= `if`(n=0, 0, parse(cat(a(n-1), n))) end:
    seq(a(n), n=1..22);  # Alois P. Heinz, Jan 12 2021
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[Range[n]]]], {n, 20}] (* Alonso del Arte, Sep 19 2012 *)
    FoldList[#2 + #1 10^IntegerLength[#2] &, Range[20]] (* Eric W. Weisstein, Nov 06 2015 *)
    FromDigits /@ Flatten /@ IntegerDigits /@ Flatten /@ Rest[FoldList[List, {}, Range[20]]] (* Eric W. Weisstein, Nov 04 2015 *)
    FromDigits /@ Flatten /@ IntegerDigits /@ Rest[FoldList[Append, {}, Range[20]]] (* Eric W. Weisstein, Nov 04 2015 *)
  • Maxima
    a[1]:1$ a[n]:=a[n-1]*10^floor(log(10*n)/log(10))+n$ makelist(a[n],n,1,17);  /* Bruno Berselli, May 27 2011 */
    
  • PARI
    a(n)=my(s="");for(k=1,n,s=Str(s,k));eval(s) \\ Charles R Greathouse IV, Sep 19 2012
    
  • PARI
    A007908(n,a=0)={for(d=1,#Str(n),my(t=10^d);for(k=t\10,min(t-1,n),a=a*t+k));a} \\ M. F. Hasler, Sep 30 2015
    
  • Python
    def a(n): return int("".join(map(str, range(1, n+1))))
    print([a(n) for n in range(1, 18)]) # Michael S. Branicky, Jan 12 2021
    
  • Python
    from functools import reduce
    def A007908(n): return reduce(lambda i,j:i*10**len(str(j))+j,range(1,n+1)) # Chai Wah Wu, Feb 27 2023

Formula

a(n) = n + a(n-1)*10^A055642(n). - R. J. Mathar, May 31 2008
a(n) = floor(C*10^(A058183(n))) with C = A033307. - José de Jesús Camacho Medina, Aug 19 2015

Extensions

Name edited by N. J. A. Sloane, Dec 15 2019

A117804 Natural position of n in the string 12345678910111213....

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120
Offset: 1

Views

Author

Warut Roonguthai, Jul 23 2007

Keywords

Comments

The number of digits necessary to write down all the numbers 0, 1, 2, ..., n-1. Thus, the partial sums of A055642 are given by a(n+1). - Hieronymus Fischer, Jun 08 2012
From Daniel Forgues, Mar 21 2013: (Start)
From n = 10^0 + 1 to 10^1: a(n) - a(n-1) = 1 (9 * 10^0 terms);
From n = 10^1 + 1 to 10^2: a(n) - a(n-1) = 2 (9 * 10^1 terms);
From n = 10^2 + 1 to 10^3: a(n) - a(n-1) = 3 (9 * 10^2 terms);
...
From n = 10^k + 1 to 10^(k+1): a(n) - a(n-1) = k+1 (9 * 10^k terms). (End)
By the "number of digits" definition, a(n) = 1 + A058183(n-1) for n > 1. - David Fifield, Jun 02 2019

Examples

			12 begins at the 14th place in 12345678910111213... (we are ignoring "early bird" occurrences here, cf. A116700), so a(12) = 14.
From _Daniel Forgues_, Mar 21 2013: (Start)
a(10^1) = 10. (1*10^1 - 0)
a(10^2) = 190. (2*10^2 - 10)
a(10^3) = 2890. (3*10^3 - 110)
a(10^4) = 38890. (4*10^4 - 1110)
a(10^5) = 488890. (5*10^5 - 11110)
a(10^6) = 5888890. (6*10^6 - 111110)
...
a(10^k) = k*10^k - R_k + 1, R_k := k-th repunit (cf. A002275)
(the number of digits necessary to write down the numbers 0..10^k-1). (End)
		

Crossrefs

Formula

a(n) = d*n + 1 - (10^d - 1)/9 where d is the number of decimal digits in n, i.e., d = floor(log_10(n)) + 1.
From Hieronymus Fischer, Jun 08 2012: (Start)
a(n) = Sum_{j=0..n-1} A055642(j).
a(n) = 1 + A055642(n-1)*n - (10^A055642(n-1)-1)/9.
a(n) = 1 + A055642(n)*n - (10^A055642(n)-1)/9.
a(10^n) = (9*n-1)*(10^n-1)/9 + n + 1. (This is the total number of digits necessary to write down all the numbers with <= n places.)
G.f.: g(x) = x/(1-x) + (x/(1-x)^2)*Sum_{j>=0} x^10^j; corrected by Ilya Gutkovskiy, Jan 09 2017 (End)

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

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

Views

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

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

Showing 1-10 of 28 results. Next