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.

A342837 Starting with A342834(n), a(n) is the number of n-digit primes we have to go back from A003618(n) through the sequence of these n-digit primes to get the prime A338968(n).

Original entry on oeis.org

0, 0, 3, 3, 16, 40, 8, 44, 112, 85, 48, 24, 168, 15, 182, 18, 13, 151, 348, 204, 437, 612, 771, 75, 51, 310, 796, 111, 811, 350, 644, 350, 469, 159, 571, 544, 2239, 4, 1474, 97, 2177, 175, 1400, 1791, 75, 1983, 337, 2503, 854, 2397, 830, 246, 5350, 1682, 153, 1581, 622
Offset: 1

Views

Author

Bernard Schott, Mar 29 2021

Keywords

Comments

The idea of this sequence comes from Daniel Suteu.
A338968(n) is the concatenation of A342834(n-1) with the largest n-digit prime p <= A003618(n) such that A342834(n-1)||p is prime where || stands for concatenation.
Both A338968(n) and A342834(n) have n*(n+1)/2 digits.

Examples

			For a(2), as A338968(2) = A342834(2) = 7||97 = 797, a(2) = 0.
From _Daniel Suteu_, Mar 29 2021: (Start)
For a(3), as A003618(1) = 7, A003618(2) = 97 and A003618(3) = 997, we have A342834(3) = 7||97||997 = 797997 while prime A338968(3) = 7||97||977 = 797977.
# 7||97||997 = 797997 = 3 * 17 * 15647 is not prime (#1 fail)
# 7||97||991 = 797991 = 3 * 461 * 577 is not prime (#2 fail)
# 7||97||983 = 797983 = 41 * 19463 is not prime (#3 fail)
# 7||97||977 = 797977 = A338968(3) is prime.
Therefore, the largest 3-digit prime p <= 997 such that A342834(2)||p is prime, is p = 977. Through the sequence of the 3-digit primes, we have to go back 3 primes from A003618(3) = 997 (991, 983, 977) in order to get A338968(3), hence a(3) = 3. (End)
		

Crossrefs

Formula

a(n) = primepi(A003618(n)) - primepi(A338968(n) mod 10^n). - David A. Corneth, Mar 29 2021

Extensions

a(3)-a(57) from Daniel Suteu, Mar 29 2021

A215641 Smallest prime whose decimal expansion consists of the concatenation of a 1-digit prime, a 2-digit prime, a 3-digit prime, ..., and an n-digit prime.

Original entry on oeis.org

2, 211, 211151, 2111011129, 211101100910009, 211101100910007100049, 2111011009100071000031000453, 211101100910007100003100000310000721, 211101100910007100003100000310000019100000543, 2111011009100071000031000003100000191000000071000000531
Offset: 1

Views

Author

Jonathan Vos Post, Aug 18 2012

Keywords

Comments

It is a plausible conjecture that a(n) always exists.
a(n) has A000217(n) = n*(n+1)/2 digits.

Examples

			a(4) = 2111011129, the smallest prime formed from a single-digit, a double-digit, a triple-digit, and a quadruple-digit prime, i.e., 2, 11, 101, 1129.
		

Crossrefs

Subsequence of A195302.
Cf. A338968 (similar, with largest prime).

Extensions

Edited by N. J. A. Sloane, Aug 18 2012

A340115 Largest prime whose decimal expansion consists of the concatenation of a 1-digit cube, a 2-digit cube, a 3-digit cube, ..., and an n-digit cube, or 0 if there is no such prime.

Original entry on oeis.org

0, 827, 164729, 8642164913, 864729685979507, 864729926197336531441, 8647299261973369702994826809, 864729926197336970299980034443986977, 864729926197336970299993837599897344909853209, 8647299261973369702999938375998973449970029998036054027
Offset: 1

Views

Author

Bernard Schott, Dec 28 2020

Keywords

Comments

If a(n) exists it has A000217(n) = n*(n+1)/2 digits.
The similar smallest primes are in A215692.
We can conjecture that a(n) > 0 for all n > 1 and the terms converge to the concatenation of (c(1), c(2), c(3), ...) where c(k) is the largest k digit cube. The number of such primes between A215692(n) and a(n) is (0, 2, 2, 9, 177, 6909, 570166, ...). This is very close to what we expect given the number of concatenations of cubes of the respective length (product of 10^(k/3)-10^((k-1)/3), k=1..n) and the density of primes in that range according to the PNT. - M. F. Hasler, Dec 31 2020

Examples

			a(1) = 0 because no 1-digit cube {0, 1, 8} is prime.
a(2) = 827 because 827 is prime and is the concatenation of 8 = 2^3 and 27 = 3^3.
a(3) = 164729 because 827343, 827729, 864343 and 864729 are not primes and 164729, concatenation of 1 = 1^3, 64 = 4^3 and 729 = 9^3 is prime.
		

