A366066 a(n) is the largest positive integer k such that n can be expressed as the sum of k distinct positive integers that are coprime to each other.
0, 1, 1, 2, 2, 2, 3, 2, 3, 3, 3, 4, 3, 4, 3, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9
Offset: 0
Examples
For n = 11, 1+2+3+5=11; so a(11) = 4. For n = 12, 1+4+7=12; so a(12) = 3.
Links
- Yifan Xie, Table of n, a(n) for n = 0..9999
Programs
-
PARI
lista(nn) = v=[0]; f=[7, 12, 14, 19, 21, 23, 30, 32, 34, 43, 45, 47, 60, 62, 79]; for(n=1, nn, for(i=1, prime(n), v=concat(v, n))); for(n=1, 15, v[f[n]+1]=v[f[n]+1]-1); v;
Comments