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

A088757 a(n) = index of the first occurrence of n in A088606.

Original entry on oeis.org

2, 5, 7, 8, 26, 40, 134, 160, 107, 172, 35, 79, 739, 267, 137, 1119, 97, 1498, 983, 1404, 2193, 1206, 3262, 369, 3256, 2728, 1406, 3483, 6771, 2226, 12077, 8533, 1890, 9889, 10925, 10935, 3981, 10763, 13030, 16958, 13433, 16369, 47602, 26190, 17115, 33262
Offset: 1

Views

Author

Ray Chandler, Oct 18 2003

Keywords

Crossrefs

Cf. A088606.

A096915 Smallest prime which when appended to n produces a prime.

Original entry on oeis.org

3, 3, 7, 3, 3, 7, 3, 3, 7, 3, 3, 7, 7, 23, 7, 3, 3, 11, 3, 11, 11, 3, 3, 11, 7, 3, 7, 3, 3, 7, 3, 17, 7, 7, 3, 7, 3, 3, 7, 13, 11, 11, 3, 3, 7, 3, 23, 7, 19, 3, 13, 3, 23, 7, 7, 3, 7, 7, 3, 7, 3, 11, 11, 3, 3, 19, 3, 3, 11, 13, 29, 7, 3, 3, 7, 43, 3, 7, 7, 11, 11, 3, 11, 19, 3, 3, 7, 3, 23, 7, 37, 41
Offset: 1

Views

Author

Bodo Zinser, Aug 18 2004

Keywords

Examples

			a(20)=11 because 11 is prime and 2011 is the smallest prime starting with 20 (2003 is not allowed).
		

Crossrefs

Cf. A088606, A089777 (the resulting primes). Records: A137177, A144593.

Programs

  • Mathematica
    f[n_] := Block[{p = 2, a = IntegerDigits[n]}, While[ !PrimeQ[ FromDigits[ Join[a, IntegerDigits[ Prime[p]]] ]], p++ ]; Prime[p]]; Table[ f[n], {n, 92}] (* Robert G. Wilson v, Aug 20 2004 *)
    sp[n_]:=Module[{p=3},While[CompositeQ[n*10^IntegerLength[p]+p],p= NextPrime[ p]];p]; Array[sp,100] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 26 2019 *)
  • PARI
    A096915(n) = { local(p=1); until(isprime(eval(Str(n,p=nextprime(p+2)))),);p} \\ M. F. Hasler, Jan 05 2009

Extensions

More terms from Robert G. Wilson v, Aug 20 2004
Cross-reference to indices of records corrected by M. F. Hasler, Jan 14 2009

A173291 Smallest prime p such that the concatenation of p and prime(n) is a prime, or 0 if no other number exists.

Original entry on oeis.org

0, 2, 0, 3, 2, 3, 3, 7, 2, 2, 3, 3, 2, 7, 3, 3, 3, 7, 3, 2, 3, 3, 2, 3, 3, 5, 7, 5, 3, 2, 7, 2, 2, 19, 11, 7, 19, 3, 3, 9, 2, 3, 3, 7, 5, 37, 7, 31, 5, 3, 5, 2, 13, 2, 3, 41, 2, 3, 31, 2, 7, 2, 3, 2, 3, 11, 3, 13, 2, 7, 11, 3, 13, 3, 19, 2, 2, 13, 17, 37, 5, 13, 5, 3, 139, 5, 3, 3, 3, 3, 2, 5, 7, 3, 3
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Feb 15 2010

Keywords

Comments

If prime(n) has k digits then a(k) is the smallest prime(m) where 10^k * prime(m) + prime(n) is a prime.
In base 10, no prime can be prefixed to 2 or 5 to make another prime.

Examples

			a(2) = 2 because prime(2) = 3, and the concatenation of 2 and 3 gives the prime 23.
a(3) = 0 because prime(3) = 5 and there is no prime to concatenate with to give another prime.
a(4) = 3 because prime(5) = 7 but the concatenation with 2 gives 27 = 3^3, so it has to be 3 in order to give 37, which is prime.
		

References

  • John Derbyshire, Prime obsession. Joseph Henry Press, Washington, DC 2003
  • Marcus du Sautoy, Die Musik der Primzahlen. Auf den Spuren des groessten Raetsels der Mathematik, Beck, Muenchen 2004
  • Theo Kempermann, Zahlentheoretische Kostproben, Harri Deutsch, 2. aktualisierte Auflage 2005

Crossrefs

Showing 1-3 of 3 results.