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

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.

A371655 G.f. satisfies A(x) = 1 + x * A(x) * (1 + A(x))^2.

Original entry on oeis.org

1, 4, 32, 336, 4032, 52352, 716032, 10161408, 148229120, 2208921600, 33482670080, 514630230016, 8001860567040, 125640146354176, 1989285578473472, 31725578742464512, 509178657425326080, 8217766225008656384, 133287551280741351424, 2171450128344786403328
Offset: 0

Views

Author

Seiichi Manyama, Apr 01 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = if(n==0, 1, sum(k=0, (n-1)\2, 4^(n-k)*binomial(n, k)*binomial(2*n-k, n-1-2*k))/n);

Formula

a(n) = (1/n) * Sum_{k=0..floor((n-1)/2)} 4^(n-k) * binomial(n,k) * binomial(2*n-k,n-1-2*k) for n > 0.
a(n) = 2^n * A100327(n). - Seiichi Manyama, Dec 26 2024

A371657 G.f. satisfies A(x) = 1 + x * A(x)^2 * (1 + A(x) + A(x)^2).

Original entry on oeis.org

1, 3, 27, 333, 4752, 73764, 1209492, 20610693, 361403937, 6478386561, 118181952369, 2186908154748, 40949739595242, 774474351098031, 14772979729013247, 283878381945510621, 5490264493926636912, 106786725176131118523, 2087502569999563971843
Offset: 0

Views

Author

Seiichi Manyama, Apr 01 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = if(n==0, 1, sum(k=0, (n-1)\2, 3^(n-k)*binomial(n, k)*binomial(3*n-k, n-1-2*k))/n);

Formula

a(n) = (1/n) * Sum_{k=0..floor((n-1)/2)} 3^(n-k) * binomial(n,k) * binomial(3*n-k,n-1-2*k) for n > 0.
Showing 1-3 of 3 results.