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

A068699 Duplicate of A052089.

Original entry on oeis.org

43, 109, 2221, 2423, 3433, 4241, 5857, 7069, 7877, 8887, 10099, 102101, 108107
Offset: 1

Views

Author

Keywords

A030458 Primes formed by concatenating n with n+1.

Original entry on oeis.org

23, 67, 89, 1213, 3637, 4243, 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, 276277, 278279, 300301, 308309, 312313, 318319
Offset: 1

Views

Author

Keywords

Comments

Primes in A030656.

Crossrefs

Programs

  • Magma
    [m: n in [2..270 by 2] | IsPrime(m) where m is Seqint(Intseq(n+1) cat Intseq(n))];  // Bruno Berselli, Jun 18 2011
    
  • Mathematica
    Select[Table[FromDigits[Join[Flatten[IntegerDigits[{n,n+1}]]]],{n,270}],PrimeQ] (* Jayanta Basu, May 16 2013 *)
  • PARI
    forstep(n=2,1e3,2,if(isprime(k=eval(Str(n,n+1))),print1(k", "))) \\ Charles R Greathouse IV, Jun 18 2011
    
  • 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(), 38))) # 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

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

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

A341701 a(n) = largest m > 0 such that the decimal concatenation n||n-1||n-2||...||m is prime, or -1 if no such prime exists.

Original entry on oeis.org

-1, -1, 2, 3, 3, 5, -1, 7, -1, -1, 9, 11, -1, 13, -1, -1, -1, 17, -1, 19, -1, -1, 21, 23, 23, 13, -1, 23, -1, 29, -1, 31, -1, -1, 33, -1, -1, 37, -1, -1, -1, 41, 41, 43, -1, -1, 39, 47, 41, -1, -1, 47, 37, 53, -1, 43, 47, -1, 57, 59, 47, 61, -1, -1, -1, -1, -1
Offset: 0

Views

Author

Chai Wah Wu, Feb 23 2021

Keywords

Comments

A variant of A341717. a(82) = 1. Are there other n such that a(n) = 1?
Similar argument as in A341716 shows that if n > 3 and a(n) >= 0, then a(n) is odd, n-a(n) !== 2 (mod 3) and n+a(n) !== 0 (mod 3).

Examples

			a(4) = 3 since 43 is prime, a(25) = 13 since 25242322212019181716151413 is prime.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    def A341701(n):
        k, m = n, n-1
        while not isprime(k) and m > 0:
            k = int(str(k)+str(m))
            m -= 1
        return m+1 if isprime(k) else -1

Formula

a(p) = p if and only if p is prime.
Showing 1-10 of 31 results. Next