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

A052073 Primes p with the property that nextprime(p) is a substring of p^2.

Original entry on oeis.org

23, 83, 113, 1123, 200003, 328127, 381289, 714597769, 4916552822383
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Comments

a(10) > 4*10^13. The prime 482564152712479922509389813571 is also a term. - Giovanni Resta, May 24 2018

Examples

			381289 is a term because nextprime(381289) = 381301 is a substring of 381289^2 = 145381301521.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@Range[1000000],
    StringContainsQ[ToString[#^2], ToString[NextPrime[#]]] &] (* Robert Price, Oct 12 2019 *)

Extensions

a(8) from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Sep 04 2006
a(9) from Giovanni Resta, May 24 2018

A052075 Primes p such that nextprime(p) is substring of p^3.

Original entry on oeis.org

11, 101, 2239, 34297, 43789, 53549, 535487, 59897017, 430784719, 2549592677, 2837138669, 97969345967, 100000000019, 328096840219, 4110739763869
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Comments

a(16) > 6.9*10^12. - Giovanni Resta, Jul 02 2018

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1,10000]],StringContainsQ[ToString[#^3],ToString[NextPrime[#]]]&] (* Julien Kluge, Sep 19 2016 *)
    Select[Prime[Range[45000]],SequenceCount[IntegerDigits[#^3],IntegerDigits[ NextPrime[ #]]]>0&] (* Requires Mathematica version 10 or later *) (* The program generates the first 7 terms of the sequence: to generate more, increase Range constant. *) (* Harvey P. Dale, Jan 25 2021 *)
  • Python
    from itertools import count, islice
    from sympy import prime, nextprime
    def A052075_gen(): return filter(lambda p: str(nextprime(p)) in str(p**3), (prime(n) for n in count(1)))
    A052075_list = list(islice(A052075_gen(),3)) # Chai Wah Wu, Jan 20 2022

Extensions

More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Sep 12 2006
Offset corrected by N. J. A. Sloane, Jul 13 2016
a(12)-a(15) from Giovanni Resta, Jul 02 2018
Definition clarified by Chai Wah Wu, Jan 20 2022

A052074 Squares of primes p^2 with the property that nextprime(p) is a substring of p^2.

Original entry on oeis.org

529, 6889, 12769, 1261129, 40001200009, 107667328129, 145381301521, 510649971459777361, 24172491655282243145798689
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Examples

			The corresponding primes p are 23, 83, 113, 1123, 200003, 328127, ..., the "next primes" are 29, 89, 127, 1129, 200009, 328129, ..., and these numbers are indeed substrings of 529, 6889, 12769, 1261129, 40001200009, 107667328129, ...
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[37*10^6]]^2,SequenceCount[IntegerDigits[#], IntegerDigits[ NextPrime[ Sqrt[#]]]]>0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Jul 13 2016 *)

Extensions

a(8) from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Sep 04 2006
Definition clarified and offset changed by N. J. A. Sloane, Jul 13 2016
a(9) from Giovanni Resta, May 24 2018

A383607 Square array read by antidiagonals upwards: T(n,k) is the smallest k-digit prime p such that nextprime(p) is a substring of p^n; or -1 if no such prime exists, n>1, k>0.

Original entry on oeis.org

-1, -1, 23, -1, 11, 113, 2, 37, 101, 1123, 7, 17, 487, 2239, -1, 5, 47, -1, 5659, 34297, 200003, 3, 13, -1, 2399, 91801, 535487, -1, -1, 31, 607, 1279, 31627, 842483, -1, -1, 3, 41, 431, 3163, 12281, 825059, 6315629, 59897017, 714597769, -1, 37, 233, 1931, 15791, 179947, 5623421, -1, 430784719, -1
Offset: 2

Views

Author

Jean-Marc Rebert, May 01 2025

Keywords

Examples

			T(2,3) = 113, because nextprime(113) = 127 is a substring in 113^2 = 12769, starting at position 1, and no smaller 3-digit prime satisfies this condition.
Top left corner begins at T(2,1):
  -1, 23, 113, 1123, ...
  -1, 11, 101, 2239, ...
  -1, 37, 487, 5659, ...
   2, 17,  -1, 2399, ...
  .., .., ..., ...., ...
		

Crossrefs

Programs

  • PARI
    T(n,k) = forprime(p=10^(k-1), 10^k-1, if (#strsplit(Str(p^n), Str(nextprime(p+1))) >= 2, return(p));); return(-1); \\ Michel Marcus, May 02 2025
Showing 1-4 of 4 results.