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.

Showing 1-8 of 8 results.

A264977 a(0) = 0, a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = a(n) XOR a(n+1).

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 6, 7, 8, 5, 2, 7, 12, 1, 14, 15, 16, 13, 10, 7, 4, 5, 14, 11, 24, 13, 2, 15, 28, 1, 30, 31, 32, 29, 26, 7, 20, 13, 14, 3, 8, 1, 10, 11, 28, 5, 22, 19, 48, 21, 26, 15, 4, 13, 30, 19, 56, 29, 2, 31, 60, 1, 62, 63, 64, 61, 58, 7, 52, 29, 14, 19, 40, 25, 26, 3, 28, 13, 6, 11, 16, 9, 2, 11, 20, 1, 22
Offset: 0

Views

Author

Antti Karttunen, Dec 10 2015

Keywords

Comments

a(n) is the n-th Stern polynomial (cf. A260443, A125184) evaluated at X = 2 over the field GF(2).
For n >= 1, a(n) gives the index of the row where n occurs in array A277710.

Examples

			In this example, binary numbers are given zero-padded to four bits.
a(2) = 2a(1) = 2 * 1 = 2.
a(3) = a(1) XOR a(2) = 1 XOR 2 = 0001 XOR 0010 = 0011 = 3.
a(4) = 2a(2) = 2 * 2 = 4.
a(5) = a(2) XOR a(3) = 2 XOR 3 = 0010 XOR 0011 = 0001 = 1.
a(6) = 2a(3) = 2 * 3 = 6.
a(7) = a(3) XOR a(4) = 3 XOR 4 = 0011 XOR 0100 = 0111 = 7.
		

Crossrefs

