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

A176942 Champernowne primes.

Original entry on oeis.org

1234567891, 12345678910111, 123456789101112131415161
Offset: 1

Views

Author

Marco Ripà, Jan 27 2011

Keywords

Comments

Primes formed from an initial portion 1234... of the infinite string 12345678910111213... of the concatenation of all positive integers (decimal digits of the Champernowne constant).
From Eric W. Weisstein, Jul 15 2013: (Start)
The next terms are too big to display:
a(4) = 123456789...1121131141 (235 digits)
a(5) = 123456789...6896997097 (2804 digits)
a(6) = 12345...13611362136313 (4347 digits)
a(7) = 123456789...9709971097 (37735 digits)
a(8) has more than 37800 digits. (End)
a(8) has more than 140000 digits. - Tyler Busby, Feb 12 2023

References

  • R. W. Stephan, Factors and primes in two Smarandache sequences.

Crossrefs

Cf. A007376 (infinite Barbier word = almost-natural numbers: write n in base 10 and juxtapose digits).
Cf. A033307 (decimal expansion of Champernowne constant).
Cf. A071620 (number of digits in the n-th Champernowne prime).
See A265043 for where to end the string of numbers that are being concatenated in order to get the n-th prime.

Programs

  • Mathematica
    With[{no=500},FromDigits/@Select[Table[Take[Flatten[IntegerDigits/@Range[no]],n],{n,no}],PrimeQ[FromDigits[#]]&]]  (* Harvey P. Dale, Feb 06 2011 *)
    Select[Table[Floor[N[ChampernowneNumber[10], n]*10^n], {n, 24}], PrimeQ] (* Arkadiusz Wesolowski, May 10 2012 *)

A135605 Consider the infinite string S = 12345678910111213141516171819202122232425262728293031... Sequence gives the first prime that starts at the k-th digit, skipping zero digits.

Original entry on oeis.org

1234567891, 2, 3, 4567, 5, 67, 7, 89, 9101112131, 101, 11, 11, 1213, 2, 13, 3, 14151617, 41, 151, 5, 16171819202122232425262728293031323334353637383940414243, 61, 17, 7, 181, 81920212223242526272829303, 19, 920212223242526272829303132333435363738394041424344454647484950515253
Offset: 1

Views

Author

Marcelo Iglesias (markelo(AT)gmail.com), Feb 26 2008

Keywords

Comments

a(67)>10^5000. - Robert G. Wilson v, Mar 01 2008

Examples

			Examples from _N. J. A. Sloane_, Feb 24 2021: (Start)
S = 1234567891011121314151617181920212...
The 10th digit is a 1, and the first prime in S that starts with that digit is 101.
The 11th digit is 0, so we skip it.
The 12th digit is 1, and the first prime in S that starts with that digit is 11.
The 13th digit is another 1, and the first prime in S that starts with that digit is another 11.
The 14th digit is another 1, and the first prime in S that starts with that digit is 1213.
And so on. (End)
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = 9 i*10^(i - 1) + l; i++ ]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + 10^(i - 1); If[p != 0, IntegerDigits[q][[p]], Mod[q - 1, 10]]]; pp[j_, k_] := FromDigits[ Table[ a@i, {i, j, k}]]; f[n_] := Block[{m = n, p}, If[a@n != 0, (While[p = pp[n, m]; ! PrimeQ@ p, m++ ]; p),]]; Array[f, 29] (* Robert G. Wilson v, Mar 01 2008 *)

Extensions

More terms from Robert G. Wilson v, Mar 01 2008

A073176 First n-digit prime in the concatenation of odd integers allowing leading zeros.

Original entry on oeis.org

3, 13, 911, 5791, 79111, 31051, 1232527, 23252729, 113151719, 2527293133, 57911131517, 991011031051, 6769717375777, 13579111315171, 135791113151719, 4547495153555759, 31517192123252729, 719212325272931333, 1131517192123252729, 71921232527293133353
Offset: 1

Views

Author

Zak Seidov, Aug 22 2002

Keywords

Comments

Leading zeros count but are not printed (cf. A073428).

Examples

			a(4) = 5791 because first 4-digit prime in 135791113151719212325272931333537394143454749... is 5791. Notice that a(6) = 31051 because actually it is 031051, If we remove initial zeros, then a(6) = 105107.
		

Crossrefs

Programs

  • Maple
    S:= "":
    for i from 1 to 300 by 2 do
      S:= cat(S,sprintf("%d",i))
    od:
    nS:= length(S):
    for n from 1 do
      found:= false;
      for i from 1 to nS-n+1 do
        x:= parse(S[i..n+i-1]);
        if isprime(x) then R[n]:= x; found:= true; break fi
      od;
      if not found then break fi;
    od:
    seq(R[i],i=1..n-1); # Robert Israel, Nov 27 2024

Extensions

Data corrected by Sean A. Irvine, Nov 20 2024
Name modified by Sean A. Irvine, Jan 31 2025

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

A162324 Write the natural numbers as an infinite sequence of digits; starting at the left, cut into the smallest pieces so that each piece is a prime. Leading zeros are thrown away.

Original entry on oeis.org

1234567891, 11, 1213, 14151617, 181, 920212223242526272829303132333435363738394041424344454647484950515253, 5
Offset: 1

Views

Author

Keywords

Comments

This is a "lossy" base-ten sequential-smallest-prime percolation of a Champernowne-substrate. The "lossless" version is A103575. The substrate percolates into identical terms 4-115 for both lossy and lossless versions. Terms 119-155 and 158-221 of the lossy version correspond to terms 117-153 and 155-218, respectively, of the lossless version. No other correspondences are known because of the subsequent interjection of very large primes. (For the purposes of this analysis, large probable primes have been treated as actual primes.)

Examples

			After 1234567891 the next digit is 0 that has to be rejected. Next digits are 11 (prime); then 12, 13 (1213 prime); etc.
		

Crossrefs

Extensions

Edited by Hans Havermann, Dec 07 2009

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