cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A384544 Numbers k such that A383327(k) = 1.

Original entry on oeis.org

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

Views

Author

Miles Englezou, Jun 02 2025

Keywords

Comments

Numbers k such that there is only one m such that Sum_{i=1..t} m mod 2^i for 2^t <= m < 2^(t+1) is equal to k (see A049802). Every m = 2^k+1 (see A383327).
All terms are odd since for every even r there are at least two numbers u, v where the congruences sum to r (for u = 2^r+1 and v = 2^(r/2+1)+2).

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.
		

Crossrefs

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))