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.

A359973 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, the concatenation of the decimal digits of n and a(n) or of a(n) and n yields a prime number.

This page as a plain text file.
%I A359973 #15 Jan 22 2023 08:37:38
%S A359973 1,3,2,7,9,13,4,11,5,19,8,17,6,23,31,21,12,47,10,27,16,37,14,41,39,33,
%T A359973 20,43,32,49,15,29,26,57,59,71,22,51,25,73,24,53,28,63,61,79,18,77,30,
%U A359973 81,38,97,42,83,69,89,34,67,35,91,45,87,44,109,99,103,58
%N A359973 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, the concatenation of the decimal digits of n and a(n) or of a(n) and n yields a prime number.
%C A359973 Leading zeros are ignored.
%C A359973 This sequence is a self-inverse permutation of the positive integers (for any positive number v, there are infinitely many prime numbers starting with 10*v+1, so infinitely many prime numbers that are the concatenation of v and some other positive integer).
%C A359973 There is only one fixed point: a(1) = 1.
%H A359973 Michael De Vlieger, <a href="/A359973/b359973.txt">Table of n, a(n) for n = 1..16384</a>
%H A359973 Michael De Vlieger, <a href="/A359973/a359973.png">Log log scatterplot of a(n)</a>, n = 1..2^14, showing a(n) coprime to 10 in red and other numbers in dark blue.
%H A359973 Michael De Vlieger, <a href="/A359973/a359973_1.png">Log log scatterplot of a(n)</a>, n = 1..2^10, showing primes in red, composite prime powers in gold, squarefree composites in dark green, and other numbers in blue, showing powerful numbers that are not prime powers in light blue.
%H A359973 Mathematics StackExchange, <a href="https://math.stackexchange.com/questions/60825/proof-that-there-are-infinitely-many-prime-numbers-starting-with-a-given-digit-s">Proof that there are infinitely many prime numbers starting with a given digit string</a>
%H A359973 Rémy Sigrist, <a href="/A359973/a359973.gp.txt">PARI program</a>
%H A359973 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A359973 The first terms, alongside the corresponding prime numbers, are:
%e A359973   n   a(n)  Corresponding prime numbers
%e A359973   --  ----  ---------------------------
%e A359973    1     1  {11}
%e A359973    2     3  {23}
%e A359973    3     2  {23}
%e A359973    4     7  {47}
%e A359973    5     9  {59}
%e A359973    6    13  {613}
%e A359973    7     4  {47}
%e A359973    8    11  {811}
%e A359973    9     5  {59}
%e A359973   10    19  {1019}
%e A359973   11     8  {811}
%e A359973   12    17  {1217}
%t A359973 nn = 120; c[_] := False; a[1] = 1; c[1] = True; u = 2; Q[n_] := AnyTrue[{FromDigits[Join[d, #]], FromDigits[Join[#, d]]} & @@ {IntegerDigits[n], d}, PrimeQ]; Do[Set[{k, d}, {u, IntegerDigits[n]}]; While[Nand[! c[k], Q[k]], k++]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* _Michael De Vlieger_, Jan 21 2023 *)
%o A359973 (PARI) See Links section.
%Y A359973 Cf. A083569, A088629.
%K A359973 nonn,base
%O A359973 1,2
%A A359973 _Rémy Sigrist_, Jan 20 2023