Crossrefs

Cf. A338968 (with concatenated primes), A339978 (with concatenated squares).

Programs

  • PARI
    A340115(n)=forvec(v=vector(n,k,-[sqrtnint(10^k-1,3),ceil(10^((k-1)/3))]),ispseudoprime(n=eval(concat([Str(-k^3)|k<-v])))&&return(n)) \\ M. F. Hasler, Dec 31 2020
  • Python
    from sympy import isprime
    from itertools import product
    def a(n):
      cubes = [str(k**3) for k in range(1, int((10**n)**(1/3))+2)]
      revcbs = [[k3 for k3 in cubes if len(k3)==i+1][::-1] for i in range(n)]
      for t in product(*revcbs):
        intt = int("".join(t))
        if isprime(intt): return intt
      return 0
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Dec 28 2020
    

Extensions

a(4)-a(10) from Michael S. Branicky, Dec 28 2020

A339978 a(n) is the largest prime whose decimal expansion consists of the concatenation of a 1-digit square, a 2-digit square, a 3-digit square, ..., and an n-digit square, or 0 if there is no such prime.

Original entry on oeis.org

0, 449, 981961, 9819619801, 981961980196721, 981961980199856194481, 9819619801998569980018946081, 981961980199856998001999824499740169, 981961980199856998001999824499980001989039601, 9819619801998569980019998244999800019999508849977812321
Offset: 1

Views

Author

Bernard Schott, Dec 25 2020

Keywords

Comments

If a(n) exists it has A000217(n)= n*(n+1)/2 digits.
All the terms end with 1 or 9.

Examples

			a(1) = 0 because no 1-digit square {0, 1, 4, 9} is prime.
a(2) = 449 because 464, 481, 916, 925, 936, 949, 964, and 981 are not primes and 449, concatenation of 4 = 2^2 with 49 = 7^2, is prime.
a(4) = 9819619801, which is a prime is the concatenation of 9 = 3^2 with 81 = 9^2, then 961 = 31^2 and 9801 = 99^2. Observation, 9, 81, 961 and 9801 are the largest squares with respectively 1, 2, 3 and 4 digits.
		

Crossrefs

Cf. A000290, A003618, A061433 (largest squares), A338968 (concatenate primes).

Programs

  • Python
    from sympy import isprime
    from itertools import product
    def a(n):
      squares = [str(k*k) for k in range(1, int((10**n)**.5)+2)]
      revsqrs = [[kk for kk in squares if len(kk)==i+1][::-1] for i in range(n)]
      for t in product(*revsqrs):
        intt = int("".join(t))
        if isprime(intt): return intt
      return 0
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Dec 25 2020

Extensions

a(5)-a(10) from Michael S. Branicky, Dec 25 2020

A340220 Constant whose decimal expansion is the concatenation of the largest n-digit prime A003618(n), for n = 1, 2, 3, ...

Original entry on oeis.org

7, 9, 7, 9, 9, 7, 9, 9, 7, 3, 9, 9, 9, 9, 1, 9, 9, 9, 9, 8, 3, 9, 9, 9, 9, 9, 9, 1, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 3, 7, 9, 9, 9, 9, 9, 9, 9, 9, 6, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 1
Offset: 0

Views

Author

M. F. Hasler, Jan 01 2021

Keywords

Comments

This is the limit of the terms of A338968, either digit-wise, or as a constant, up to powers of 10.

Examples

			The smallest prime with 1, 2, 3, 4, ... digits is, respectively, 7, 97, 997, 9973, 99991, 999983, ...
Here we list the sequence of digits of these numbers: 7; 9, 7; 9, 9, 7; 9, 9, 7, 3; ...
This can be considered, as for the Champernowne and Copeland-Erdős constants, as the decimal expansion of a real constant 0.797997997399991...
		

Crossrefs

Cf. A003618 (largest n-digit prime), A340222 (same with semiprimes), A340207 (same for squares, limit of A339978), A340209 (same for cubes, limit of A340115), A340219 (similar for smallest n-digit primes, limit of A215641), A340221 (similar, with smallest semiprime, limit of A215647), A340206 (similar, with smallest n-digit squares, limit of A215689), A340208 (similar, with smallest n-digit cubes, limit of A215692), A340220 (same for primes, limit of A338968).
Cf. A033307 (Champernowne constant), A030190 (binary), A001191 (concatenation of all squares), A134724 (cubes), A033308 (primes: Copeland-Erdős constant).

Programs

  • PARI
    concat([digits(precprime(10^k))|k<-[1..14]]) \\ as seq. of digits
    c(N=20)=sum(k=1,N,.1^(k*(k+1)/2)*precprime(10^k)) \\ as constant

Formula

