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

A265043 The n-th Champernowne prime (A176942) is found by concatenating the successive digits of the numbers 1,2,3,...,a(n) and possibly dropping some of final digits of a(n).

Original entry on oeis.org

10, 12, 17, 115, 971, 1364, 9711
Offset: 1

Views

Author

N. J. A. Sloane, Dec 26 2015

Keywords

Examples

			The third Champernowne prime A176942(3) = 123456789101112131415161 is obtained by concatenating the digits of the numbers 1,2,3,4,...,17, and then dropping the final digit; thus a(3) = 17.
		

Crossrefs

See A176942 for the Champernowne primes, A071620 for number of digits.
See also A007908.

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

A071620 Integer lengths of the Champernowne primes (concatenation of first a(n) entries (digits) of A033307 is prime).

Original entry on oeis.org

10, 14, 24, 235, 2804, 4347, 37735
Offset: 1

Views

Author

Robert G. Wilson v, Jun 21 2002

Keywords

Comments

Next term has n > 113821. - Eric W. Weisstein, Nov 04 2015
Also: concatenation of A007376(1 .. a(n)) is prime. - M. F. Hasler, Oct 23 2019

Crossrefs

Cf. A007376 (infinite Barbier word = almost-natural numbers: write n in base 10 and juxtapose digits).
Cf. A033307 (decimal expansion of Champernowne constant), A176942 (the corresponding primes of length a(n)), A265043.
Cf. A072125.

Programs

  • Mathematica
    f[0] = 0; f[n_Integer] := 10^(Floor[Log[10, n]] + 1)*f[n - 1] + n; Do[If[PrimeQ[FromDigits[Take[IntegerDigits[f[n]], n]]], Print[n]], {n, 1, 3000}]
    Cases[FromDigits /@ Rest[FoldList[Append, {}, RealDigits[N[ChampernowneNumber[], 1000]][[1]]]],  p_?PrimeQ :> IntegerLength[p]] (* Eric W. Weisstein, Nov 04 2015 *)
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A071620_gen(): # generator of terms
        c, l = 0, 0
        for n in count(1):
            for d in str(n):
                c = 10*c+int(d)
                l += 1
                if isprime(c):
                    yield l
    A071620_list = list(islice(A071620_gen(),5)) # Chai Wah Wu, Feb 27 2023

Extensions

Edited by Charles R Greathouse IV, Apr 28 2010
a(6) = 4347 from Eric W. Weisstein, Jul 14 2013
a(7) = 37735 from Eric W. Weisstein, Jul 15 2013

A176024 Numbers k such that the reverse concatenation of the first k integers (A000422(k)) is a prime.

Original entry on oeis.org

82, 37765
Offset: 1

Views

Author

Eric W. Weisstein, Apr 06 2010

Keywords

Comments

a(1) was pointed out by Artur Jasinski, Mar 30 2008 (see A000422).
a(2) was found by Eric W. Weisstein, Apr 06 2010.
a(3) > 84300. - Tyler Busby, Feb 21 2023

Examples

			a(1) is 82 since the 155-digit number 828180...54321 is prime.
a(2) is 37765 since the 177719-digit number 377653776437763...54321 is (a probable) prime.
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Dec 03 2021

A181129 Smallest primes of the form (i+1)(i+2)...(h-1)(h)1234...(i-1)(i). These elements, by definition, belong to A001292.

Original entry on oeis.org

2341, 89101234567, 45678910111213123, 23456789101112131415161718192021222324251, 30313233341234567891011121314151617181920212223242526272829, 20212223242526272829303132333435363738394041424344454612345678910111213141516171819, 42434445461234567891011121314151617181920212223242526272829303132333435363738394041, 14151617181920212223242526272829303132333435363738394041424344454647484950515212345678910111213
Offset: 1

Views

Author

Marco Ripà, Jan 23 2011

Keywords

Comments

If we indicate by p(j) the j-th term of A001292, the sequence above can be synthesized as:
p(8), p(53), p(82), p(302), p(591), p(1055), p(1077), p(1340), p(1499), p(1890), p(2231), p(3109), p(3145), p(3620), p(3878), p(4405), p(6248), p(8878), p(8888), p(11329), p(11439), p(12310), p(12344), p(13323), p(13747), p(15883), p(17471), p(17985), p(19815), p(20335), p(21676).
The first 30 terms of the sequence contain fewer than 500 digits. Among the first 22155 terms of A001292 only 31 are primes.

References

  • Marco Ripà, "Rudimatematici", Bookshelf, October 2010.
  • M. Vassilev-Missana and K. Atanassov, "Some Smarandache problems", Hexis, 2004.

