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-2 of 2 results.

A167535 Primes which are the concatenation of two squares (in decimal notation).

Original entry on oeis.org

11, 19, 41, 149, 181, 251, 449, 491, 499, 641, 811, 1009, 1289, 1361, 1699, 2251, 2549, 4001, 4289, 4441, 4729, 6449, 6481, 6761, 7841, 8419, 9001, 9619, 10891, 11369, 11681, 12149, 12251, 12401, 12601, 12809, 13249, 13691, 13721, 14449, 14489
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Nov 06 2009

Keywords

Comments

Necessarily a(n) has to end with 1 or 9.
It is not known if the sequence is infinite.
The Bunyakovsky conjecture implies that for every b coprime to 10, there are infinitely many terms where the second square is b^2. - Robert Israel, Jun 17 2021
Intersection of A191933 and A000040; A193095(a(n)) > 0 and A010051(a(n))=1. - Reinhard Zumkeller, Jul 17 2011

Examples

			11 = 1^2 * 10 + 1^2, 149 = 1^2 * 10^2 + 7^2, 1361 = 1^2 * 10^3 + 19^2.
14401 = 12^2 * 10^2 + 1^2 is not a term because included "0" (1^2=1 is 1-digit).
14449 = 12^2 * 10^2 + 7^2 = 38^2 * 10 + 3^2 is the smallest prime with 2 such representations.
		

References

  • Richard E. Crandall, Carl Pomerance, Prime Numbers, Springer 2005.
  • Wladyslaw Narkiewicz, The Development of Prime Number Theory from Euclid to Hardy and Littlewood, Springer 2000.
  • Paulo Ribenboim, The New Book of Prime Number Records, Springer 1996.

Crossrefs

Supersequence of A345314.

Programs

  • Haskell
    a167535 n = a167535_list !! (n-1)
    a167535_list = filter ((> 0) . a193095) a000040_list
    -- Reinhard Zumkeller, Jul 17 2011
    
  • Maple
    zcat:= proc(a,b) 10^(1+ilog10(b))*a+b end proc;
    S:= select(t -> t <= 10^7 and isprime(t), {seq(seq(zcat(a^2,b^2),a=1..10^3),b=1..10^3,2)}):
    sort(convert(S,list)); # Robert Israel, Jun 17 2021
  • PARI
    is_A167535(n)={ my(t=1); isprime(n) && while(n>t*=10, apply(issquare,divrem(n,t))==[1,1]~ && n%t*10>=t && return(1))}
    forprime(p=1,default(primelimit), is_A167535(p) && print1(p",")) \\ M. F. Hasler, Jul 24 2011
    
  • Python
    from sympy import isprime
    def aupto(lim):
        s = list(i**2 for i in range(1, int(lim**(1/2))+2))
        t = set(int(str(a)+str(b)) for a in s for b in s)
        return sorted(filter(isprime, filter(lambda x: x<=lim, t)))
    print(aupto(15000)) # Michael S. Branicky, Jun 17 2021

Formula

a(n) = m^2 * 10^k + n^2 for a k-digit square number n^2.

Extensions

11369 inserted by R. J. Mathar, Nov 07 2009

A167417 Largest prime concatenation of the first n primes, or 0 if no such prime exists.

Original entry on oeis.org

2, 23, 523, 7523, 751123, 75311213, 7523171311, 753217131911, 75323219131117, 0, 753312923219111713, 75373312923192171311, 7541373132923217111319, 754341373132923192171311, 75474341373132923211171319
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Nov 03 2009

Keywords

Comments

a(10) doesn't exist, because the sum of digits of the first 10 primes (2+3+5+7+(1+1)+(1+3)+(1+7)+(1+9)+(2+3)+(2+9)) = 57 is a multiple of 3.

Examples

			The only prime concatenations of the first n primes for n = 1..3 are a(1)=2, a(2)=23, and a(3)=523.
For n=4, the only prime concatenations of 2, 3, 5, and 7 are 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523; the largest of these is a(4) = 7523.
		

References

  • Richard E. Crandall and Carl Pomerance, Prime Numbers, Springer 2005.
  • Paulo Ribenboim, The New Book of Prime Number Records, Springer 1996.
  • A. Weil, Number theory: an approach through history, Birkhäuser 1984.

Crossrefs

Programs

  • Python
    from sympy import sieve, isprime
    from itertools import permutations
    for n in range(1, 14):
        sieve.extend_to_no(n)
        p = list(map(str, list(sieve._list)))[:n]
        mint = 0
        for i in permutations(p, len(p)):
            t = int(''.join(i))
            if  t > mint and isprime(t):
                mint = t
        print(mint, end = ', ') # Gleb Ivanov, Dec 05 2021

Extensions

Edited by Charles R Greathouse IV, Apr 28 2010
Several terms corrected and a(11)-a(15) from Gleb Ivanov, Dec 05 2021
Showing 1-2 of 2 results.