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.

A178220 Smallest number that appending to n-th prime gives another prime.

Original entry on oeis.org

3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 1, 3, 9, 1, 9, 23, 3, 3, 3, 9, 3, 7, 9, 23, 1, 3, 1, 11, 1, 11, 7, 9, 3, 9, 3, 1, 1, 7, 29, 3, 11, 1, 3, 1, 3, 3, 1, 7, 3, 3, 3, 3, 1, 11, 9, 3, 3, 1, 7, 9, 3, 9, 9, 9, 7, 21, 3, 1, 21, 1, 3, 3, 1, 3, 3, 3, 17, 19, 3, 1, 11, 1, 17, 7, 1, 51, 3, 37, 33, 7
Offset: 1

Views

Author

Zak Seidov, Dec 20 2010

Keywords

Examples

			n=1: prime(1)=2, A030670(1)=23, after deleting 2 we get a(1)=3
n=2: prime(2)=3, A030670(2)=31, after deleting 3 we get a(2)=1
		

Crossrefs

Cf. A030670.

Programs

  • Mathematica
    f[n_] := (k = 1; tsn = ToString[n]; While[a = ToExpression[tsn <> ToString[k]]; !PrimeQ[a], k++]; k);
    Table[f[Prime[n]], {n, 1, 200}]

Formula

a(n) = A030670(n) after deleting n-th prime.