Cf. A023758 (the fixed points).
Cf. also A068156, A168081, A265407.
Cf. A277700 (binary weight of terms).
Cf. A277701, A277712, A277713 (positions of 1's, 2's and 3's in this sequence).
Cf. A277711 (position of the first occurrence of each n in this sequence).
Cf. also arrays A277710, A099884.

Programs

  • Mathematica
    recurXOR[0] = 0; recurXOR[1] = 1; recurXOR[n_] := recurXOR[n] = If[EvenQ[n], 2recurXOR[n/2], BitXor[recurXOR[(n - 1)/2 + 1], recurXOR[(n - 1)/2]]]; Table[recurXOR[n], {n, 0, 100}] (* Jean-François Alcover, Oct 23 2016 *)
  • Python
    class Memoize:
        def _init_(self, func):
            self.func=func
            self.cache={}
        def _call_(self, arg):
            if arg not in self.cache:
                self.cache[arg] = self.func(arg)
            return self.cache[arg]
    @Memoize
    def a(n): return n if n<2 else 2*a(n//2) if n%2==0 else a((n - 1)//2)^a((n + 1)//2)
    print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 27 2017

Formula

a(0) = 0, a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = a(n) XOR a(n+1).
a(n) = A248663(A260443(n)).
a(n) = A048675(A277330(n)). - Antti Karttunen, Oct 27 2016
Other identities. For all n >= 0:
a(n) = n - A265397(n).
From Antti Karttunen, Oct 28 2016: (Start)
A000035(a(n)) = A000035(n). [Preserves the parity of n.]
A010873(a(n)) = A010873(n). [a(n) mod 4 = n mod 4.]
A001511(a(n)) = A001511(n) = A055396(A277330(n)). [In general, the 2-adic valuation of n is preserved.]
A010060(a(n)) = A011655(n).
a(n) <= n.
For n >= 2, a((2^n)+1) = (2^n) - 3.
The following two identities are so far unproved:
For n >= 2, a(3*A000225(n)) = a(A068156(n)) = 5.
For n >= 2, a(A068156(n)-2) = A062709(n) = 2^n + 3.
(End)

A277710 Square array A(r,c), where each row r lists all numbers k for which A264977(k) = r, read by downwards antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

1, 5, 2, 13, 10, 3, 29, 26, 39, 4, 41, 58, 75, 20, 9, 61, 82, 147, 52, 21, 6, 85, 122, 207, 116, 45, 78, 7, 125, 170, 291, 164, 93, 150, 11, 8, 173, 250, 411, 244, 189, 294, 19, 40, 81, 209, 346, 579, 340, 381, 414, 35, 104, 105, 18, 253, 418, 819, 500, 657, 582, 67, 232, 165, 42, 23, 281, 506, 927, 692, 765, 822, 131, 328, 213, 90, 43, 12
Offset: 1

Views

Author

Antti Karttunen, Oct 29 2016

Keywords

Comments

Alternative description: Each row r lists the positions of A019565(r) in A277330.
Odd terms occur only on rows with odd index, and even terms only on rows with even index. Specifically: all terms k on row r are equal to r modulo 4, thus the first differences of each row are all multiples of 4.
All the terms on any particular row are either all multiples of two (or respectively: three, or six), or none of them are.

Examples

			The top left 12 x 12 corner of the array:
   1,   5,  13,  29,  41,   61,   85,  125,  173,  209,  253,  281
   2,  10,  26,  58,  82,  122,  170,  250,  346,  418,  506,  562
   3,  39,  75, 147, 207,  291,  411,  579,  819,  927, 1155, 1635
   4,  20,  52, 116, 164,  244,  340,  500,  692,  836, 1012, 1124
   9,  21,  45,  93, 189,  381,  657,  765,  873, 1317, 1533, 1749
   6,  78, 150, 294, 414,  582,  822, 1158, 1638, 1854, 2310, 3270
   7,  11,  19,  35,  67,  131,  259,  311,  359,  515,  619,  655
   8,  40, 104, 232, 328,  488,  680, 1000, 1384, 1672, 2024, 2248
  81, 105, 165, 213, 333,  429,  669,  861, 1341, 1725, 2685, 2721
  18,  42,  90, 186, 378,  762, 1314, 1530, 1746, 2634, 3066, 3498
  23,  43,  79,  83, 103,  155,  163,  203,  307,  323,  403,  611
  12, 156, 300, 588, 828, 1164, 1644, 2316, 3276, 3708, 4620, 6540
		

Crossrefs

Transpose: A277709.
Column 1: A277711, sorted into ascending order: A277817.
Row 1: A277701, Row 2: A277712 (= 2*A277701), Row 3: A277713, Row 4: 4*A277701, Row 5: A277715, Row 6: 2*A277713. Row 8: 8*A277701, Row 10: 2*A277715.
Cf. A277824 (the index of the column where n is located in this array).
Cf. A019565, A264977, A277330, A277816 and permutation pair A277695 & A277696.

Formula

A(r,1) = A277711(r); for c > 1, A(r,c) = A277816(A(r,c-1)).
Other identities. For all r>=1, c>=1:
A(2*r,c) = 2*A(r,c).
A(r,c) modulo 4 = r modulo 4.

Extensions

The dispersion-style formula added by Antti Karttunen, Nov 06 2016

A277330 a(0)=1, a(1)=2, a(2n) = A003961(a(n)), a(2n+1) = lcm(a(n),a(n+1))/gcd(a(n),a(n+1)).

Original entry on oeis.org

1, 2, 3, 6, 5, 2, 15, 30, 7, 10, 3, 30, 35, 2, 105, 210, 11, 70, 21, 30, 5, 10, 105, 42, 77, 70, 3, 210, 385, 2, 1155, 2310, 13, 770, 231, 30, 55, 70, 105, 6, 7, 2, 21, 42, 385, 10, 165, 66, 143, 110, 231, 210, 5, 70, 1155, 66, 1001, 770, 3, 2310, 5005, 2, 15015, 30030, 17, 10010, 3003, 30, 715, 770, 105, 66, 91, 154, 231, 6, 385, 70, 15, 42, 11, 14, 3, 42, 55, 2
Offset: 0

Views

Author

Antti Karttunen, Oct 27 2016

Keywords

Comments

Each term is a squarefree number, A005117.

Crossrefs

Cf. A023758 (positions where coincides with A260443).
Cf. A277701, A277712, A277713 for the positions of 2's, 3's and 6's in this sequence, which are also the first three rows of array A277710.
Cf. also A255483.

Formula

a(0) = 1, a(1) = 2, a(2n) = A003961(a(n)), a(2n+1) = lcm(a(n),a(n+1))/gcd(a(n),a(n+1)).
Other identities. For all n >= 0:
a(n) = A007913(A260443(n)).
a(n) = A019565(A264977(n)), A048675(a(n)) = A264977(n).
A055396(a(n)) = A277707(A260443(n)) = A001511(n).

A277701 Positions of ones in A264977; positions of twos in A277330.

Original entry on oeis.org

1, 5, 13, 29, 41, 61, 85, 125, 173, 209, 253, 281, 313, 349, 421, 509, 565, 629, 701, 845, 929, 1021, 1133, 1261, 1405, 1693, 1861, 2045, 2269, 2525, 2665, 2813, 3121, 3313, 3389, 3725, 3905, 4093, 4541, 4841, 5053, 5209, 5257, 5333, 5629, 5993, 6245, 6629, 6781, 7453, 7813, 8189, 8537, 9085, 9593, 9685, 9905, 10109, 10421, 10517, 10669, 10921
Offset: 1

Views

Author

Antti Karttunen, Oct 27 2016

Keywords

Comments

Positions in A260443 of terms that are twice square (terms in A001105, although not all of them are present in A260443).

Crossrefs

Row 1 of A277710.
Cf. also A277712, A277713.

Formula

A277712(n) = 2*a(n) for all n >= 1.

A277713 Positions of 3's in A264977; positions of 6's in A277330.

Original entry on oeis.org

3, 39, 75, 147, 207, 291, 411, 579, 819, 927, 1155, 1635, 1851, 2307, 2487, 2583, 2919, 3267, 3699, 3903, 4611, 4971, 5163, 5835, 6531, 7395, 7803, 9219, 9939, 10323, 10839, 11667, 13059, 14787, 15603, 15999, 17895, 18435, 19875, 20295, 20643, 21675, 23331, 26115, 29571, 31203, 31995, 33327, 34383, 35787, 36867, 39747, 40587, 41283, 43347
Offset: 1

Views

Author

Antti Karttunen, Oct 28 2016

Keywords

Comments

Positions in A260443 of terms that are six times a perfect square (terms in A033581, although not all of them are present in A260443).
All terms are multiples of three.

Crossrefs

Formula

A277714(n) = a(n)/3.

A277816 a(n) = the least k > n for which A264977(k) = A264977(n), or 0 if no such k exists.

Original entry on oeis.org

0, 5, 10, 39, 20, 13, 78, 11, 40, 21, 26, 19, 156, 29, 22, 27, 80, 25, 42, 35, 52, 45, 38, 43, 312, 37, 58, 51, 44, 41, 54, 59, 160, 57, 50, 67, 84, 53, 70, 75, 104, 61, 90, 79, 76, 93, 86, 55, 624, 101, 74, 99, 116, 77, 102, 71, 88, 69, 82, 115, 108, 85, 118, 123, 320, 121, 114, 131, 100, 117, 134, 91, 168, 89, 106, 147, 140, 109, 150, 83, 208, 105
Offset: 0

Views

Author

Antti Karttunen, Nov 06 2016

Keywords

Crossrefs

Cf. A277815 (a left inverse).
Cf. A277701, A277712, A277713, A277715 (iterates of this sequence starting from 1, 2, 3 and 9 respectively).

Programs

  • Scheme
    (define (A277816 n) (if (zero? n) n (let ((v (A264977 n))) (let loop ((k (+ 1 n))) (if (= v (A264977 k)) k (loop (+ 1 k)))))))

Formula

For all n >= 0, A277815(a(n)) = n.

A277826 a(n) = the least k for which A264977(k) = A264977(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 6, 7, 8, 9, 2, 7, 12, 1, 14, 15, 16, 17, 18, 7, 4, 9, 14, 23, 24, 17, 2, 15, 28, 1, 30, 31, 32, 33, 34, 7, 36, 17, 14, 3, 8, 1, 18, 23, 28, 9, 46, 47, 48, 49, 34, 15, 4, 17, 30, 47, 56, 33, 2, 31, 60, 1, 62, 63, 64, 65, 66, 7, 68, 33, 14, 47, 72, 73, 34, 3, 28, 17, 6, 23, 16, 81, 2, 23, 36, 1, 46, 87, 56, 73, 18, 47, 92, 9
Offset: 0

Views

Author

Antti Karttunen, Nov 06 2016

Keywords

Crossrefs

Cf. A277701, A277712, A277713, A277715 (positions of 1, 2, 3 and 9 in this sequence).
Cf. A277824, A277884 and their scatter-plots.

Programs

  • Scheme
    (define (A277826 n) (let ((v (A264977 n))) (let loop ((k 0)) (if (= v (A264977 k)) k (loop (+ 1 k))))))

A277884 a(n) = A277814(A277826(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 5, 6, 7, 8, 2, 6, 9, 1, 10, 11, 12, 13, 14, 6, 4, 8, 10, 15, 16, 13, 2, 11, 17, 1, 18, 19, 20, 21, 22, 6, 23, 13, 10, 3, 7, 1, 14, 15, 17, 8, 24, 25, 26, 27, 22, 11, 4, 13, 18, 25, 28, 21, 2, 19, 29, 1, 30, 31, 32, 33, 34, 6, 35, 21, 10, 25, 36, 37, 22, 3, 17, 13, 5, 15, 12, 38, 2, 15, 23, 1, 24, 39, 28, 37, 14, 25, 40, 8, 41
Offset: 0

Views

Author

Antti Karttunen, Nov 06 2016

Keywords

Crossrefs

Left inverse of A277817.
Cf. A277701, A277712, A277713, A277715 (positions of 1, 2, 3 and 8 in this sequence).
Cf. A277824, A277826 and their scatter-plots.

Programs

Formula

a(n) = A277814(A277826(n)).
Other identities. For all n >= 0:
a(A277817(n)) = n.
Showing 1-8 of 8 results.