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.

A106033 a(n) is the least number k such that n*prime(n)+k is a perfect square.

Original entry on oeis.org

2, 3, 1, 8, 9, 3, 2, 17, 18, 34, 20, 40, 43, 23, 24, 52, 21, 58, 23, 24, 67, 26, 27, 73, 75, 78, 28, 29, 88, 91, 32, 33, 103, 35, 114, 40, 120, 47, 48, 136, 57, 142, 68, 157, 160, 62, 83, 112, 113, 214, 217, 116, 223, 135, 26, 156, 43, 158, 41, 40, 161, 59, 259, 260, 104, 103
Offset: 1

Views

Author

Zak Seidov, May 05 2005

Keywords

Examples

			a(10)=34 because 10*prime(10)+34 = 10*29+34 = 324 = 18^2.
		

Crossrefs

Cf. A033286 (n*prime(n)), A080883 (distance of n to next square).

Programs

  • Mathematica
    a[n_]:=(Floor[Sqrt[n*Prime[n]]]+1)^2-n*Prime[n]
    lnk[n_]:=With[{c=n Prime[n]},(Floor[Sqrt[c]]+1)^2-c]; Array[lnk,70] (* Harvey P. Dale, Feb 17 2024 *)

Formula

a(n) = (floor(sqrt(n*prime(n)))+1)^2 - n*prime(n).
a(n) = A080883(A033286(n)). - Michel Marcus, Mar 29 2020