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.

A344871 a(n) is the least number that can be represented in exactly n ways as the sum of a prime and its digit reversal.

This page as a plain text file.
%I A344871 #12 Jun 01 2021 02:15:54
%S A344871 1,4,44,88,1090,3212,4334,2992,5995,4994,7997,9779,5104,11110,11891,
%T A344871 10109,11000,10780,108880,110500,252142,278872,296692,293282,308902,
%U A344871 287782,411103,289982,466664,281072,457754,398893,298892,462154,517814,494384,299992,707806,471064,476674,487784,467764
%N A344871 a(n) is the least number that can be represented in exactly n ways as the sum of a prime and its digit reversal.
%C A344871 If the reversal of p is another prime, p+reversal(p) and reversal(p)+p are both counted.
%C A344871 a(n) is the first number that occurs exactly n times in A061227.
%H A344871 Robert Israel, <a href="/A344871/b344871.txt">Table of n, a(n) for n = 0..92</a>
%e A344871 a(4) = 1090 because 1090 = 149+941 = 347+743 = 743+347 = 941+149, and this is the least number with exactly four such representations.
%p A344871 revdigs:= proc(n) local L,t;
%p A344871 L:= convert(n,base,10);
%p A344871 add(L[-t]*10^(t-1),t=1..nops(L));
%p A344871 end proc:
%p A344871 V:= Vector(10^6):
%p A344871 p:= 1:
%p A344871 do
%p A344871   p:= nextprime(p);
%p A344871   if p > 9*10^5 then break fi;
%p A344871   r:= p+revdigs(p);
%p A344871   if r <= 10^6 then V[r]:= V[r]+1 fi
%p A344871 od:
%p A344871 A:= Array(0..64):
%p A344871 for i from 1 to 10^6 do
%p A344871   if V[i] <= 64 and A[V[i]] = 0 then A[V[i]]:= i fi
%p A344871 od:
%p A344871 convert(A,list);
%Y A344871 Cf. A004086, A061227, A056964.
%K A344871 nonn,base
%O A344871 0,2
%A A344871 _J. M. Bergot_ and _Robert Israel_, May 31 2021