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.

User: Luis Rato

Luis Rato's wiki page.

Luis Rato has authored 4 sequences.

A381490 Index of second half of decomposition of integers into pairs x(i)+y(j) based on A380008 and A380009, respectively.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 4, 5, 4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 7, 6, 7, 4, 5, 4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 7, 6, 7, 8, 9, 8, 9, 8, 9, 8, 9, 10, 11, 10, 11, 10, 11, 10, 11, 8, 9, 8, 9, 8, 9, 8, 9
Offset: 0

Author

Luis Rato, Feb 25 2025

Keywords

Comments

One coordinate of a recursive non-self-intersecting walk on the square lattice Z^2.
Every integer appears infinitely many times in the sequence.

Examples

			A380008( A381489(14)) + A380009(a(14)) = A380008(3) + A380009(2) = 6+8 = 14
		

Crossrefs

Cf. A380008 (indices of 0's), A380009.

Formula

n = A380008(A381489(n)) + A380009(a(n))

A381489 Index of first half of decomposition of integers into pairs x(i)+y(j) based on A380008 and A380009, respectively.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 4, 4, 5, 5, 6, 6, 7, 7, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 4, 4, 5, 5, 6, 6, 7, 7, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 4, 4, 5, 5, 6, 6, 7, 7
Offset: 0

Author

Luis Rato, Feb 25 2025

Keywords

Comments

One coordinate of a recursive non-self-intersecting walk on the square lattice Z^2.
Every integer appears infinitely many times in the sequence.

Examples

			A380008(a(14)) + A380009(A381490(14)) = A380008(3) + A380009(2) = 6+8 = 14.
		

Crossrefs

Formula

n = A380008(a(n)) + A380009(A381490(n)).

A380008 Numbers t whose binary expansion Sum 2^e_i has exponents e_i which are odious numbers (A000069).

Original entry on oeis.org

0, 2, 4, 6, 16, 18, 20, 22, 128, 130, 132, 134, 144, 146, 148, 150, 256, 258, 260, 262, 272, 274, 276, 278, 384, 386, 388, 390, 400, 402, 404, 406, 2048, 2050, 2052, 2054, 2064, 2066, 2068, 2070, 2176, 2178, 2180, 2182, 2192, 2194, 2196, 2198, 2304, 2306, 2308, 2310, 2320, 2322, 2324, 2326, 2432, 2434, 2436, 2438, 2448, 2450, 2452, 2454
Offset: 0

Author

Luis Rato, Jan 08 2025

Keywords

Comments

These t in binary representation have 1s only in positions with 0s in the Thue-Morse sequence (A010059) with beginning of that sequence corresponding to least significant bit. a(n) can be derived from n by placing the bits of n into a(n) at those permitted positions.
a(n) can be represented in base 4 equal to binary representation of n with each digit multiplied by 1 or 2 according to the 1-2 Thue-Morse sequence A001285 starting in the least significant digit and transforming 1->2, and 2->1.
Any pair 2*p and 2*p+1 has one evil and the other odious number, so the bit at position p in n goes to either 2*p or 2*p+1 in a(n), according as which of those is odious.
Every integer k>=0 corresponds to a unique pair i,j with k = x(i) + y(j), with x(i)=a(i) and y(j)=A380009(j).
Sequences x(n) and y(n) have same growth rate and cross an infinite number of times.
Coordinate pairs (i,j), define a Morton space-filling curve, similar to Z-order curve.

Examples

			Considering the representation in base 4,
For n=11 = 1011_binary, a(11) -> 1021_base4 -> 2012_base4 = 134.
For n=12 = 1100_binary, a(12) -> 1200_base4 -> 2100_base4 = 144.
Considering all numbers are decomposed in binary, with exponents belonging to odious numbers: 1, 2, 4, 7,...
The sequence of terms together with their binary representation begins:
 n    a(n)      a(n)_bin
 0     0:         0 ~               0
 1     2:        10 ~             2^1
 2     4:       100 ~         2^2
 3     6:       110 ~         2^2+2^1
 4    16:     10000 ~     2^4
 5    18:     10010 ~     2^4   +2^1
 6    20:     10100 ~     2^4+2^2
 7    22:     10110 ~     2^4+2^2+2^1
 8   128:  10000000 ~ 2^7
 9   130:  10000010 ~ 2^7        +2^1
10   132:  10000100 ~ 2^7    +2^2
11   134:  10000110 ~ 2^7    +2^2+2^1
12   144:  10010000 ~ 2^7+2^4
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v = 0, e); while (n, n -= 2^e = exponent(n); v += 2^(2*e + if (hammingweight(e)%2, 0, 1));); return (v); } \\ Rémy Sigrist, Feb 02 2025
    
  • PARI
    isok(t) = my(b=Vecrev(binary(t))); for (i=1, #b, if (b[i] && !(hammingweight(i-1)%2), return(0))); return(1); \\ Michel Marcus, Feb 10 2025

A380009 Numbers t whose binary expansion Sum 2^e_i has exponents e_i which are evil numbers (A001969).

Original entry on oeis.org

0, 1, 8, 9, 32, 33, 40, 41, 64, 65, 72, 73, 96, 97, 104, 105, 512, 513, 520, 521, 544, 545, 552, 553, 576, 577, 584, 585, 608, 609, 616, 617, 1024, 1025, 1032, 1033, 1056, 1057, 1064, 1065, 1088, 1089, 1096, 1097, 1120, 1121, 1128, 1129, 1536, 1537, 1544, 1545, 1568, 1569, 1576, 1577, 1600, 1601, 1608, 1609, 1632, 1633, 1640, 1641
Offset: 0

Author

Luis Rato, Jan 09 2025

Keywords

Comments

These t in binary representation have 1s only in positions with 0s in the Thue-Morse sequence (A010059) with beginning of that sequence corresponding to least significant bit. a(n) can be derived from n by placing the bits of n into a(n) at those permitted positions.
a(n) can be represented in base 4 equal to binary representation of n with each digit multiplied by 1 or 2 according to the 1-2 Thue-Morse sequence A001285 starting in the least significant digit.
Any pair 2*p and 2*p+1 has one evil and the other odious, so the bit at position p in n goes to either 2*p or 2*p+1 in a(n), according as which of those is evil.
Every integer k>=0 corresponds to a unique pair i,j with k = x(i) + y(j), with x(i)=a(i) and y(j)=A380008(j).
Sequences x(n) and y(n) have same growth rate and cross an infinite number of times.
Coordinate pairs (i,j), define a Morton space-filling curve, similar to Z-order curve.

Examples

			For n=11 = 1011_binary, a(11) = 1021_base4 = 41.
All numbers are also decomposed in binary, with exponents belonging to evil numbers: 0, 3, 5, 6, ...
The sequence of terms begins:
 n    a(n)      a(n)_bin
 0     0:         0 ~               0
 1     1:         1 ~             2^0
 2     8:      1000 ~         2^3
 3     9:      1001 ~         2^3+2^0
 4    32:    100000 ~     2^5
 5    33:    100001 ~     2^5    +2^0
 6    40:    101000 ~     2^5+2^3
 7    41:    101001 ~     2^5+2^3+2^0
 8    64:   1000000 ~ 2^6
 9    65:   1000001 ~ 2^6        +2^0
10    72:   1001000 ~ 2^6    +2^3
11    73:   1001001 ~ 2^6    +2^3+2^0
		

Crossrefs

Programs

  • PARI
    isok(k) = my(b=binary(k), v=apply(x->#b-x, Vec(select(x->x, b, 1)))); #v == #select(x->(hammingweight(x)%2==0), v); \\ Michel Marcus, Jan 11 2025