login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A336326
a(n) is the least k > 0 such that A000217(k) is divisible by n+k, except a(2) = 0.
1
1, 2, 0, 3, 8, 15, 4, 7, 48, 15, 5, 11, 21, 26, 12, 6, 32, 255, 16, 19, 56, 7, 11, 23, 45, 15, 24, 12, 8, 87, 28, 31, 960, 63, 17, 35, 9, 74, 36, 18, 25, 164, 40, 43, 128, 10, 23, 47, 93, 63, 20, 24, 16, 159, 52, 11, 21, 76, 29, 59, 117, 122, 60, 30, 128, 255, 12, 67
OFFSET
0,2
COMMENTS
a(2) = 0 as there is no k > 0 such that A000217(k) is divisible by k+2 (Proof: Suppose a(2) = k > 0. Then z = (k*(k+1)/2)/(k+2) is an integer. Notice that z = (k*(k+1)/2)/(k+2) = (k-1)/2 + 1/(k+2). Let (k-1)/2 = m, 1/(k+2) = t. Since k-1 is an integer, either m or m + 1/2 is also an integer. Since z = m+t and z is an integer, either t or t + 1/2 is an integer. However, for any k > 0, we have t < 1/2 and t > 0, so neither t nor t + 1/2 is an integer, which is a contradiction. Hence, there is no k > 0 such that a(2) = k).
LINKS
FORMULA
a(n) = Min_{k>0} (1/2) * (k-n+1+n*(n-1)/(k+n)) is an integer.
EXAMPLE
a(9) = 15, because A000217(15) (i.e., the 15th triangular number: 120) is divisible by 15+9 (indeed, 120/(15+9) = 120/24 = 5) and there is no other k > 0 and < 15 such that A000217(k) is divisible by k+9.
MATHEMATICA
a[2] = 0; a[n_] := Module[{k = 1}, While[!Divisible[k*(k + 1)/2, n + k], k++]; k]; Array[a, 68, 0] (* Amiram Eldar, Aug 08 2020 *)
PROG
(PARI) a(n) = {if (n!=2, my(k=1); while(k*(k+1)/2 % (n+k), k++); k); } \\ Michel Marcus, Jul 18 2020
CROSSREFS
Cf. A000217.
Sequence in context: A094346 A074104 A071411 * A255384 A236396 A251592
KEYWORD
nonn
AUTHOR
Maciej Skrzypczak, Jul 17 2020
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 24 09:27 EDT 2024. Contains 376189 sequences. (Running on oeis4.)