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.

A247278 Least integer k > 0 such that k*n - prime(k) is a square.

Original entry on oeis.org

1, 1, 4, 29, 1, 3, 4, 43, 3, 1, 5, 37, 2, 5, 9, 19, 1, 267, 22, 23, 4, 3, 43, 57, 2, 1, 46, 19, 20, 5, 4, 23, 440, 3, 5, 162, 1, 7, 20, 499, 2, 74, 4, 128, 29, 9, 927, 215, 156, 1, 96, 91, 7, 1058, 73, 162, 3, 763, 5
Offset: 2

Views

Author

Zhi-Wei Sun, Sep 27 2014

Keywords

Comments

Conjecture: a(n) exists for any n > 1.
Note that k*n - prime(k) < 0 if k > e^(n + 1).

Examples

			a(5) = 29 since 29 * 5 - prime(29) = 145 - 109 = 6^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_] := IntegerQ[Sqrt[n]]
    Do[k = 1; Label[aa]; If[SQ[k * n - Prime[k]], Print[n, " ", k]; Goto[bb]]; k = k + 1; Goto[aa]; Label[bb]; Continue,{n, 2, 60}]

Formula

a(A059100(n)) = 1. - Michel Marcus, Sep 28 2014

A247893 Least integer k > 0 such that prime(k) - k*n is a square.

Original entry on oeis.org

1, 1, 12, 35, 75, 181, 490, 1061, 2707, 6459, 15932, 40127, 100362, 251711, 637236, 1617181, 4124444, 10553419, 27066987, 69709706, 179992917, 465769804, 1208198534, 3140421726, 8179002096, 21338685437, 55762149044, 145935689364, 382465573484, 1003652347334
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 27 2014

Keywords

Comments

Conjecture: a(n) exists for any n > 0.
See also A247278 for a related conjecture.

Examples

			a(3) = 12 with prime(12) - 12*3 = 37 - 36 = 1^2.
a(21) = 179992917 with prime(179992917) - 179992917*21 = 3779851261 - 179992917*21 = 2^2.
a(22) = 465769804 with prime(465769804) - 465769804*22 = 10246935737 - 465769804*22 = 7^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[k=1;Label[aa];If[SQ[Prime[k]-k*n],Print[n," ",k];Goto[bb]];k=k+1;Goto[aa];Label[bb];Continue,{n,1,18}]
    lik[n_]:=Module[{k=1},While[!IntegerQ[Sqrt[Prime[k]-k*n]],k++];k]; Array[lik,20] (* Harvey P. Dale, May 11 2019 *)

Extensions

a(21)-a(22) from Zhi-Wei Sun, Apr 21 2020
Terms a(23) and beyond from Giovanni Resta, Apr 22 2020
Showing 1-2 of 2 results.