Crossrefs

Programs

Extensions

Edited by N. J. A. Sloane, Jan 25 2011

A376221 The smallest Champernowne prime in base n.

Original entry on oeis.org

3, 5, 109, 7, 18796638871, 131870666077, 83, 11, 1234567891, 13, 24677
Offset: 2

Views

Author

Scott R. Shannon, Sep 16 2024

Keywords

Comments

See A176942 for further details.
If a(13) exists it has more than 4800 decimal digits. See the attached text file for other known values up to n = 36.
If a(13) exists it has more than 86468 decimal digits, corresponding to concatenation of up to 20000 base-13 numbers. - Michael S. Branicky, Sep 20 2024

Examples

			a(2) = 3 as 11_2 is prime.
a(3) = 5 as 12_3 is prime.
a(4) = 109 as 1231_4 is prime.
a(5) = 7 as 12_5 is prime.
a(6) = 18796638871 as 12345101112131_6 is prime.
a(7) = 131870666077 as 12345610111213_7 is prime.
a(8) = 83 as 123_8 is prime.
a(9) = 11 as 12_9 is prime.
a(10) = 1234567891 as 1234567891_10 is prime. See A176942.
a(11) = 13 as 12_11 is prime.
a(12) = 24677 as 12345_12 is prime.
		

Crossrefs

A376274 Number of prime divisors, counted with multiplicity, of A252043(n), the first n digits of the Champernowne constant.

Original entry on oeis.org

0, 3, 2, 2, 3, 8, 2, 5, 4, 1, 3, 2, 6, 1, 6, 4, 3, 6, 3, 3, 3, 4, 4, 1, 5, 3, 6, 4, 6, 8, 10, 4, 8, 4, 6, 6, 4, 6, 6, 3, 5, 10, 9, 3, 8, 9, 7, 5, 4, 5, 7, 12, 3, 3, 6, 7, 6, 4, 2, 3, 8, 3, 9, 7, 4, 6, 4, 6, 6, 7, 9, 6, 5, 7, 7, 7, 4, 7, 7, 9, 10, 3, 7, 7, 5, 3, 8, 3, 6, 8, 10, 8, 3, 6, 9, 7, 8, 7, 14, 4
Offset: 1

Views

Author

Scott R. Shannon, Sep 18 2024

Keywords

Examples

			a(6) = 8 as A252043(6) = 123456 = 2^6 * 3 * 643, which has 8 prime divisors.
		

Crossrefs

Programs

  • Mathematica
    Lim=65;ch=RealDigits[ChampernowneNumber[], 10, Lim][[1]];Table[PrimeOmega[FromDigits[Take[ch,n]]],{n,Lim}] (* James C. McMahon, Sep 19 2024 *)

Formula

a(n) = A001222(A252043(n)).

A383790 Prime numbers in order of occurrence as substrings in the concatenation of natural numbers 123456789101112....

Original entry on oeis.org

2, 23, 3, 5, 4567, 67, 7, 23456789, 89, 1234567891, 4567891, 67891, 56789101, 789101, 89101, 101, 11, 12345678910111, 45678910111, 10111, 45678910111213, 678910111213, 78910111213, 11213, 1213, 13, 9101112131, 1112131, 2131, 131, 31, 11213141, 1213141, 41, 91011121314151, 151, 123456789101112131415161
Offset: 1

Views

Author

Gonzalo Martínez, May 09 2025

Keywords

Comments

Primes are ordered first by where they end in the concatenation, and then by where they start if multiple primes end at the same location.
Leading 0 digits are not included in a prime substring, though in fact including them makes no difference to the result.
An equivalent construction is to successively append one digit to the concatenation and add to the sequence all primes in it which are not already seen, ordered by their start position.
This sequence is a permutation of the primes since each prime occurs in the concatenation as itself or earlier.

Examples

			Concatenation 123 has primes 23 and 3 ending at the 3, and 23 is in the sequence first since its substring starts first.
		

Crossrefs

Programs

  • Python
    import sympy
    def concat_up_to_k(k):
           return ''.join(str(i) for i in range(1, k + 1))
    def primes_in_substrings(s):
        A383790 = []
        prime_set = set()
        for i in range(1, len(s) + 1):
            for j in range(i):
                substring = s[j:i]
                if substring[0] != '0':
                    num = int(substring)
                    if sympy.isprime(num) and num not in prime_set:
                       A383790.append(num)
                       prime_set.add(num)
        return A383790
    k = 17
    number_string = concat_up_to_k(k)
    A383790 = primes_in_substrings(number_string)
    print(A383790)
Showing 1-8 of 8 results.