A212652 a(n) is the least positive integer M such that n = T(M) - T(k), for k an integer, 0 <= k <= M, where T(r) = A000217(r) is the r-th triangular number.
1, 2, 2, 4, 3, 3, 4, 8, 4, 4, 6, 5, 7, 5, 5, 16, 9, 6, 10, 6, 6, 7, 12, 9, 7, 8, 7, 7, 15, 8, 16, 32, 8, 10, 8, 8, 19, 11, 9, 10, 21, 9, 22, 9, 9, 13, 24, 17, 10, 12, 11, 10, 27, 10, 10, 11, 12, 16, 30, 11, 31, 17, 11, 64, 11, 11, 34
Offset: 1
Keywords
Examples
For n = 63, we have D(63) = {1,3,7,9,21,63}, B_63 = {11,12,13,22,32,63} and a(63) = min(11,12,13,22,32,63) = 11. Since A109814(63) = 9, T(11) - T(11-9) = T(11) - T(2) = 66 - 3 = 63.
Links
- David W. Wilson, Table of n, a(n) for n = 1..10000
- Max Alekseyev, is this sequence interesting?, Sequence Fans Mailing List, Mar 31 2008.
Programs
-
Maple
f:= n -> min(map(t -> n/t + (t-1)/2, numtheory:-divisors(n/2^padic:-ordp(n,2)))): map(f, [$1..100]); # Robert Israel, Jan 14 2016
-
Mathematica
Table[Min[n/# + (# - 1)/2 &@ Select[Divisors@ n, OddQ]], {n, 67}] (* Michael De Vlieger, Dec 11 2015 *)
-
PARI
{ A212652(n) = my(m); m=2*n+1; fordiv(n/2^valuation(n,2), d, m=min(m,d+(2*n)\d)); (m-1)\2; } \\ Max Alekseyev, Mar 31 2008
Formula
Extensions
Reference to Max Alekseyev's 2008 proposal of this sequence added by N. J. A. Sloane, Nov 01 2014
Comments