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

A341715 a(n) = smallest prime of the form n||n+1||n+2||...||n+k, where || denotes decimal concatenation, or -1 if no such prime exists.

Original entry on oeis.org

2, 3, 4567, 5, 67, 7, 89
Offset: 2

Views

Author

N. J. A. Sloane, Feb 21 2021

Keywords

Comments

a(1) is unknown, but is believed to exist (see A007908). The corresponding value of k, if it exists, is known to be at least 300000, so in any case this prime would be too large to include in an OEIS entry, which is why this sequence has offset 2.
a(9) = 9||10||...||187 (see Example section), but that is too large to show in the data field. a(A030457(n)) = A030457(n)||A030457(n)+1 and k = 1 for n > 1. If m is in A030470 but not in A030457, then a(m) = m||m+1||m+2||m+3 and k = 3. Of course a(p) = p and k = 0 for p prime. - Chai Wah Wu, Feb 22 2021
For the corresponding values of k and n+k, see A341716 and A341717.
See also A140793 = (23, 345...109, 4567, 567...17, ...), A341720, and A084559 for the variant with k >= 1, so that a(n) > n also for prime n. - M. F. Hasler, Feb 22 2021

Examples

			Starting at 12, 13, 14, 15, 17, 19, 20 we get the primes 1213, 13, 14151617, 1516171819, 17, 19, 20212223, which are all terms of this sequence.
Here is a(9) from _Chai Wah Wu_, Feb 22 2021, a 445-digit number:
910111213141516171819202122232425262728293031323334353637383940414243444546\
    47484950515253545556575859606162636465666768697071727374757677787980818\
    28384858687888990919293949596979899100101102103104105106107108109110111\
    11211311411511611711811912012112212312412512612712812913013113213313413\
    51361371381391401411421431441451461471481491501511521531541551561571581\
    59160161162163164165166167168169170171172173174175176177178179180181182\
    183184185186187
a(16) = 16||17||...||43 is prime. Also for a(10), I searched up to k <= 10000, so if it exists it will have tens of thousands of decimal digits. Some other big terms are: for n = 18, k = 3589; for n = 35, k = 568; for n = 66, k = 937; for n = 275, k = 814.  - _Chai Wah Wu_, Feb 22 2021
		

Crossrefs

If k in the definition is allowed to be zero we get [the present sequence, A341716, A341717], but if we require k>0 we get [A140793, A341720, A084559].
See A075022 for the largest prime factor of 1||2||...||n.

