A384544 Numbers k such that A383327(k) = 1.
1, 3, 5, 9, 15, 23, 35, 63, 65, 69, 113, 125, 141, 149, 173, 209, 231, 275, 279, 299, 321, 353, 365, 383, 419, 465, 509, 519, 555, 575, 603, 653, 695, 749, 765, 875, 945, 951, 959, 983
Offset: 1
Examples
3 is a term since 2^3+1 = 9 is the only number such that the congruences sum to 3. 15 is a term since 2^15+1 = 32769 is the only number such that the congruences sum to 15. 63 is a term since 2^63+1 = 9223372036854775809 is the only number such that the congruences sum to 63.
Programs
-
PARI
isok(n) = (count(n) = local(tuple_sum, section, expansion, T=[], breakout, S, K); (tuple_sum(m) = sum(k=1, logint(m, 2), m % 2^k)); (section(r) = my(S=[]); for(n=1, 2^(r+1), if(logint(n, 2)==r, S=concat(S, n))); return(S[#S/2+1..#S])); (expansion(a, l) = my(k=a, K=[]); K=concat(K, a); for(n=1, l-1, K=concat(K, k+2^(logint(a, 2)-1+n)); k=k+2^(logint(a, 2)-1+n)); return(K)); for(k=1, n, for(i=1, #section(k), breakout=0; if(tuple_sum(section(k)[1]) > n, breakout=1); K=expansion(section(k)[i], n); for(j=1, #K, if(tuple_sum(K[j]) > n, break, if(tuple_sum(K[j])==n, T=concat(T, K[j]); break)))); if(breakout==1, break)); return(#T)); if(count(n)==1, return(1), return(0))
Comments