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.

A152242 Integers formed by concatenating primes.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 22, 23, 25, 27, 29, 31, 32, 33, 35, 37, 41, 43, 47, 52, 53, 55, 57, 59, 61, 67, 71, 72, 73, 75, 77, 79, 83, 89, 97, 101, 103, 107, 109, 112, 113, 115, 117, 127, 131, 132, 133, 135, 137, 139, 149, 151, 157, 163, 167, 172, 173, 175, 177, 179
Offset: 1

Views

Author

Eric Angelini, Oct 15 2009

Keywords

Comments

Leading zeros are not allowed (cf. A166504).
For any k > 0, there are A246806(k) terms with k digits. - Rémy Sigrist, Jan 08 2023

Examples

			101 is a member since it is prime; 303 is not since it is composite and 30 is also not a prime.
		

Crossrefs

Programs

  • PARI
    is_A152242(n)=/* If n is even, the last digit must be 2 and [n\10] (if nonzero) must be in this sequence. (This check is not necessary but improves speed.) */ bittest(n,0) || return( n%10==2 && (n<10 || is_A152242(n\10))); isprime(n) && return(1); for(i=1,#Str(n)-1, n%10^i>10^(i-1) && isprime( n%10^i ) && is_A152242( n\10^i) && return(1)) \\ M. F. Hasler, Oct 15 2009; edited Oct 16 2009, to disallow leading zeros
    
  • Python
    from sympy import isprime
    def ok(n):
        if isprime(n): return True
        s = str(n)
        return any(s[i]!="0" and isprime(int(s[:i])) and ok(int(s[i:])) for i in range(1, len(s)))
    print([k for k in range(180) if ok(k)]) # Michael S. Branicky, Sep 01 2024

Extensions

More terms from M. F. Hasler and Zak Seidov, Oct 15 2009

A038840 Cubes that are concatenations of primes.

Original entry on oeis.org

27, 343, 729, 1331, 2197, 3375, 4913, 5832, 19683, 21952, 24389, 29791, 35937, 54872, 59319, 91125, 103823, 110592, 117649, 148877, 166375, 195112, 205379, 226981, 250047, 314432, 357911, 389017, 421875, 571787, 614125, 681472, 753571, 857375, 941192, 1092727
Offset: 1

Views

Author

Keywords

Examples

			Examples from _Sean A. Irvine_, Feb 15 2021: (Start)
3^3 = 27 = (2)(7).
18^3 = 5832 = (5)(83)(2).
29^3 = 24389 = (2)(43)(89).
(End)
		

Crossrefs

Cf. A038692.

Programs

Extensions

Missing a(6), a(7), a(9), a(13), a(16)-a(18), a(21), a(23) from Charles R Greathouse IV, Jun 10 2013
Missing terms inserted and more terms from Sean A. Irvine, Feb 15 2021

A166503 Numbers k with property that k^2 is the concatenation of two or more prime numbers.

Original entry on oeis.org

5, 15, 17, 19, 23, 27, 49, 51, 53, 69, 73, 77, 85, 87, 107, 109, 115, 123, 141, 147, 151, 153, 157, 159, 163, 165, 171, 173, 177, 181, 187, 191, 199, 219, 229, 231, 233, 235, 239, 241, 243, 267, 269, 277, 279, 281, 289, 299, 319, 327, 331, 335, 337, 343, 357
Offset: 1

Views

Author

Zak Seidov, Oct 15 2009

Keywords

Comments

Only odd numbers are eligible.

Crossrefs

Programs

Formula

a(n) = sqrt(A038692(n)).

Extensions

Terms updated according to stricter definition of A152242 by M. F. Hasler, Oct 15 2009

A351925 Squares which are the concatenation of two primes.

Original entry on oeis.org

25, 289, 361, 529, 729, 2401, 2601, 2809, 4761, 5329, 5929, 7569, 11449, 11881, 15129, 19881, 21609, 22801, 23409, 24649, 25281, 26569, 29241, 29929, 31329, 34969, 36481, 39601, 47961, 52441, 53361, 54289, 57121, 58081, 59049, 71289, 77841, 83521, 89401
Offset: 1

Views

Author

Max Z. Scialabba, Feb 25 2022

Keywords

Comments

The first term that is the concatenation of two primes in more than one way is a(11) = 5929 = 5 | 929 = 59 | 29. - Robert Israel, Oct 01 2023

Examples

			25 is the concatenation of 2 and 5, both primes.
4761 is the concatenation of 47 and 61, both primes.
		

Crossrefs

Cf. A000290 (squares), A039686, A106582, inverse of A167535.

Programs

  • Maple
    L:= NULL: count:=0:
    for x from 1 by 2 while count < 100 do
      xs:= x^2;
      for i from 1 to ilog10(xs) do
        a:= xs mod 10^i;
        if a > 10^(i-1) and isprime(a) then
          b:= (xs-a)/10^i;
          if isprime(b) then
            L:= L, xs; count:= count+1; break
          fi fi
    od od:
    L; # Robert Israel, Oct 01 2023
  • PARI
    isb(n)={my(d=10); while(dAndrew Howroyd, Feb 26 2022
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        for k in count(1):
            s = str(k*k)
            if any(s[i] != '0' and isprime(int(s[:i])) and isprime(int(s[i:])) for i in range(1, len(s))):
                yield k*k
    print(list(islice(agen(), 39))) # Michael S. Branicky, Feb 26 2022

Formula

Intersection of A106582 and A000290.

A165631 Numbers whose cube is a concatenation of primes, i.e., in A152242.

Original entry on oeis.org

3, 7, 9, 11, 13, 15, 17, 18, 27, 28, 29, 31, 33, 38, 39, 45, 47, 48, 49, 53, 55, 58, 59, 61, 63, 68, 71, 73, 75, 83, 85, 88, 91, 95, 98, 103, 108, 111, 113, 117, 121, 125, 127, 131, 133, 135, 137, 138, 148, 153, 157, 159, 161, 163, 167, 168, 173, 175, 177, 178, 179
Offset: 1

Views

Author

Zak Seidov and M. F. Hasler, Oct 16 2009

Keywords

Crossrefs

Programs

  • PARI
    for(n=1,999, is_A152242(n^3) & print1(n", "))

Extensions

Edited by Charles R Greathouse IV, Apr 24 2010
Showing 1-5 of 5 results.