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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265647 Smallest k such that n divides k*(k+1)*(k+2)/6. 4
1, 2, 7, 2, 3, 7, 5, 6, 25, 3, 9, 7, 11, 6, 8, 14, 15, 26, 17, 4, 7, 10, 21, 8, 23, 11, 79, 6, 27, 8, 29, 30, 9, 15, 5, 26, 35, 18, 25, 8, 39, 7, 41, 10, 25, 22, 45, 16, 47, 23, 16, 12, 51, 79, 9, 6, 17, 27, 57, 8, 59, 30, 26, 62, 13, 43, 65, 15, 44, 14, 69, 54, 71, 35, 25, 18, 20, 26, 77, 14, 241 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
More generally we can ask for the smallest k such that gcd(n,f(k)) = n. This sequence has f(k) = k*(k+1)*(k+2)/6. For other examples in the OEIS, see the crossrefencess.
LINKS
MATHEMATICA
Table[k = 1; While[! Divisible[k (k + 1) (k + 2)/6, n], k++]; k, {n, 81}] (* Michael De Vlieger, Dec 11 2015 *)
PROG
(PARI) a(n)=my(k=1); while((k*(k+1)*(k+2)/6)%n>0, k++); k \\ Anders Hellström, Dec 11 2015
(PARI) first(n) = { my(todo = n, i = 1, res = vector(n)); while(todo > 0, d = select(x -> x <= n, divisors(binomial(i + 2, 3))); for(j = 1, #d, if(res[d[j]] == 0, res[d[j]] = i; todo-- ) ); i++ ); res } \\ David A. Corneth, Mar 22 2021
CROSSREFS
Sequence in context: A011048 A307671 A011401 * A078202 A183335 A196329
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Dec 11 2015
EXTENSIONS
More terms from Michael De Vlieger, Dec 11 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 19 16:38 EDT 2024. Contains 371794 sequences. (Running on oeis4.)