Programs

  • Mathematica
    Array[Block[{k = #, s = #}, While[! PrimeQ[s], k++; s = FromDigits[IntegerDigits[s]~Join~IntegerDigits[k]]]; s] &, 8, 2] (* Michael De Vlieger, Feb 22 2021 *)
  • PARI
    A341715(n)=if(isprime(n),n,eval(concat([Str(k)|k<-[n..A084559(n)]]))) \\ M. F. Hasler, Feb 22 2021
  • Python
    from sympy import isprime
    def A341715(n):
        m, k = n, n
        while not isprime(m):
            k += 1
            m = int(str(m)+str(k))
        return m # Chai Wah Wu, Feb 22 2021
    

Formula

a(n) = concatenate(n, ..., A084559(n)) or a(n) = n if n is prime. - M. F. Hasler, Feb 22 2021

A279204 Numbers whose decimal expansion is a concatenation of 4 consecutive increasing nonnegative numbers.

Original entry on oeis.org

1234, 2345, 3456, 4567, 5678, 6789, 78910, 891011, 9101112, 10111213, 11121314, 12131415, 13141516, 14151617, 15161718, 16171819, 17181920, 18192021, 19202122, 20212223, 21222324, 22232425, 23242526, 24252627, 25262728, 26272829, 27282930, 28293031, 29303132, 30313233, 31323334
Offset: 1

Views

Author

N. J. A. Sloane, Dec 17 2016

Keywords

Comments

Primes in this sequence are A030471. Are there infinitely many primes in the sequence? - Chai Wah Wu, Dec 17 2016

Crossrefs

Cf. A030471 (primes).
For concatenations of exactly k consecutive integers see A000027(k=1), A127421 (k=2), A001703 (k=3), A279204 (k=4). For 2 or more see A035333.

Programs

  • Mathematica
    A279204[n_] := FromDigits[Flatten[IntegerDigits[Range[n, n + 3]]]];
    Array[A279204, 50] (* Paolo Xausa, Aug 26 2024 *)
  • Python
    def A279204(n):
        return int(str(n)+str(n+1)+str(n+2)+str(n+3)) # Chai Wah Wu, Dec 17 2016

A084559 Smallest a(n) > n such that concatenation of numbers from n to a(n) is a prime or 0 if no such number exists.

Original entry on oeis.org

3, 19, 7, 17, 7, 13, 9, 187
Offset: 2

Views

Author

Zak Seidov, Jun 27 2003

Keywords

Comments

Terms a(1) and a(10) (and many other terms) are currently unknown.
a(11) = 309, a(12) = 13.
a(1) > 344869 (see A007908). - Sean A. Irvine, Jun 17 2019
More terms: a(14..17) = (17, 19, 43, 39), a(20) = 23, a(23) = 41, a(25) = 49, a(26) = 147, a(28) = 73, a(33..39) = (103, 37, 603, 37, 43, 57, 43), a(42) = 43, a(44) = 51, a(49) = 241, a(50) = 51, a(n) > 1000 for 12 < n < 50 not mentioned here. - M. F. Hasler, Feb 22 2021
a(10) > 10010, a(18) = 3607, a(66) = 1003, a(275) = 1089. If n == 2 (mod 3), then a(n) == 3 or 5 (mod 6). If n == 0 or 1 (mod 3), then a(n) == 1 (mod 6) (see A341716). - Chai Wah Wu, Feb 22 2021
a(10) > 50000. - Michael S. Branicky, Feb 25 2025

Examples

			a(4) = 7 because 4567 is a prime.
		

Crossrefs

Cf. also A341715, A341716, A341717 (similar but a(n) = n when n is prime).

Programs

  • PARI
    A084559(n,N=n,T=10^logint(n,10))=while(T*=10,for(m=n+1,n=T-1,ispseudoprime(N=N*T+m)&&return(m))) \\ M. F. Hasler, Feb 22 2021

Extensions

Edited by Max Alekseyev, Jan 28 2012
a(4) corrected by Daniel Suteu, Jun 16 2019
Escape clause added to definition by Chai Wah Wu, Feb 22 2021

A084551 Primes which are a concatenation of five consecutive numbers.

Original entry on oeis.org

1516171819, 3940414243, 5758596061, 6566676869, 7778798081, 8384858687, 8990919293, 129130131132133, 153154155156157, 197198199200201, 213214215216217, 239240241242243, 269270271272273, 387388389390391, 399400401402403, 443444445446447, 459460461462463
Offset: 1

Views

Author

Zak Seidov, Jun 27 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Table[FromDigits[Flatten[IntegerDigits[n+Range[-2,2]]]],{n,2,500}],PrimeQ] (* Jayanta Basu, May 24 2013 *)
    Select[FromDigits[Flatten[IntegerDigits[#]]]&/@Partition[Range[600],5,1], PrimeQ] (* Harvey P. Dale, Nov 11 2014 *)

A085720 Start of a run of 7 successive numbers which when concatenated form a prime.

Original entry on oeis.org

7, 37, 157, 185, 187, 271, 301, 355, 475, 485, 523, 533, 577, 611, 653, 661, 667, 731, 733, 755, 761, 791, 853, 911, 913, 937, 983, 1085, 1111, 1187, 1205, 1253, 1397, 1417, 1585, 1631, 1655, 1685, 1697, 1711, 1723, 1841, 1907, 1975, 2035, 2077, 2105, 2185
Offset: 1

Views

Author

Zak Seidov, Jun 27 2003

Keywords

Comments

Concatenation of three and six successive numbers are always composite.
Primes as concatenation of two, four and five successive numbers are in A030458, A030471, A052087, A052088, A052089.

Crossrefs

Programs

  • Mathematica
    f[n_] := FromDigits[ Flatten[ Table[ IntegerDigits[i], {i, n, n + 6}]]]; Select[ Range[2190], PrimeQ[ f[ # ]] & ]
    Select[Range[2500],PrimeQ[FromDigits[Flatten[IntegerDigits/@Range[#,#+6]]]]&] (* Harvey P. Dale, Aug 15 2021 *)

Extensions

Edited by Robert G. Wilson v, Jun 28 2003
Edited by Charles R Greathouse IV, Apr 24 2010
Showing 1-5 of 5 results.