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 21-30 of 31 results. Next

A287019 Primes that can be generated by the concatenation in base 2, in descending order, of two consecutive integers read in base 10.

Original entry on oeis.org

2, 5, 19, 53, 71, 271, 593, 659, 857, 2339, 2729, 3119, 3769, 4159, 8513, 9029, 9803, 10061, 11093, 11351, 11867, 12641, 12899, 13931, 14447, 15737, 16253, 33409, 33923, 36493, 44203, 47287, 51913, 55511, 64763, 133379, 135431, 137483, 141587, 147743, 151847, 158003
Offset: 1

Views

Author

Paolo P. Lava, May 18 2017

Keywords

Examples

			1 and 2 in base 2 are 1 and 10 and concat(10,1) = 101 is 5 in base 10.
3 and 4 in base 2 are 11 and 100 and concat(100,11) = 10011 is 19 in base 10.
		

Crossrefs

Subsequence of primes of A277351.

Programs

  • Maple
    with(numtheory): P:= proc(q) local a,b,c,n; if q=0 then 2 else a:=convert(q+1,binary,decimal); b:=convert(q,binary,decimal); c:=convert(a*10^(ilog10(b)+1)+b,decimal,binary); if isprime(c) then c; fi; fi; end: seq(P(i),i=0..1000);
  • Mathematica
    Select[Map[FromDigits[Apply[Join, IntegerDigits[Reverse@ #, 2]], 2] &, Partition[Range@ 320, 2, 1]], PrimeQ] (* Michael De Vlieger, May 18 2017 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (isprime(p=fromdigits(Vec(concat(binary(n+1), binary(n))), 2)), print1(p, ", ")));} \\ Michel Marcus, May 20 2017

Extensions

First term added by Michel Marcus, May 23 2017

A287303 Primes that can be generated by the concatenation in base 4, in descending order, of two consecutive integers read in base 10.

Original entry on oeis.org

19, 101, 271, 1429, 1559, 1949, 2339, 2729, 3119, 3769, 4159, 17989, 18503, 19531, 21587, 24671, 27241, 29297, 30839, 32381, 33409, 33923, 36493, 44203, 47287, 51913, 55511, 64763, 286999, 289049, 293149, 295199, 301349, 305449, 323899, 332099, 336199, 350549, 375149
Offset: 1

Views

Author

Paolo P. Lava, May 23 2017

Keywords

Examples

			3 and 4 in base 4 are 3 and 10 and concat(10,3) = 103 in base 10 is 19;
5 and 6 in base 4 are 11 and 12 and concat(12,11) = 1211 in base 10 are 101.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:= proc(q,h) local a,b,c,d,k,n; a:=convert(q+1,base,h); b:=convert(q,base,h); c:=[op(a),op(b)]; d:=0; for k from nops(c) by -1 to 1 do d:=h*d+c[k]; od; if isprime(d) then d; fi; end: seq(P(i,4),i=1..1000);
  • Mathematica
    With[{b = 4}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 370], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 23 2017 *)
    Select[Table[FromDigits[Join[IntegerDigits[n+1,4],IntegerDigits[n,4]],4],{n,1000}],PrimeQ] (* Harvey P. Dale, Dec 28 2024 *)

A309851 Primes formed by concatenating n and 2n-1.

Original entry on oeis.org

11, 23, 47, 59, 1019, 1223, 1427, 1733, 2039, 2141, 2243, 2447, 2549, 2753, 2957, 3467, 3671, 4079, 4283, 4691, 4793, 5099, 52103, 55109, 61121, 65129, 70139, 75149, 77153, 82163, 86171, 95189, 102203, 104207, 112223, 119237, 124247, 130259, 132263, 137273, 145289, 146291, 147293, 149297, 150299, 160319
Offset: 1

Views

Author

A.H.M. Smeets, Aug 20 2019

Keywords

Crossrefs

Cf. A000040, A052089 (n and n-1), A030458 (n and n+1), A309808 (n and 2n+1).

Programs

  • Magma
    [a:m in [1..170]|IsPrime(a) where a is 10^(#Intseq(2*m-1))*m+2*m-1]; // Marius A. Burtea, Oct 09 2019
    
  • Mathematica
    f[n_] := FromDigits @ (Join @@ IntegerDigits[{n, 2n-1}]); Select[f /@ Range[160], PrimeQ]  (* Amiram Eldar, Sep 24 2019 *)
  • Python
    from sympy import isprime
    A309851_list = [m for m in (int(str(n)+str(2*n-1)) for n in range(1,10**5)) if isprime(m)] # Chai Wah Wu, Oct 23 2019

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
    

A372207 a(n) is the smallest prime number that is obtained by concatenating 2 consecutive n-digit integers.

Original entry on oeis.org

23, 1213, 102101, 10021001, 1000810007, 100010100011, 10000241000023, 1000004210000041, 100000002100000003, 10000000081000000009, 1000000000810000000007, 100000000002100000000001, 10000000000021000000000001, 1000000000001010000000000011, 100000000000002100000000000003
Offset: 1

Views

Author

Gonzalo Martínez, May 19 2024

Keywords

Comments

It is possible to form primes by concatenating an integer with its successor (A030458), as well as by concatenating an integer with its predecessor (A052089).

Examples

			a(3) = 102101, since when concatenating 3-digit numbers, the first three numbers obtained, in increasing order, are 100101, 101100, 101102, which are composite, while the next number in the list is 102101, which is prime.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    def a(n):
        if n == 1: return 23
        lb, ub = 10**(n-1), 10**n
        for k in range(lb, ub, 2):
            base = k*ub
            for inc in [k-1, k+1]:
                if inc >= lb and isprime(t:=base+inc):
                    return t
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, May 19 2024

Extensions

a(12) and beyond from Michael S. Branicky, May 19 2024

A287301 Primes that can be generated by the concatenation in base 3, in descending order, of two consecutive integers read in base 10.

Original entry on oeis.org

3, 7, 11, 59, 79, 89, 307, 419, 503, 587, 643, 727, 2377, 2459, 3361, 3607, 3853, 4099, 4591, 4673, 4919, 5657, 5821, 5903, 6067, 20983, 21227, 22447, 22691, 23911, 26107, 26839, 28547, 30011, 31231, 31963, 32939, 33427, 34159, 34403, 36599, 37087, 41479, 42943
Offset: 1

Views

Author

Paolo P. Lava, May 23 2017

Keywords

Examples

			1 and 2 in base 3 are 1 and 2 and concat(2,1) = 21 in base 10 is 7;
2 and 3 in base 3 are 2 and 10 and concat(10,2) = 102 in base 10 is 11.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:= proc(q,h) local a,b,c,d,k,n; if q=0 then 3 else a:=convert(q+1,base,h); b:=convert(q,base,h); c:=[op(a),op(b)]; d:=0; for k from nops(c) by -1 to 1 do d:=h*d+c[k]; od; if isprime(d) then d; fi; fi; end: seq(P(i,3),i=0..1000);
  • Mathematica
    With[{b = 3}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 150], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 23 2017 *)

A287305 Primes that can be generated by the concatenation in base 5, in descending order, of two consecutive integers read in base 10.

Original entry on oeis.org

5, 11, 17, 23, 29, 181, 233, 311, 337, 389, 467, 571, 3527, 3779, 4157, 4283, 4409, 4787, 5039, 5417, 5669, 6047, 6173, 6299, 6551, 6803, 7307, 7433, 7559, 7937, 8693, 8819, 9323, 10079, 10331, 10457, 10709, 11087, 11213, 11717, 11969, 12347, 12473, 13103, 13229
Offset: 1

Views

Author

Paolo P. Lava, May 23 2017

Keywords

Examples

			1 and 2 in base 5 are 1 and 2 and concat(2,1) = 21 in base 10 is 11;
6 and 7 in base 5 are 11 and 12 and concat(1211) = 1211 in base 10 is 181.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:= proc(q,h) local a,b,c,d,k,n; if q=0 then 5 else a:=convert(q+1,base,h); b:=convert(q,base,h); c:=[op(a),op(b)]; d:=0; for k from nops(c) by -1 to 1 do d:=h*d+c[k]; od; if isprime(d) then d; fi; fi; end: seq(P(i,5),i=0..1000);
  • Mathematica
    With[{b = 5}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 108], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 23 2017 *)

A287307 Primes that can be generated by the concatenation in base 6, in descending order, of two consecutive integers read in base 10.

Original entry on oeis.org

13, 41, 443, 739, 887, 1109, 9547, 11717, 14321, 16057, 17359, 18661, 19963, 22133, 22567, 23869, 25171, 28643, 29077, 31247, 32983, 33851, 35153, 40361, 43399, 44267, 44701, 45569, 287933, 290527, 303497, 306091, 311279, 319061, 337219, 345001, 389099, 391693
Offset: 1

Views

Author

Paolo P. Lava, May 23 2017

Keywords

Examples

			1 and 2 in base 6 are 1 and 2 and concat(2,1) = 21 in base 10 is 13;
5 and 6 in base 6 are 5 and 10 and concat(10,5) = 105 in base 10 is 41.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:= proc(q,h) local a,b,c,d,k,n; a:=convert(q+1,base,h); b:=convert(q,base,h); c:=[op(a),op(b)]; d:=0; for k from nops(c) by -1 to 1 do d:=h*d+c[k]; od; if isprime(d) then d; fi; end: seq(P(i,6),i=0..1000);
  • Mathematica
    With[{b = 6}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 302], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 23 2017 *)

A287309 Primes that can be generated by the concatenation in base 7, in descending order, of two consecutive integers read in base 10.

Original entry on oeis.org

7, 23, 31, 47, 449, 499, 599, 1049, 1249, 1399, 1499, 1549, 1699, 1949, 1999, 2099, 2399, 18919, 20639, 20983, 24767, 25111, 25799, 29927, 30271, 31991, 33023, 38183, 40591, 45751, 46439, 48847, 51599, 52631, 57791, 59167, 60887, 61231, 64327, 66047, 67079, 68111
Offset: 1

Views

Author

Paolo P. Lava, May 23 2017

Keywords

Examples

			2 and 3 in base 7 are 2 and 3 and concat(3,2) = 32 in base 10 is 23;
8 and 9 in base 7 are 11 and 12 and concat(12,11) = 1211 in base 10 is 449.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:= proc(q,h) local a,b,c,d,k,n; if q=0 then 7 else a:=convert(q+1,base,h); b:=convert(q,base,h); c:=[op(a),op(b)]; d:=0; for k from nops(c) by -1 to 1 do d:=h*d+c[k]; od; if isprime(d) then d; fi; fi; end: seq(P(i,7),i=0..1000);
  • Mathematica
    With[{b = 7}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 200], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 23 2017 *)

A287311 Primes that can be generated by the concatenation in base 8, in descending order, of two consecutive integers read in base 10.

Original entry on oeis.org

17, 53, 71, 1039, 1429, 1559, 1949, 2339, 2729, 3119, 3769, 4159, 33857, 34883, 40013, 41039, 48221, 50273, 54377, 58481, 61559, 63611, 69767, 70793, 74897, 76949, 84131, 86183, 89261, 96443, 100547, 101573, 104651, 106703, 110807, 111833, 112859, 117989, 120041
Offset: 1

Views

Author

Paolo P. Lava, May 24 2017

Keywords

Examples

			1 and 2 in base 8 are 1 and 2 and concat(2,1) = 21 in base 10 is 17;
7 and 8 in base 8 are 7 and 10 and concat(10,7) = 107 in base 10 is 71.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:= proc(q,h) local a,b,c,d,k,n; a:=convert(q+1,base,h); b:=convert(q,base,h); c:=[op(a),op(b)]; d:=0; for k from nops(c) by -1 to 1 do d:=h*d+c[k]; od; if isprime(d) then d; fi; end: seq(P(i,8),i=0..1000);
  • Mathematica
    With[{b = 8}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 250], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 25 2017 *)
Previous Showing 21-30 of 31 results. Next