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.

A307315 Primes p such that p + A007953(p) is the square of a prime.

This page as a plain text file.
%I A307315 #14 Apr 02 2019 19:16:10
%S A307315 2,17,347,521,10601,32027,39569,58061,62969,100469,109541,120401,
%T A307315 398129,426383,434261,829883,896771,935063,1190261,1216583,1261109,
%U A307315 1559963,1697771,2105381,2128649,2505857,2778851,2886563,2920649,3051977,3157703,3636617,4068257,5139257,5480249,5650097,5938931
%N A307315 Primes p such that p + A007953(p) is the square of a prime.
%C A307315 All terms == 2 (mod 3).
%C A307315 More than one prime p can have the same value of p + A007953(p), e.g. 528677993 + A007953(52867793) = 528678011 + A007953(528678011) = 22993^2.
%H A307315 Robert Israel, <a href="/A307315/b307315.txt">Table of n, a(n) for n = 1..10000</a>
%e A307315 a(3)= 347 is in the sequence because 347+3+4+7=361=19^2 and 347 and 19 are primes.
%p A307315 f:= proc(q) local m,d,nmin;
%p A307315   m:= q^2;
%p A307315   d:= ilog10(m)+1;
%p A307315   nmin:= m - 9*d;
%p A307315   nmin:= nmin + ((5-nmin) mod 6);
%p A307315   op(select(t ->  t + convert(convert(t,base,10),`+`)=m and isprime(t), {seq(n, n=nmin .. m-2, 6)}))
%p A307315 end proc:
%p A307315 f(2):= 2:
%p A307315 sort(map(f, [seq(ithprime(i),i=1..2000)]));
%o A307315 (PARI) is(n) = my(x=n+sumdigits(n)); isprimepower(x)==2
%o A307315 forprime(p=1, 6e6, if(is(p), print1(p, ", "))) \\ _Felix Fröhlich_, Apr 02 2019
%Y A307315 Subsequence of A242368.
%Y A307315 Cf. A007953, A062028, A228195.
%K A307315 nonn,base
%O A307315 1,1
%A A307315 _Robert Israel_ and _Will Gosnell_, Apr 02 2019