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.

A032662 a(n) is the least k such that k concatenated with k + n is prime.

Original entry on oeis.org

1, 2, 1, 4, 3, 12, 1, 2, 1, 2, 3, 6, 1, 6, 3, 4, 5, 4, 5, 8, 7, 2, 21, 10, 17, 2, 1, 2, 3, 4, 1, 2, 7, 14, 3, 4, 1, 2, 1, 2, 11, 6, 5, 18, 3, 4, 3, 6, 1, 2, 1, 8, 5, 4, 7, 2, 1, 4, 5, 4, 11, 2, 1, 4, 3, 12, 1, 2, 9, 2, 3, 6, 1, 8, 9, 2, 3, 6, 1, 2, 1, 2, 5, 4, 929, 6, 3, 4, 5, 12, 1, 2, 1
Offset: 0

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

First terms of sequences '1', A030457, A032617-A032624, continued with displacements d > 9.

Examples

			a(22) = 21: the concatenation of 21 and 21 + 22 = 43 is 2143 and this is a prime.
		

Crossrefs

Cf. A032663.

Programs

  • Maple
    tcat:= (a,b) -> a*10^(1+ilog10(b))+b:
    f:= proc(n) local k;
      for k from 1 + (n mod 2) by 2 do
         if isprime(tcat(k,k+n)) then return k fi
      od;
    end proc:
    map(f, [$0..100]); # Robert Israel, Sep 05 2024

Extensions

Edited by Robert Israel, Sep 05 2024