login
A069020
a(1) = 1; a(n) = smallest number of the form k*a(n-1) +1 divisible by n^2.
0
1, 4, 9, 64, 1025, 19476, 331093, 993280, 73502721, 1396551700, 64241378201, 6616861954704, 853575192156817, 16217928650979524, 1232562577474443825, 57930441141298859776, 3475826468477931586561, 79944008774992426490904, 10072945105649045737853905
OFFSET
1,2
COMMENTS
Terms from Robert G. Wilson v.
There is no solution to k * 10072945105649045737853905 == -1 (mod 20^2) hence the sequence is finite. - Sean A. Irvine, Mar 28 2024
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Block[{k = 1}, While[ !IntegerQ[(k*a[n - 1] + 1)/n^2], k++ ]; Return[k*a[n - 1] + 1]]; Table[a[n], {n, 1, 19}] (* Robert G. Wilson v *)
nxt[{n_, a_}]:=Module[{n2=(n+1)^2, k=1}, While[!Divisible[k*a+1, n2], k++]; {n+1, k*a+1}]; NestList[nxt, {1, 1}, 17][[All, 2]] (* Harvey P. Dale, Nov 10 2022 *)
CROSSREFS
Sequence in context: A055859 A162991 A062926 * A220189 A122956 A041777
KEYWORD
nonn,fini,full
AUTHOR
Amarnath Murthy, Apr 02 2002
EXTENSIONS
Offset corrected and sequence completed by Sean A. Irvine, Mar 28 2024
STATUS
approved