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!)
A076948 Smallest k such that nk-1 is a square, or 0 if no such number exists. 3
1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10, 13, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,13

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

FORMULA

a(n) != 0 if and only if n is a term of A008784. - Joerg Arndt, Apr 27 2020

a(n) = 1 if and only if n is a term of A002522. - Bernard Schott, Apr 27 2020

MATHEMATICA

a[n_] := Module[{r, j, k}, r = Solve[j>0 && k>0 && n k - 1 == j^2, {j, k}, Integers]; If[r === {}, Return[0], Return[k /. (r /. C[1] -> 0) // Min]]]; a[1] = 1;

Array[a, 100] (* Jean-François Alcover, Apr 27 2020 *)

PROG

(Haskell)

a076948 1 = 1

a076948 n = if null qs then 0 else head qs

            where qs = filter ((> 0) . a037213 . subtract 1 . (* n)) [1..n]

-- Reinhard Zumkeller, Oct 25 2015

(PARI) a(n) = if (!issquare(Mod(-1, n)), 0, my(k=1); while (!issquare(n*k-1), k++); k); \\ Michel Marcus, Apr 27 2020

CROSSREFS

Cf. A008784.

Cf. A037213.

Sequence in context: A062977 A072325 A294929 * A255309 A335446 A335460

Adjacent sequences:  A076945 A076946 A076947 * A076949 A076950 A076951

KEYWORD

nonn

AUTHOR

Amarnath Murthy, Oct 20 2002

EXTENSIONS

Edited and extended by Robert G. Wilson v, Oct 21 2002

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 September 22 17:16 EDT 2020. Contains 337291 sequences. (Running on oeis4.)