login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A092487 a(n) = least k such that {n+1, n+2, n+3, ... n+k} has a subset the product of whose members with n is a square. 5
0, 4, 5, 0, 5, 6, 7, 7, 0, 8, 11, 8, 13, 7, 9, 0, 17, 9, 19, 10, 7, 11, 23, 8, 0, 13, 8, 12, 29, 12, 31, 13, 11, 17, 13, 0, 37, 19, 13, 10, 41, 14, 43, 11, 15, 23, 47, 6, 0, 13, 17, 13, 53, 16, 11, 16, 19, 29, 59, 15, 61, 31, 14, 0, 13, 14, 67, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

For n>1, n + a(n) is composite and n + a(n) is square if and only if n is square. - David A. Corneth, Oct 22 2016

REFERENCES

R. K. Guy, Unsolved Problems in Number Theory, B30.

LINKS

Peter Kagey, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A006255(n) - n. - Peter Kagey, Oct 22 2016

a(n^2) = 0, a(p) = p for prime p > 3. - David A. Corneth, Oct 22 2016

EXAMPLE

a(48)=6 because 48*(48+2)*(48+6) is a square, but you can't square 48 with numbers from (48+1) to (48+5).

MATHEMATICA

Table[k = 0; Which[IntegerQ@ Sqrt@ n, k, And[PrimeQ@ n, n > 3], k = n, True, While[Length@ Select[n Map[Times @@ # &, n + Rest@ Subsets@ Range@ k], IntegerQ@ Sqrt@ # &] == 0, k++]]; k, {n, 40}] (* Michael De Vlieger, Oct 26 2016 *)

PROG

(PARI) a(n) = {if(issquare(n), return(0)); if(isprime(n), if(n>3, return(n), return(n+2) )); my(l = List([n, n+1]), m=2); while(1, for(i=1, #l-2, forvec(v = vector(i, j, [2, #l-1]), if(issquare(l[1] * l[#l] * prod(k=1, #v, l[v[k]])), return(l[#l] - n)), 2)); listput(l, n+m); m++)} \\ David A. Corneth, Oct 22 2016

CROSSREFS

Cf. A006255, A092488.

Sequence in context: A186930 A159567 A164357 * A322505 A192041 A132022

Adjacent sequences:  A092484 A092485 A092486 * A092488 A092489 A092490

KEYWORD

nonn,easy

AUTHOR

Don Reble, Apr 03 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 24 07:18 EST 2020. Contains 331189 sequences. (Running on oeis4.)