Could someone in this group please help me correct the errors and ambiguities in the definition of this sequence?
1, 2, 1, 3, 10, 1, 4, 2, 20, 1, 5, 100, 10, 110, 1, 6, 11, 201, 20, 23, 1, 7, . . .
Square matrix T(n, k) read by antidiagonals of the s(n) = sums of the powers of ten in the binary expansion of the positive integers n such that: T(n, 1) = n and T(n, k+1) = s(T(n, k))
….1….2….3….4….5….6….7….8…9……10….11….12….
1……1 1 1 1 1 1 1 1 1 1 1 1 . . .
2….2 10 20 110 23 13 12 101 112 10002 1212 . . .
3…..3 2 10 20 110 23 13 12 101 112 10002 1212 . . .
4…..4 100 201 202 121 . . .
5….5 11 12 101 112 . . .
6….6 11 12 101 112 . . .
. . . . .
. . . . .
. . . . .
Examples:
--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/315c6271-1668-423a-b2b3-fac5586ff250n%40googlegroups.com.
It's unclear what you mean by " integerS n such that..."in the definition of T(n,k) the n is given. (I suspect you did not mean "integers n" in plural, but I'm not sure and although it might seem like nitpicking about a negligible typo, that "detail" completely changes the meaning.)
To simplify the guesswork for your readers, you should give the examples step by step, like :for n=3, we have the binary expansion ... so s(n) = ... and therefore T(n,k=1) =..., T(n,k=2) =..., etc
- Maximilian
On Thu, Apr 16, 2026, 09:42 Ramon Ortega <tumblr3...@gmail.com> wrote:
Could someone in this group please help me correct the errors and ambiguities in the definition of this sequence? 1, 2, 1, 3, 10, 1, 4, 2, 20, 1, 5, 100, 10, 110, 1, 6, 11, 201, 20, 23, 1, 7, . . . Square matrix T(n, k) read by antidiagonals of the s(n) = sums of the powers of ten in the binary expansion of the positive integers n such that: T(n, 1) = n and T(n, k+1) = s(T(n, k))
….1….2….3….4….5….6….7….8…9……10….11….12….
1……1 1 1 1 1 1 1 1 1 1 1 1 . . . 2….2 10 20 110 23 13 12 101 112 10002 1212 . . .
3…..3 2 10 20 110 23 13 12 101 112 10002 1212 . . .
4…..4 100 201 202 121 . . .
5….5 11 12 101 112 . . .
6….6 11 12 101 112 . . . . . . . . . . . . . . . . . .
Examples:
T(3, 11) = s(T(3, 10)) = s(112) = 1+1+10000 = 10002 T(3, 12) = s(T(3, 11)) = s(10002) = 100+1+1+1000+100+10 = 1212 --
After a bit of staring at this, I think I know what it means.
To calculate s(n), first write down n's binary representation; e.g., 10002 = 10011100010010_2.
Then split it up before each 1 to obtain a sequence of chunks of the form 1(0*). So 10002 gives 100 1 1 1000 100 10.
Now treat each of those chunks as a _decimal_ number, and add them up. 100+1+1+1000+100+10 = 1212.
This is s(n).
Now construct a 2d array that has 1,2,3,... down the left side and each row of which is constructed by iteratively applying s; that is, the (row i, column j) entry is s^(j-1)(i).
Finally, read this off by antidiagonals to get the sequence.
For a one-sentence definition suitable for the title of an OEIS entry (though I'm not convinced this is interesting enough to deserve one -- but I am generally super-skeptical of such base-10-specific things, and others may have different tastes), maybe something like this.
"Array T(n,k) read by antidiagonals, where T(n,k) is obtained from n by (k-1) iterations of writing in binary, splitting before each 1, interpreting pieces as base-10 numbers, and adding."
--
g
Could someone in this group please help me correct the errors and ambiguities in the definition of this sequence?
1, 2, 1, 3, 10, 1, 4, 2, 20, 1, 5, 100, 10, 110, 1, 6, 11, 201, 20, 23, 1, 7, . . .
Square matrix T(n, k) read by its antidiagonals such that: T(n, 1) = n and T(n, k+1) = s(T(n, k)), where s(n) = sum of the powers of ten in the binary expansion of the positive integers n
Examples:
An integer n>=1 in binary can be understood as a single concatenation of powers of ten = {1, 10, 100, 1000, ...10^k}
112 = 1110000₂ = [1] [1] [10000], that is, there is only this way to write 112 in base two as a concatenation of powers of ten. Therefore,
s(1) = 1₂ = 1
s(2) = 10₂= 10
s(3) = 11₂= 1+1 = 2
s(4) = 100₂ = 100
s(5) = 101₂= 10+1 = 11
s(6) = 110₂= 1+10 = 11
s(7) = 111₂= 1+1+1 = 3
s(8) = 1000₂= 1000
s(9) = 1001₂ = 100+1 = 101
s(10) = 1010₂= 10+10 = 20
.
.
s(112) = 1110000₂ = 1+1+10000 = 10002
etc.
T(3, 11) = s(T(3, 10)) = s(112) = 1+1+10000 = 10002
T(3, 12) = s(T(3, 11)) = s(10002) = 100+1+1+1000+100+10 = 1212
T(4, 5) = s(T(4, 4)) = s(202) = 11001010₂ = 1+100+10+10 = 121
etc.
….1….2….3….4…..5…..6…..7….8……9…….10……11……12……
1……1 1 1 1 1 1 1 1 1 1 1 1 . . ….
2….2 10 20 110 23 13 12 101 112 10002 1212 . . . . . . . ……..
3…..3 2 10 20 110 23 13 12 101 112 10002 1212 . . .
4…..4 100 201 202 121 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5….5 11 12 101 112 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6….6 11 12 101 112 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
To view this discussion visit https://groups.google.com/d/msgid/seqfan/c781c806-d225-4a94-8e75-b325b947d329n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/7cf55939-46fa-4c32-a9c4-642ad0e39dcan%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/CACbCbQrPSeT8myu7Oqcpvc9iMiW8s%2BjYgMYib_jcRTGasQvseQ%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/CADy-sGF5rrHeVcP5475kHD2-MAvcrqKszpRQcwAN7UNvoPXgPw%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/65aa6d43-eb89-408e-92dc-a603285639dbn%40googlegroups.com.
# Dynamics of Ramon Ortega's s function s(n) = the sum of substrings
# of the binary representation of n, of the form 10*, interpreted in
# decimal.
def ortega_cycle_start(k):
seen = []
while True:
if k in seen:
return k
seen.append(k)
k = ortega_s(k)
def ortega_s(k):
sum = 0
while k > 0:
k, bottom = bottom_chunk(k)
sum += bottom
return sum
def bottom_chunk(k):
n = 0
while k % 2 == 0:
k //= 2
n += 1
return (k - 1) // 2, 10**n
def ortega_scan(lo, hi):
seen = []
for x in range(lo,hi):
s = ortega_cycle_start(x)
if s in seen:
continue
seen.append(s)
return seen
To view this discussion visit https://groups.google.com/d/msgid/seqfan/CADy-sGFkA0a3%3DpFqvjh1rS12QsfrVWata1o_3viSRrT2ONXNqg%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/CAFz66PNUuV26GW8jADOju2-_f8gOo48hKXo5xhJT48CdAd-9nw%40mail.gmail.com.