c = 0.797997997399991999983999999199999989999999937999999996799999999977...
= Sum_{k >= 1} 10^(-k(k+1)/2)*A003618(k)
a(-n(n+1)/2) = 9 for all n >= 0, followed by increasingly more 9s.

A342834 a(n) is the number whose decimal expansion consists of the concatenation of the largest 1-digit prime = 7, the largest 2-digit prime = 97, ... up to the largest n-digit prime = A003618(n).

Original entry on oeis.org

7, 797, 797997, 7979979973, 797997997399991, 797997997399991999983, 7979979973999919999839999991, 797997997399991999983999999199999989, 797997997399991999983999999199999989999999937, 7979979973999919999839999991999999899999999379999999967
Offset: 1

Views

Author

Bernard Schott, Mar 23 2021

Keywords

Comments

a(n) has n*(n+1)/2 digits.
a(1) = 7 and a(2) = 797, these are only 2 known indices for which a(n) = A338968(n).
The decimal expansion of the limit when n -> oo of a(n) is A340220.

Examples

			The greatest primes with 1, 2 and 3 digits are respectively 7, 97 and 997, hence, a(3) = 7||97||997 = 797997 where || stands for concatenation.
		

Crossrefs

Cf. A000217 (number of digits), A338968, A340220, A342835 (number of divisors), A342836 (smallest prime factor).

Programs

  • PARI
    a(n) = my(s=""); for (k=1, n, s = Str(s, precprime(10^k))); eval(s); \\ Michel Marcus, Mar 24 2021
  • Python
    from sympy import prevprime
    def aupton(nn):
      astr, alst = "", []
      for n in range(1, nn+1):
        astr += str(prevprime(10**n)); alst.append(int(astr))
      return alst
    print(aupton(10)) # Michael S. Branicky, Mar 23 2021
    

A342836 a(n) is the smallest prime factor of A342834(n).

Original entry on oeis.org

7, 797, 3, 7, 37, 3023681, 43, 1249, 7, 3, 23, 11, 3, 19, 3, 13390093693131976661567, 193, 2069, 11, 41, 3, 71, 3, 996370591, 3, 101, 1123, 54367, 159469, 151, 29, 3, 7
Offset: 1

Views

Author

Bernard Schott, Mar 24 2021

Keywords

Comments

a(n) = A342834(n) for n = 1 and n = 2, no other solution is known.
No primes through a(258). - Michael S. Branicky, Mar 25 2021
a(34) <= 7944676315964871787139677901. a(35)..a(40) = 2089, 11, 3, 23, 3, 11. a(42)=3. - Chai Wah Wu, Mar 26 2021

Examples

			As A342834(5) = 7||97||997||9973||99991 = 797997997399991 = 37 * 951649 * 22663307, then a(5) = 37.
		

Crossrefs

Formula

a(n) = A020639(A342834(n)).

Extensions

a(4)-a(14) from Daniel Suteu, Mar 24 2021
a(15)-a(33) from Michael S. Branicky and Apurva Rai, Mar 25 2021

A340222 Constant whose decimal expansion is the concatenation of the largest n-digit semiprime A098450(n), for n = 1, 2, 3, ...

Original entry on oeis.org

9, 9, 5, 9, 9, 8, 9, 9, 9, 8, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 7, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

M. F. Hasler, Jan 01 2021

Keywords

Examples

			The smallest prime with 1, 2, 3, 4, ... digits is, respectively, 9 = 3^2, 95 = 5*19, 998 = 2*499, 9998 = 2*4999, .... Here we list the sequence of digits of these numbers: 9: 9, 5; 9, 9, 8; 9, 9, 9, 8; ...
This can be considered, as for the Champernowne and Copeland-Erdős constants, as the decimal expansion of a real constant 0.9959989998...
		

Crossrefs

Cf. A098450 (largest n-digit semiprime), A340221 (similar, with smallest semiprime, limit of A215647), A340207 (same for squares, limit of A339978), A340206 (similar, with smallest n-digit squares, limit of A215689), A340209 (same with cubes, limit of A340115), A340208 (similar, with smallest n-digit cubes, limit of A215692), A340220 (same for primes, limit of A338968), A340219 (similar for smallest n-digit primes, limit of A215641).
Cf. A033307 (Champernowne constant), A030190 (binary), A001191 (concatenation of all squares), A134724 (cubes), A033308 (primes: Copeland-Erdős constant).

Programs

  • PARI
    concat([digits(A098450(k))|k<-[1..14]]) \\ as seq. of digits
    c(N=20)=sum(k=1,N,.1^(k*(k+1)/2)*A098450(k)) \\ as constant

Formula

c = 0.995998999899998999997999999899999997999999991999999999799999999997...
= Sum_{k >= 1} 10^(-k(k+1)/2)*A098450(k)
a(-n(n+1)/2) = 9 for all n >= 0, followed by increasingly more 9s.
Showing 1-8 of 8 results.