

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

David A. Corneth, Table of n, a(n) for n = 1..10000


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

Cf. A000292, A011772, A002034, A047930, A005179, A070982, A038700, A344005, A345989.
Sequence in context: A011048 A307671 A011401 * A078202 A183335 A196329
Adjacent sequences: A265644 A265645 A265646 * A265648 A265649 A265650


KEYWORD

nonn


AUTHOR

Ctibor O. Zizka, Dec 11 2015


EXTENSIONS

More terms from Michael De Vlieger, Dec 11 2015


STATUS

approved



