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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

2, 17, 347, 521, 10601, 32027, 39569, 58061, 62969, 100469, 109541, 120401, 398129, 426383, 434261, 829883, 896771, 935063, 1190261, 1216583, 1261109, 1559963, 1697771, 2105381, 2128649, 2505857, 2778851, 2886563, 2920649, 3051977, 3157703, 3636617, 4068257, 5139257, 5480249, 5650097, 5938931
Offset: 1

Views

Author

Robert Israel and Will Gosnell, Apr 02 2019

Keywords

Comments

All terms == 2 (mod 3).
More than one prime p can have the same value of p + A007953(p), e.g. 528677993 + A007953(52867793) = 528678011 + A007953(528678011) = 22993^2.

Examples

			a(3)= 347 is in the sequence because 347+3+4+7=361=19^2 and 347 and 19 are primes.
		

Crossrefs

Subsequence of A242368.

Programs

  • Maple
    f:= proc(q) local m,d,nmin;
      m:= q^2;
      d:= ilog10(m)+1;
      nmin:= m - 9*d;
      nmin:= nmin + ((5-nmin) mod 6);
      op(select(t ->  t + convert(convert(t,base,10),`+`)=m and isprime(t), {seq(n, n=nmin .. m-2, 6)}))
    end proc:
    f(2):= 2:
    sort(map(f, [seq(ithprime(i),i=1..2000)]));
  • PARI
    is(n) = my(x=n+sumdigits(n)); isprimepower(x)==2
    forprime(p=1, 6e6, if(is(p), print1(p, ", "))) \\ Felix Fröhlich, Apr 02 2019

A342773 Numbers k such that k + sum of digits of k is a proper prime power.

Original entry on oeis.org

2, 4, 8, 17, 18, 25, 38, 72, 118, 121, 161, 234, 245, 275, 329, 347, 521, 614, 720, 830, 944, 998, 1016, 1318, 1355, 1664, 1829, 2041, 2169, 2183, 2189, 2384, 2786, 3115, 3464, 3710, 4082, 4472, 4891, 4900, 5027, 5315, 6230, 6543, 6836, 7889, 8173, 10190, 10592, 10601, 11435, 11858, 12154, 12752
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 21 2021

Keywords

Comments

Numbers k such that A062028(k) is in A246547.
Proper prime powers in the sequence include 4, 8, 25, 121. Are there any others?

Examples

			a(4) = 17 is a term because 17+1+7 = 25 = 5^2.
		

Crossrefs

Cf. A062028, A246547. Contains A242368.

Programs

  • Maple
    filter:= proc(n) local s,F;
       s:= n + convert(convert(n,base,10),`+`);
       F:= ifactors(s)[2];
       nops(F)=1 and F[1][2]>1
    end proc:
    select(filter, [$1..20000]);
  • PARI
    isok(k) = isprimepower(k + sumdigits(k)) > 1; \\ Michel Marcus, Mar 22 2021
Showing 1-2 of 2 results.