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.

Previous Showing 11-15 of 15 results.

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

A134428 Primes formed by concatenating k with k+1, where k+1 is a prime.

Original entry on oeis.org

23, 67, 1213, 3637, 4243, 7879, 9697, 102103, 108109, 126127, 138139, 150151, 156157, 180181, 192193, 270271, 276277, 312313, 330331, 378379, 420421, 432433, 438439, 456457, 522523, 540541, 546547, 576577, 600601, 606607, 612613, 618619
Offset: 1

Views

Author

Keywords

Comments

Subset of A030458 and A052087.

Crossrefs

Programs

  • Maple
    P:=proc(n) local a;
    a:=(ithprime(n)-1)*10^(ilog10(ithprime(n))+1)+ithprime(n);
    if isprime(a) then a; fi; end: seq(P(i),i=1..10^3);
  • Mathematica
    Select[Table[(p-1)*10^IntegerLength[p]+p,{p,Prime[Range[200]]}],PrimeQ] (* Harvey P. Dale, Aug 23 2019 *)

A286706 Primes in A077309.

Original entry on oeis.org

23, 4567, 78910111213, 25262728293031323334353637383940414243444546474849
Offset: 1

Views

Author

XU Pingya, May 12 2017

Keywords

Comments

That is, primes formed from concatenation of k numbers starting with k.
Subsequence of A052087.
a(5) must be larger than A077309(2500).
A077309(k) is prime for k = {2, 4, 7, 25, ...}. - Michael De Vlieger, May 13 2017

Examples

			The prime 4567 is a term since it is the concatenation of 4 decimal numbers beginning with the number 4. - _Michael De Vlieger_, May 13 2017
		

Crossrefs

Programs

  • Mathematica
    Select[Table[FromDigits@ Flatten@ Take[#, {n, n + (n - 1)}], {n, Ceiling[Length[#]/2]}], PrimeQ] &@ Array[IntegerDigits, 10^3] (* Michael De Vlieger, May 13 2017 *)

A317744 Prime numbers which result as a concatenation of a decimal number and its binary representation.

Original entry on oeis.org

11, 311, 5101, 131101, 2511001, 37100101, 51110011, 59111011, 731001001, 931011101, 971100001, 1191110111, 12910000001, 13110000011, 13710001001, 15310011001, 17310101101, 19311000001, 21311010101, 21511010111, 24711110111, 25511111111, 319100111111
Offset: 1

Views

Author

Philip Mizzi, Aug 05 2018

Keywords

Comments

The decimal number plus its Hamming weight A000120 must not be divisible by 3. - M. F. Hasler, Apr 05 2024

Examples

			11 is in the sequence because the binary representation of 1 is 1 and the concatenation of 1 and 1 gives 11, which is prime.
931011101 is in the sequence because it is the concatenation of 93 and 1011101 (the binary representation of 93) and is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[FromDigits[Join[IntegerDigits[n],IntegerDigits[n,2]]],{n,400}],PrimeQ] (* Harvey P. Dale, Jul 15 2020 *)
  • PARI
    nb(n)=fromdigits(concat(n,binary(n)))
    A317744_upto(N=666)=[p|n<-[1..N], is/*pseudo*/prime(p=nb(n))] \\ M. F. Hasler, Apr 05 2024
  • Python
    from sympy import isprime
    def nbinn(n): return int(str(n)+bin(n)[2:])
    def ok(n): return isprime(nbinn(n))
    def aprefixupto(p): return [nbinn(k) for k in range(1, p+1, 2) if ok(k)]
    print(aprefixupto(319)) # Michael S. Branicky, Dec 27 2020
    

A375481 Starting numbers for the terms in A035333.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 1, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 3, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 4, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 5, 57, 58
Offset: 1

Views

Author

Nicholas M. R. Frieler, Aug 17 2024

Keywords

Examples

			a(19) = 12 since A035333(19) = 1213, the concatenation of 12 and 13.
a(20) =  1 since A035333(20) = 1234, the concatenation of 1, 2, 3 and 4.
		

Crossrefs

For the terms generated by consecutive concatenations see A035333.For concatenations of various numbers of consecutive integers see A000027 (k=1), A127421 (k=2), A001703 (k=3), A279204 (k=4).For primes that are the concatenation of two or more consecutive integers see A052087.

Programs

  • Mathematica
    ConsecutiveNumber[num_, numberOfNumbers_] := Module[{},
      If[numberOfNumbers == 1, Return[num]];
      FromDigits@(IntegerDigits[num]~Join~
         IntegerDigits@ConsecutiveNumber[num + 1, numberOfNumbers - 1])
     ]
    ConsecutiveNumberDigits[maxDigits_] := Module[{numList = {}, c, d},
      Do[
       numList =
         numList~Join~(Association[# -> ConsecutiveNumber[#, c]] & /@
            Range[Power[10, d - 1], Power[10, d] - 1]);,
       {d, 1, Floor[maxDigits/2]}, {c, 2, Floor[maxDigits/d]}
       ];
      SortBy[Select[numList, Values[#][[1]] < Power[10, maxDigits] &],
       Values[#] &]
     ]
    Keys[ConsecutiveNumberDigits[8]]//Flatten (* number in this line corresponds to the maximum number of digits of the concatenated terms *)
  • Python
    import heapq
    from itertools import islice
    def agen(): # generator of terms
        c = 12
        h = [(c, 1, 2)]
        nextcount = 3
        while True:
            (v, s, l) = heapq.heappop(h)
            yield s
            if v >= c:
                c = int(str(c) + str(nextcount))
                heapq.heappush(h, (c, 1, nextcount))
                nextcount += 1
            l += 1; v = int(str(v)[len(str(s)):] + str(l)); s += 1
            heapq.heappush(h, (v, s, l))
    print(list(islice(agen(), 70))) # Michael S. Branicky, Aug 18 2024
Previous Showing 11-15 of 15 results.