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-10 of 34 results. Next

A052089 Primes formed by concatenating k with k-1.

Original entry on oeis.org

43, 109, 2221, 2423, 3433, 4241, 5857, 7069, 7877, 8887, 10099, 102101, 108107, 112111, 114113, 124123, 148147, 154153, 160159, 172171, 180179, 192191, 198197, 202201, 208207, 210209, 214213, 238237, 244243, 262261, 264263, 268267, 270269, 282281, 294293, 300299
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Examples

			2423 is a prime and a concatenation of 24 and 23.
		

Crossrefs

Programs

  • Magma
    [Seqint(Intseq(n-1) cat Intseq(n)): n in [2..300 by 2] | IsPrime(Seqint(Intseq(n-1) cat Intseq(n)))]; // Marius A. Burtea, Mar 21 2019
    
  • Mathematica
    Sort[Select[FromDigits[Flatten[IntegerDigits/@#]]&/@Partition[ Range[ 300,1,-1],2,1],PrimeQ]] (* Harvey P. Dale, May 09 2012 *)
    Select[Table[n 10^IntegerLength[n-1]+n-1,{n,2,300}],PrimeQ] (* Harvey P. Dale, Aug 20 2025 *)
  • PARI
    for(n=4,1e4,if(isprime(t=eval(Str(n,n-1))),print1(t", "))) \\ Charles R Greathouse IV, May 07 2013
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): yield from filter(isprime, (int(str(k)+str(k-1)) for k in count(2, 2)))
    print(list(islice(agen(), 36))) # Michael S. Branicky, Aug 05 2022

A052087 Primes whose decimal expansion is a concatenation of two or more consecutive increasing numbers (no leading zeros allowed).

Original entry on oeis.org

23, 67, 89, 1213, 3637, 4243, 4567, 5051, 5657, 6263, 6869, 7879, 8081, 9091, 9293, 9697, 102103, 108109, 120121, 126127, 138139, 150151, 156157, 180181, 186187, 188189, 192193, 200201, 216217, 242243, 246247, 252253, 270271
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Crossrefs

Primes in A035333.

Programs

  • Mathematica
    With[{e = 6}, TakeWhile[Select[Function[s, Union@ Flatten@ Map[Function[k, Map[FromDigits@ Flatten@ IntegerDigits@ # &, Partition[Take[s, 10^(e - k)], k, 1]]], Range[2, e]]]@ Range[10^e], PrimeQ], IntegerLength@ # <= e &]] (* Michael De Vlieger, Apr 23 2017 *)

Extensions

Initial data corrected by Paul Tek, May 07 2013

A052088 Primes whose decimal expansion is a concatenation of two or more consecutive decreasing numbers (no leading zeros allowed).

Original entry on oeis.org

43, 109, 2221, 2423, 3433, 4241, 5857, 7069, 7877, 8887, 10099, 10987, 76543, 102101, 108107, 112111, 114113, 124123, 148147, 154153, 160159, 172171, 180179, 192191, 198197, 202201, 208207, 210209, 214213, 238237, 244243, 262261
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Crossrefs

Extensions

Initial data corrected by Paul Tek, May 07 2013

A127421 Numbers whose decimal expansion is a concatenation of 2 consecutive increasing nonnegative numbers.

Original entry on oeis.org

1, 12, 23, 34, 45, 56, 67, 78, 89, 910, 1011, 1112, 1213, 1314, 1415, 1516, 1617, 1718, 1819, 1920, 2021, 2122, 2223, 2324, 2425, 2526, 2627, 2728, 2829, 2930, 3031, 3132, 3233, 3334, 3435, 3536, 3637, 3738, 3839, 3940, 4041, 4142, 4243, 4344, 4445, 4546
Offset: 1

Views

Author

Artur Jasinski, Jan 14 2007

Keywords

Comments

Primes in the sequence are in A030458. - Bruno Berselli, Mar 25 2015
a(n) always has an even number of digits unless n is in A103456. - Alonso del Arte, Oct 30 2019

Examples

			a(1) = "0,1" = 1.
a(13) = "12,13" = 1213.
		

Crossrefs

A variant of A001704.
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

  • Magma
    [Seqint(Intseq(n+1) cat Intseq(n)): n in [0..50]]; // Bruno Berselli, Mar 25 2015
    
  • Maple
    a:= n-> parse(cat(n-1, n)):
    seq(a(n), n=1..55);  # Alois P. Heinz, Jul 05 2018
  • Mathematica
    nMax = 49; digitsList = IntegerDigits[Range[0, nMax]]; Table[FromDigits[Flatten[{digitsList[[n]], digitsList[[n + 1]]}]], {n, nMax - 1}] (* Alonso del Arte, Oct 24 2019 *)
    Table[FromDigits[Flatten[IntegerDigits/@{n,n+1}]],{n,0,50}] (* Harvey P. Dale, May 16 2020 *)
  • Python
    for n in range(100): print(int(str(n)+str(n+1))) # David F. Marrs, Sep 17 2018
    
  • Scala
    val numerStrs = (0 to 49).map(Integer.toString(_)).toList
    val concats = (numerStrs.dropRight(1)) zip (numerStrs.drop(1))
    concats.map(x => Integer.parseInt(x.1 + x._2)) // _Alonso del Arte, Oct 24 2019

Extensions

More terms from Joshua Zucker, May 15 2007

A030457 Numbers k such that k concatenated with k+1 is prime.

Original entry on oeis.org

2, 6, 8, 12, 36, 42, 50, 56, 62, 68, 78, 80, 90, 92, 96, 102, 108, 120, 126, 138, 150, 156, 180, 186, 188, 192, 200, 216, 242, 246, 252, 270, 276, 278, 300, 308, 312, 318, 330, 338, 342, 350, 362, 368, 378, 390, 402, 410, 416, 420, 426, 428, 432
Offset: 1

Views

Author

Keywords

Comments

k is not congruent to 1 (mod 2), 1 (mod 3), or 4 (mod 5). - Charles R Greathouse IV, Apr 16 2012

Examples

			1213 is prime, therefore 12 is a term.
		

Crossrefs

Cf. A010051, A001704, A068700 (subsequence).
Numbers k such that k concatenated with k+m is prime: this sequence (m=1), A032617 (m=2), A032618 (m=3), A032619 (m=4), A032620 (m=5), A032621 (m=6), A032622 (m=7), A032623 (m=8), A032624 (m=9).

Programs

  • Haskell
    a030457 n = a030457_list !! (n-1)
    a030457_list = filter ((== 1) . a010051' . a001704) [1..]
    -- Reinhard Zumkeller, Jun 27 2015, Apr 26 2011
    
  • Magma
    [n: n in [1..500] | IsPrime(Seqint(Intseq(n+1) cat Intseq(n)))]; // Vincenzo Librandi, Jul 23 2016
    
  • Maple
    concat:=proc(a,b) local bb: bb:=nops(convert(b,base,10)): 10^bb*a+b end proc: a:=proc(n) if isprime(concat(n,n+1))=true then n else end if end proc: seq(a(n),n=0..500); # Emeric Deutsch, Nov 23 2007
  • Mathematica
    Select[ Range[500], PrimeQ[ ToExpression[ StringJoin[ ToString[#], ToString[#+1]]]]&] (* Jean-François Alcover, Nov 18 2011 *)
    Select[Range[500],PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[ #+1]]]]&] (* Harvey P. Dale, Dec 23 2015 *)
    Position[#[[1]]*10^IntegerLength[#[[2]]]+#[[2]]&/@Partition[Range[ 500], 2,1],?PrimeQ]//Flatten (* _Harvey P. Dale, Jul 14 2019 *)
  • PARI
    for(n=1,10^5,if(isprime(eval(concat(Str(n),n+1))),print1(n,", "))); /* Joerg Arndt, Apr 27 2011 */
    
  • Python
    from sympy import isprime
    def ok(n): return isprime(int(str(n)+str(n+1)))
    print([k for k in range(500) if ok(k)]) # Michael S. Branicky, Apr 19 2023

A210511 Primes formed by concatenating k, k, and 1 for k >= 1.

Original entry on oeis.org

331, 661, 881, 991, 18181, 20201, 21211, 26261, 27271, 32321, 33331, 41411, 48481, 51511, 54541, 57571, 60601, 65651, 69691, 71711, 78781, 86861, 89891, 90901, 92921, 98981, 99991, 1041041, 1051051, 1131131, 1191191, 1201201, 1221221, 1231231, 1261261, 1281281
Offset: 1

Views

Author

Abhiram R Devesh, Jan 26 2013

Keywords

Comments

This sequence is similar to A030458 and A052089.

Crossrefs

Programs

  • Magma
    [nn1: n in [1..130] | IsPrime(nn1) where nn1 is Seqint([1] cat Intseq(n) cat Intseq(n))]; // Bruno Berselli, Jan 30 2013
  • Mathematica
    Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], {1}}]], {n, 100}], PrimeQ] (* Alonso del Arte, Jan 27 2013 *)
    With[{nn=200},Select[FromDigits[Flatten[IntegerDigits[#]]]&/@Thread[ {Range[ nn],Range[nn],1}],PrimeQ]] (* Harvey P. Dale, Aug 17 2013 *)
  • Python
    import numpy as np
    def factors(n):
        return reduce(list._add_, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
    for i in range(1,2000):
        p1=int(str(i)+str(i)+"1")
        if len(factors(p1))<3:
            print(p1)
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): yield from filter(isprime, (int(str(k)+str(k)+'1') for k in count(1)))
    print(list(islice(agen(), 36))) # Michael S. Branicky, Jul 26 2022
    

A054211 Numbers k such that k concatenated with k-1 is prime.

Original entry on oeis.org

4, 10, 22, 24, 34, 42, 58, 70, 78, 88, 100, 102, 108, 112, 114, 124, 148, 154, 160, 172, 180, 192, 198, 202, 208, 210, 214, 238, 244, 262, 264, 268, 270, 282, 294, 300, 304, 312, 328, 330, 334, 340, 342, 354, 372, 384, 390, 394, 412, 414, 420, 424, 444, 454
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Comments

A010051(A127423(a(n))) = 1. - Reinhard Zumkeller, Jun 27 2015
All terms are even. - Michel Marcus, Oct 14 2016

Crossrefs

Programs

  • Haskell
    a054211 n = a054211_list !! (n-1)
    a054211_list = filter ((== 1) . a010051' . a127423) [1..]
    -- Reinhard Zumkeller, Jun 27 2015 Jul 15 2012
    
  • Mathematica
    ncpQ[{a_,b_}]:=PrimeQ[FromDigits[Flatten[IntegerDigits[{b,a}]]]]; Transpose[ Select[Partition[Range[500],2,1],ncpQ]][[2]] (* Harvey P. Dale, Nov 25 2012 *)
    Select[Range[500],PrimeQ[#*10^IntegerLength[#-1]+#-1]&] (* Harvey P. Dale, Mar 16 2019 *)
  • PARI
    isok(n) = isprime(eval(Str(n, n-1))); \\ Michel Marcus, Oct 14 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

A309808 Primes formed by concatenating k and 2k+1.

Original entry on oeis.org

13, 37, 613, 919, 1021, 1123, 1327, 1429, 1531, 2143, 2347, 2551, 2857, 3061, 3163, 3469, 3571, 3673, 3877, 4591, 4999, 50101, 56113, 59119, 63127, 70141, 71143, 74149, 78157, 79159, 81163, 88177, 91183, 93187, 95191, 101203, 105211, 106213, 108217, 110221, 113227, 114229
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 17 2019

Keywords

Comments

Primes in A309809.

Examples

			a(3)=613 is the concatenation of 6 and 2*6+1=13 and is prime.
		

Crossrefs

Programs

  • Magma
    [a:m in [1..130]|IsPrime(a) where a is 10^(#Intseq(2*m+1))*m+2*m+1]; // Marius A. Burtea, Aug 18 2019
  • Maple
    select(isprime, [seq(n*10^(1+ilog10(2*n+1))+2*n+1,n=1..200)]);

A068700 The concatenation of n with n-1 and n with n+1 both yield primes (twin primes).

Original entry on oeis.org

42, 78, 102, 108, 180, 192, 270, 300, 312, 330, 342, 390, 420, 522, 540, 612, 660, 822, 840, 882, 1002, 1140, 1230, 1272, 1482, 1542, 1632, 1770, 2100, 2190, 2682, 2742, 3072, 3198, 3408, 3642, 3828, 4242, 4452, 4572, 4740, 4788, 4998, 5622, 5718, 5832
Offset: 1

Views

Author

Amarnath Murthy, Mar 04 2002

Keywords

Comments

All terms are congruent to {0, 12, 18} mod 30. - Zak Seidov, Oct 24 2014
a(n) = 2 * A102478(n). - Reinhard Zumkeller, Jun 27 2015

Examples

			42 is a member as 4241 as well as 4243 are primes.
		

Crossrefs

Common terms of A030458 and A052089.
Intersection of A030457 and A054211; A102478.

Programs

  • Haskell
    import Data.List.Ordered (isect)
    a068700 n = a068700_list !! (n-1)
    a068700_list = isect a030457_list a054211_list
    -- Reinhard Zumkeller, Jun 27 2015
  • Maple
    filter:= proc(n)
    local d;
    d:= ilog10(n)+1;
    isprime(n*10^d+n-1) and isprime(n*10^d+n+1)
    end proc:
    select(filter, [$1..10^5]); # Robert Israel, Oct 24 2014
  • Mathematica
    d[n_]:=IntegerDigits[n]; conQ[n_]:=And@@PrimeQ[FromDigits/@{Join[d[n],d[n+1]],Join[d[n],d[n-1]]}]; Select[Range[5850],conQ[#] &] (* Jayanta Basu, May 21 2013 *)
  • PARI
    for(n=2,200, if(isprime(n*10^ceil(log(n-1)/log(10))+n-1)*isprime(n*10^ceil(log(n+1)/log(10))+n+1)==1,print1(n,",")))
    

Extensions

More terms from Benoit Cloitre, Mar 09 2002
Showing 1-10 of 34 results. Next