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.

A251859 First appearance of prime(n) in A157480.

Original entry on oeis.org

1, 6, 5, 10, 3, 2, 8, 7, 13, 20, 30, 28, 27, 26, 35, 58, 45, 56, 55, 21, 96, 142, 53, 93, 262, 14, 139, 12, 195, 47, 87, 57, 214, 404, 133, 255, 81, 252, 37, 36, 187, 128, 127, 479, 75, 572, 477, 313, 70, 475, 179, 68, 241, 310, 19, 98, 115, 469, 762, 114, 234, 94, 302, 231, 1238, 229, 298, 376, 50, 161
Offset: 1

Views

Author

Zak Seidov, Dec 10 2014

Keywords

Comments

Apparently all primes eventually appear in A157480. Note that this sequence is one-to-one map while A157480 not.

Examples

			a(3)=5 because A157480(5)=prime(3)=5 and prime(3)+prime(5)=5+11=16=4^2,
a(4)=10 because A157480(10)=prime(4)=7 and prime(4)+prime(10)=7+29=36=6^2.
		

Crossrefs

Cf. A157480.

Formula

A157480(a(n)) = prime(n), or prime(a(n))+prime(n) is a square.

A259226 Numbers n such that A157480(n) = A259232(n).

Original entry on oeis.org

2, 3, 7, 12, 14, 19, 29, 36, 37, 38, 42, 46, 50, 67, 73, 74, 82, 84, 106, 110, 112, 125, 134, 143, 157, 168, 169, 177, 183, 202, 222, 226, 232, 249, 263, 275, 278, 282, 314, 327, 355, 369, 399, 433, 457, 464, 483, 557, 617, 685, 820, 826, 835, 838, 935, 937, 1031, 1059, 1080, 1087, 1112, 1205, 1276, 1296, 1316, 1349, 1421, 1503, 1505, 1713, 1827, 2017, 2085, 2092, 2263, 2337, 2357, 2498, 2591, 2594, 2634, 2676, 2771, 2984, 3128, 3776, 3777, 3928, 4382, 5037, 5319, 5448, 5621, 5839, 6137, 6183, 6521, 7373, 9867
Offset: 1

Views

Author

Zak Seidov, Jun 22 2015

Keywords

Comments

Or numbers n such that A157480(n) > A000040(n).
It is a strong conjecture that the sequence is complete, and the last term is a(99)=9867.

Crossrefs

A259232 Smallest prime q > p such that q + p is a square, where p is the n-th prime.

Original entry on oeis.org

7, 13, 11, 29, 53, 23, 19, 557, 41, 71, 113, 107, 59, 101, 53, 271, 137, 83, 257, 73, 251, 821, 113, 107, 227, 223, 797, 149, 467, 211, 197, 193, 263, 761, 251, 173, 167, 1601, 233, 227, 397, 719, 293, 383, 379, 701, 1553, 353, 257, 347, 251, 337, 659, 773, 419, 313, 307, 1493, 1019, 503, 293
Offset: 1

Views

Author

Zak Seidov, Jun 22 2015

Keywords

Comments

Corresponding squares a(n)+prime(n): 9,16,16,36,64,36,36,576,64,100.
Also, a(n) >= A157480(n).

Crossrefs

Programs

  • Mathematica
    Table[p=Prime[n];x=1+Floor[Sqrt[2*p]];While[!PrimeQ[q=x^2-p],x++];q,{n,100}]
  • PARI
    a(n)=p = prime(n); k = nextprime(p+1); while(!issquare(p+k), k = nextprime(k+1)); k; \\ Michel Marcus, Jun 22 2015
    
  • PARI
    a(n,p=prime(n))=my(s=sqrtint(2*p)); while(!isprime(s++^2-p),); s^2-p \\ Charles R Greathouse IV, May 06 2016

A259237 a(n) = least prime q such that q + prime(n) is a cube.

Original entry on oeis.org

727, 5, 3, 1721, 53, 499, 47, 197, 41, 971, 1697, 179, 23, 173, 17, 11, 5, 3, 149, 929, 439, 137, 4013, 127, 2647, 1627, 113, 109, 107, 103, 89, 1597, 79, 373, 67, 2593, 59, 53, 3929, 43, 37, 331, 809, 23, 19, 17, 5, 2521, 773, 283, 3863, 761, 271, 5581, 743, 3833
Offset: 1

Views

Author

Zak Seidov, Jun 22 2015

Keywords

Comments

Corresponding values of (a(n)+prime(n))^(1/3): 9,2,2,12,4,8,4,6,4,10,12,6,4,6,4,4,4,4,6,10,8,6,16,6,14,12,6,6,6,6,6.

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,k;
      p:= ithprime(n);
      for k from ceil(p^(1/3)) do
        if isprime(k^3 - p) then return k^3 - p fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 17 2023
  • Mathematica
    Table[p=Prime[n];x=Ceiling[p^(1/3)];While[!PrimeQ[q=x^3-p],x++];q,{n,100}]
  • PARI
    a(n) = {p = prime(n); k=2; while(!ispower(p+k,3), k = nextprime(k+1)); k;} \\ Michel Marcus, Jun 22 2015
Showing 1-4 of 4 results.