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-4 of 4 results.

A107606 Perfect powers which have the form prime(n) + n for some n.

Original entry on oeis.org

8, 16, 27, 32, 49, 529, 676, 1000, 1225, 1521, 1681, 1764, 2744, 3249, 4096, 5929, 9604, 10404, 10609, 11664, 12321, 19600, 24336, 25921, 26569, 27889, 33856, 34225, 34596, 46656, 51984, 68921, 71289, 72361, 91204, 100489, 101124, 104976
Offset: 1

Views

Author

Zak Seidov, May 17 2005

Keywords

Comments

Corresponding n's are in A107605.

Crossrefs

Cf. A001597 (perfect powers), A107605 (associated n), A107607, A107608.

Programs

  • Mathematica
    f[n_] := Prime[n] + n; Select[f /@ Range[10^4], ! GCD @@ Last /@ FactorInteger[ # ] == 1 &] (* Ray Chandler, May 21 2005 *)
    perfPQ[n_]:=GCD@@FactorInteger[n][[All,2]]>1; Select[Table[Prime[n]+n,{n,10000}],perfPQ] (* Harvey P. Dale, Jan 28 2023 *)

Formula

A107606(n) = prime[A107605(n)] + A107605(n)

Extensions

Extended by Ray Chandler and Robert G. Wilson v, May 21 2005

A107607 Numbers n such that prime(n) - n is a perfect power.

Original entry on oeis.org

1, 2, 12, 15, 38, 39, 100, 118, 152, 190, 212, 258, 352, 462, 542, 690, 741, 746, 1285, 1396, 1417, 1632, 2119, 2243, 2318, 2603, 3370, 3777, 4073, 4155, 4485, 4522, 4600, 4719, 5317, 5446, 6697, 6748, 6985, 7144, 7520, 7595, 9492, 9551, 12010, 12985
Offset: 1

Views

Author

Zak Seidov, May 17 2005

Keywords

Examples

			Prime(12) - 12 = 37 - 12 = 25 = 5^2.
		

Crossrefs

Cf. A001597 (perfect powers), A107605, A107606, A107608 (associated prime(n)-n).

Programs

  • Mathematica
    f[n_] := Prime[n] - n; Select[Range[10^4], ! GCD @@ Last /@ FactorInteger[f[ # ]] == 1 &] (* Ray Chandler, May 21 2005 *)
  • PARI
    isA107607(n)=(ispower(prime(n)-n) > 1) || (prime(n)-n == 1) \\ Michael B. Porter, Sep 28 2009

Extensions

Extended by Ray Chandler, May 21 2005

A107608 Perfect powers which have the form prime(n) - n for some n.

Original entry on oeis.org

1, 1, 25, 32, 125, 128, 441, 529, 729, 961, 1089, 1369, 2025, 2809, 3375, 4489, 4900, 4913, 9216, 10201, 10404, 12167, 16384, 17576, 18225, 20736, 27889, 31684, 34596, 35344, 38416, 38809, 39601, 40804, 46656, 47961, 60516, 61009, 63504, 65025
Offset: 1

Views

Author

Zak Seidov, May 17 2005

Keywords

Comments

Corresponding n's in A107607.

Crossrefs

Cf. A001597 (perfect powers), A107605, A107606, A107607 (associated n).

Programs

  • Mathematica
    f[n_] := Prime[n] - n; Select[f /@ Range[10^4], ! GCD @@ Last /@ FactorInteger[ # ] == 1 &] (* Ray Chandler, May 21 2005 *)

Formula

a(n) = prime(A107607(n)) - A107607(n).

Extensions

Extended by Ray Chandler, May 21 2005

A109314 Numbers n such that prime(n) + n is a prime power (A246547).

Original entry on oeis.org

3, 5, 8, 9, 12, 86, 230, 503, 1170, 2660, 2772, 6288, 6572, 8858, 9590, 14870, 16332, 17708, 53132, 54540, 63890, 64908, 82830, 93068, 98132, 104726, 119298, 136502, 152198, 177918, 187040, 234650, 241682, 253118, 263930, 278970, 376680, 412440, 456110, 469034
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, Jun 25 2005

Keywords

Examples

			2660 is OK because prime(2660) + 2660 = 23909 + 2660 = 26569 = 163^2, 163 is prime.
		

Crossrefs

Cf. A025475 = powers of a prime but not prime, also nonprime n such that sigma(n)*phi(n) > (n-1)2; A107708 = values of q, A107709 = values of k; A107710 = values of prime (A109314(n)).

Programs

  • Maple
    ispp:= n -> not isprime(n) and nops(numtheory:-factorset(n))=1:
    p:= 1: Res:= NULL:
    for n from 1 to 10^6 do
      p:= nextprime(p);
      if ispp(n+p) then Res:= Res, n fi
    od:
    Res; # Robert Israel, Jun 08 2016
  • Mathematica
    lst = {}; fQ[n_] := Block[{pf = FactorInteger[n]}, (2-Length[pf])(pf[[1, 2]]-1) > 0]; Do[ If[ fQ[Prime[n] + n], Print[n]; AppendTo[lst, n]], {n, 456109}]; lst
  • PARI
    isok(n) = isprimepower(n+prime(n)) >= 2; \\ Michel Marcus, Jun 18 2017
  • Sage
    def np(n): return n+nth_prime(n)
    [n for n in (1..10000) if not np(n).is_prime() and np(n).is_prime_power()] # Giuseppe Coppoletta, Jun 08 2016
    

Formula

prime(n) + n = q^k, q is prime and k_Integer >= 2.
Showing 1-4 of 4 results.