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.

Previous Showing 11-20 of 214 results. Next

A302033 a(n) = A019565(A003188(n)).

Original entry on oeis.org

1, 2, 6, 3, 15, 30, 10, 5, 35, 70, 210, 105, 21, 42, 14, 7, 77, 154, 462, 231, 1155, 2310, 770, 385, 55, 110, 330, 165, 33, 66, 22, 11, 143, 286, 858, 429, 2145, 4290, 1430, 715, 5005, 10010, 30030, 15015, 3003, 6006, 2002, 1001, 91, 182, 546, 273, 1365, 2730, 910, 455, 65, 130, 390, 195, 39, 78, 26, 13, 221, 442, 1326, 663, 3315, 6630, 2210, 1105
Offset: 0

Views

Author

Antti Karttunen & Peter Munn, Apr 16 2018

Keywords

Comments

A squarefree analog of A207901 (and the subsequence consisting of its squarefree terms): Each term is either a divisor or a multiple of the next one, and the terms differ by a single prime factor. Compare also to A284003.
For all n >= 0, max(a(n + 1), a(n)) / min(a(n + 1), a(n)) = A094290(n + 1) = prime(valuation(n + 1, 2) + 1) = A000040(A001511(n + 1)). [See Russ Cox's Dec 04 2010 comment in A007814.] - David A. Corneth & Antti Karttunen, Apr 16 2018

Crossrefs

A permutation of A005117. Subsequence of A207901.
Cf. A302054 (gives the sum of prime divisors).
Cf. also A277811, A283475, A284003.

Programs

  • Mathematica
    Array[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[BitXor[#, Floor[#/2]], 2] &, 72, 0] (* Michael De Vlieger, Apr 27 2018 *)
  • PARI
    A003188(n) = bitxor(n, n>>1);
    A019565(n) = {my(j); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A302033(n) = A019565(A003188(n));
    
  • PARI
    first(n) = {my(pr = primes(1 + logint(n, 2)), ex = vector(#pr, i, 1), res = vector(n)); res[1] = 1; for(i = 1, n-1, v = valuation(i, 2); res[i + 1] = res[i] * pr[v++] ^ ex[v]; ex[v]*=-1); res}

Formula

a(n) = A019565(A003188(n)).
a(n) = A284003(A064706(n)).
a(n+1) = A059897(a(n), A094290(n+1)). - Peter Munn, Apr 01 2019

A163233 Two-dimensional Binary Reflected Gray Code: a(i,j) = bits of binary expansion of A003188(i) interleaved with that of A003188(j).

Original entry on oeis.org

0, 1, 2, 5, 3, 10, 4, 7, 11, 8, 20, 6, 15, 9, 40, 21, 22, 14, 13, 41, 42, 17, 23, 30, 12, 45, 43, 34, 16, 19, 31, 28, 44, 47, 35, 32, 80, 18, 27, 29, 60, 46, 39, 33, 160, 81, 82, 26, 25, 61, 62, 38, 37, 161, 162, 85, 83, 90, 24, 57, 63, 54, 36, 165, 163, 170, 84, 87, 91
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Comments

The top left 8 X 8 corner of the array is
+0 +1 +5 +4 20 21 17 16
+2 +3 +7 +6 22 23 19 18
10 11 15 14 30 31 27 26
+8 +9 13 12 28 29 25 24
40 41 45 44 60 61 57 56
42 43 47 46 62 63 59 58
34 35 39 38 54 55 51 50
32 33 37 36 52 53 49 48
By taking the top left 2 X 2 corner, 2 X 4 rectangle ((0,1,5,4),(2,3,7,6)) or 4 X 4 corner one obtains Karnaugh map templates for 2, 3 or 4 variables respectively (although not the standard ones usually given in the textbooks).

Crossrefs

Inverse: A163234. a(n) = A057300(A163235(n)). Transpose: A163235. Row sums: A163242. Cf. A054238, A147995.

Programs

  • Mathematica
    Table[Function[k, FromDigits[#, 2] &@ Apply[Function[{a, b}, Riffle @@ Map[PadLeft[#, Max[Length /@ {a, b}]] &, {a, b}]], Map[IntegerDigits[#, 2] &@ BitXor[#, Floor[#/2]] &, {k, j}]]][i - j], {i, 0, 11}, {j, i, 0, -1}] // Flatten (* Michael De Vlieger, Jun 25 2017 *)
  • Python
    def a000695(n):
        n=bin(n)[2:]
        x=len(n)
        return sum([int(n[i])*4**(x - 1 - i) for i in range(x)])
    def a003188(n): return n^(n>>1)
    def a(n, k): return a000695(a003188(n)) + 2*a000695(a003188(k))
    for n in range(21): print([a(n - k, k) for k in range(n + 1)]) # Indranil Ghosh, Jun 25 2017
  • Scheme
    (define (A163233bi x y) (+ (A000695 (A003188 x)) (* 2 (A000695 (A003188 y)))))
    (define (A163233 n) (A163233bi (A025581 n) (A002262 n)))
    

Formula

a(x,y) = A000695(A003188(x)) + 2*A000695(A003188(y)).

A268833 Square array A(n, k) = A101080(k, A003188(n+A006068(k))), read by descending antidiagonals, where A003188 is the binary Gray code, A006068 is its inverse, and A101080(x,y) gives the Hamming distance between binary expansions of x and y.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 2, 1, 0, 1, 2, 3, 2, 0, 1, 2, 3, 2, 3, 0, 1, 2, 1, 2, 1, 2, 0, 1, 2, 3, 2, 3, 2, 1, 0, 1, 2, 1, 2, 3, 4, 3, 2, 0, 1, 2, 1, 2, 3, 4, 3, 2, 3, 0, 1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 0, 1, 2, 3, 2, 3, 4, 3, 2, 1, 4, 3, 0, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 3, 2, 0, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 0, 1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 1, 2, 1, 2
Offset: 0

Views

Author

Antti Karttunen, Feb 15 2016

Keywords

Comments

The entry at row n, column k, gives the Hamming distance between binary expansions of k and A003188(n+A006068(k)). When Gray code is viewed as a traversal of vertices of an infinite dimensional hypercube by bit-flipping (see the illustration "Visualized as a traversal of vertices of a tesseract" in the Wikipedia's "Gray code" article) the argument k is the "address" (the binary code given inside each vertex) of the starting vertex, and argument n tells how many edges forward along the Gray code path we should hop from it (to the direction that leads away from the vertex with code 0000...). A(n, k) gives then the Hamming distance between the starting and the ending vertex. For how this works with case n=3, see comments in A268676. - Antti Karttunen, Mar 11 2024

Examples

			The top left [0 .. 24] X [0 .. 24] section of the array:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 1, 3, 1, 3, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 3, 1, 3, 1, 3, 3, 3, 3, 3, 1, 3, 1, 3, 3, 3
2, 2, 4, 4, 4, 4, 2, 2, 4, 4, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2, 4, 4, 2
1, 3, 3, 3, 3, 3, 1, 3, 3, 3, 1, 3, 1, 3, 3, 3, 3, 3, 1, 3, 1, 3, 3, 3, 1
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3
4, 4, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 4, 4, 2, 2, 4
3, 3, 3, 1, 5, 3, 3, 5, 5, 3, 3, 5, 3, 3, 3, 1, 5, 3, 3, 5, 3, 3, 3, 1, 3
2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2, 2
3, 1, 3, 3, 3, 5, 5, 3, 3, 5, 5, 3, 3, 1, 3, 3, 3, 5, 5, 3, 3, 1, 3, 3, 3
2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 4, 4, 2, 2, 4, 4, 2
1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 1
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
3, 5, 5, 3, 3, 1, 3, 3, 5, 3, 3, 5, 3, 5, 5, 3, 5, 3, 3, 5, 3, 5, 5, 3, 3
4, 4, 4, 4, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
5, 3, 3, 5, 3, 3, 3, 1, 5, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5
4, 4, 4, 4, 4, 4, 2, 2, 6, 6, 4, 4, 4, 4, 6, 6, 6, 6, 4, 4, 4, 4, 6, 6, 4
3, 3, 3, 3, 3, 3, 1, 3, 5, 5, 3, 5, 3, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5, 5, 3
2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2
		

Crossrefs

Transpose A268834.
Main diagonal: A268835.
Column 0: A005811.
Row 0: A000004, Row 1: A000012, Row 2: A007395, Row 3: A268676.
Cf. also A268726, A268727.

Programs

Formula

A(row,col) = A101080(col, A268820(row, row+col)).
A(n, k) = A101080(k, A003188(n+A006068(k))). - Antti Karttunen, Mar 11 2024

Extensions

Definition simplified by Antti Karttunen, Mar 11 2024

A269158 Square array A(row,col) = F(row,(2*col)-1), where F(0,q) = F(1,q) = 0, F(2p,q) = F(p,q) XOR A003188(q), F(2p+1,q) = F(q mod 2p+1, 2p+1) XOR (2p+1 AND q). Array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 0, 7, 3, 0, 0, 4, 3, 0, 1, 0, 13, 3, 0, 2, 0, 0, 14, 1, 0, 5, 1, 1, 0, 11, 1, 0, 2, 4, 0, 1, 0, 8, 1, 0, 1, 7, 7, 2, 1, 0, 25, 3, 0, 1, 12, 7, 7, 0, 0, 0, 26, 3, 0, 6, 15, 5, 4, 0, 0, 1, 0, 31, 3, 0, 5, 10, 3, 13, 4, 2, 2, 1, 0, 28, 1, 0, 6, 11, 2, 14, 9, 6, 0, 3, 1, 0, 21, 1, 0, 1, 26, 7, 11, 4, 12, 0, 3, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Feb 20 2016

Keywords

Comments

The array gives the values of bivariate function F(p,q) which is well-defined only when q is odd, thus while here its argument p obtains all integer values from 1 onward, argument q gets only odd numbers 1, 3, 5, 7, 9, ... as its values.
Any row n occurs also as row (4^k * n), for all k >= 0.

Examples

			The top left [1 .. 16] x [1 .. 25] section of the array:
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
1,  2,  7,  4, 13, 14, 11,  8, 25, 26, 31, 28, 21, 22, 19, 16
1,  3,  3,  3,  1,  1,  1,  3,  3,  3,  1,  1,  1,  3,  3,  3
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
1,  2,  5,  2,  1,  1,  6,  5,  6,  1,  5,  6,  1,  6,  5,  5
0,  1,  4,  7, 12, 15, 10, 11, 26, 25, 30, 29, 20, 21, 16, 19
1,  0,  7,  7,  5,  3,  2,  7,  2,  1,  5,  3,  1,  4,  5,  4
1,  2,  7,  4, 13, 14, 11,  8, 25, 26, 31, 28, 21, 22, 19, 16
1,  0,  0,  4,  9,  4,  9,  5, 12,  1,  0,  0, 12,  9,  4,  9
0,  0,  2,  6, 12, 15, 13, 13, 31, 27, 26, 26, 20, 16, 22, 21
1,  2,  0,  0, 13, 11,  7, 11, 14, 13, 14,  3,  8, 10, 10, 15
1,  3,  3,  3,  1,  1,  1,  3,  3,  3,  1,  1,  1,  3,  3,  3
1,  0,  3,  7,  0, 14, 13,  6,  1, 11, 14,  8,  8,  9, 12, 11
0,  2,  0,  3,  8, 13,  9, 15, 27, 27, 26, 31, 20, 18, 22, 20
1,  0,  0,  0, 12,  0, 11, 15,  9,  3, 14, 15,  4,  8,  2, 15
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
1,  2,  7,  3, 13, 15,  0,  8, 17,  8, 17, 11,  8, 14, 18, 10
0,  2,  7,  0,  4, 10,  2, 13, 21, 27, 31, 28, 25, 31, 23, 25
1,  0,  0,  2,  0, 14, 10,  0, 25, 19, 11, 19,  8,  9, 10, 16
1,  2,  5,  2,  1,  1,  6,  5,  6,  1,  5,  6,  1,  6,  5,  5
1,  0,  0,  0,  1, 15, 11, 11,  0, 26, 21, 10, 17, 15, 10, 15
0,  0,  7,  4,  0,  5, 12,  3, 23, 23, 17, 31, 29, 28, 25, 31
1,  2,  3,  4,  1,  0, 13,  8, 26,  0, 31, 23, 13, 19,  8, 11
0,  1,  4,  7, 12, 15, 10, 11, 26, 25, 30, 29, 20, 21, 16, 19
1,  0,  0,  0,  5,  1,  1, 13, 25, 25,  0, 28, 25, 12, 25, 13
		

Crossrefs

Transpose: A269159.
Column 1: Seems to be 0 followed by A039982.
Column 32769: A268819.
Cf. A065621 (occurs as row 2, row 8, and in general, as any row 2^(2n+1) for n >= 0. Seems to be also present as a slanted diagonal F(2n+1,2n-1).)
Cf. A268816 (row 6, row 24, etc.).
Cf. arrays A268829 and A268728 (variants), and also A268931.

Programs

  • Mathematica
    F[p_, q_] := F[p, q] = Which[p <= 1, 0, p > 1 && OddQ[p], F[Mod[q, p], p] ~BitXor~ BitAnd[p, q], True, F[p/2, q] ~BitXor~ BitXor[q, Floor[q/2]]];
    A[n_, k_] := F[n, 2 k - 1];
    Table[A[n - k, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 11 2017 *)
  • Scheme
    (define (A269158 n) (A269158auxbi (A002260 n) (+ -1 (* 2 (A004736 n)))))
    ;; A269158auxbi can be implemented either as a tail-recursive loop:
    (define (A269158auxbi p q) (if (not (odd? q)) (error "A269158bi: the second argument should be odd: " p q) (let loop ((p p) (q q) (s 0)) (cond ((<= p 1) s) ((odd? p) (loop (modulo q p) p (A003987bi s (A004198bi p q)))) (else (loop (/ p 2) q (A003987bi s (A003987bi q (/ (- q 1) 2)))))))))
    ;; Or a recurrence (reflecting the given recursive formula):
    (define (A269158auxbi p q) (cond ((<= p 1) 0) ((even? p) (A003987bi (A269158auxbi (/ p 2) q) (A003188 q))) (else (A003987bi (A269158auxbi (modulo q p) p) (A004198bi p q)))))

Formula

A(row,col) = F(row,(2*col)-1), where function F is defined as: If p <= 1, F(p,q) = 0, otherwise if p is an odd number > 1, F(p,q) = F(q mod p, p) XOR (p AND q), otherwise [when p is an even number] F(p,q) = F(p/2,q) XOR A003188(q).

A163235 Two-dimensional Binary Reflected Gray Code, transposed version: a(i,j) = bits of binary expansion of A003188(j) interleaved with that of A003188(i).

Original entry on oeis.org

0, 2, 1, 10, 3, 5, 8, 11, 7, 4, 40, 9, 15, 6, 20, 42, 41, 13, 14, 22, 21, 34, 43, 45, 12, 30, 23, 17, 32, 35, 47, 44, 28, 31, 19, 16, 160, 33, 39, 46, 60, 29, 27, 18, 80, 162, 161, 37, 38, 62, 61, 25, 26, 82, 81, 170, 163, 165, 36, 54, 63, 57, 24, 90, 83, 85, 168, 171, 167
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Comments

The top left 8x8 corner of this array
+0 +2 10 +8 40 42 34 32
+1 +3 11 +9 41 43 35 33
+5 +7 15 13 45 47 39 37
+4 +6 14 12 44 46 38 36
20 22 30 28 60 62 54 52
21 23 31 29 61 63 55 53
17 19 27 25 57 59 51 49
16 18 26 24 56 58 50 48
corresponds with Adamson's "H-bond codon-anticodon magic square" (see page 287 in Pickover's book):
CCC CCU CUU CUC UUC UUU UCU UCC
CCA CCG CUG CUA UUA UUG UCG UCA
CAA CAG CGG CGA UGA UGG UAG UAA
CAC CAU CGU CGC UGC UGU UAU UAC
AAC AAU AGU AGC GGC GGU GAU GAC
AAA AAG AGG AGA GGA GGG GAG GAA
ACA ACG AUG AUA GUA GUG GCG GCA
ACC ACU AUU AUC GUC GUU GCU GCC
when the base-triples are interpreted as quaternary (base-4) numbers, with the following rules: C = 0, A = 1, U = 2, G = 3.

References

  • Clifford A. Pickover, The Zen of Magic Squares, Circles, and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002, pp. 285-289.

Crossrefs

Inverse: A163236. a(n) = A057300(A163233(n)). Transpose: A163233. Row sums: A163242. Cf. A054238, A147995.

Programs

  • Mathematica
    Table[Function[k, FromDigits[#, 2] &@Apply[Function[{a, b}, Riffle @@ Map[PadLeft[#, Max[Length /@ {a, b}]] &, {a, b}]], Map[IntegerDigits[#, 2] &@ BitXor[#, Floor[#/2]] &, {k, j}]]][i - j], {i, 0, 11}, {j, 0, i}] // Flatten (* Michael De Vlieger, Jun 25 2017 *)
  • Python
    def a000695(n):
        n=bin(n)[2:]
        x=len(n)
        return sum(int(n[i])*4**(x - 1 - i) for i in range(x))
    def a003188(n): return n^(n>>1)
    def a(n, k): return a000695(a003188(n)) + 2*a000695(a003188(k))
    for n in range(21): print([a(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, Jun 25 2017
  • Scheme
    (define (A163235 n) (A163233bi (A002262 n) (A025581 n)))
    

A234612 Self-inverse permutation of nonnegative integers, "blue-gray" code: a(n) = A003188(A193231(n)).

Original entry on oeis.org

0, 1, 2, 3, 7, 6, 5, 4, 8, 9, 10, 11, 15, 14, 13, 12, 25, 24, 27, 26, 30, 31, 28, 29, 17, 16, 19, 18, 22, 23, 20, 21, 42, 43, 40, 41, 45, 44, 47, 46, 34, 35, 32, 33, 37, 36, 39, 38, 51, 50, 49, 48, 52, 53, 54, 55, 59, 58, 57, 56, 60, 61, 62, 63, 127, 126, 125
Offset: 0

Views

Author

Antti Karttunen, Dec 28 2013

Keywords

Crossrefs

Programs

  • Python
    def a065621(n): return n^(2*(n - (n&-n)))
    def a048724(n): return n^(2*n)
    def a003188(n): return n^(n>>1)
    def a193231(n):
        if n<2: return n
        if n%2==0: return a048724(a193231(n/2))
        else: return a065621(1 + a193231((n - 1)/2))
    def a(n): return n if n<2 else a003188(a193231(n)) # Indranil Ghosh, Jun 05 2017
  • Scheme
    (define (A234612 n) (A003188 (A193231 n)))
    (define (A234612v2 n) (A193231 (A006068 n))) ;; Alternative 2.
    

Formula

a(n) = A003188(A193231(n)).
a(n) = A193231(A006068(n)).
a(n) = A193231(A234613(A193231(n))).

A064707 Inverse square of permutation defined by A003188.

Original entry on oeis.org

0, 1, 2, 3, 5, 4, 7, 6, 10, 11, 8, 9, 15, 14, 13, 12, 21, 20, 23, 22, 16, 17, 18, 19, 31, 30, 29, 28, 26, 27, 24, 25, 42, 43, 40, 41, 47, 46, 45, 44, 32, 33, 34, 35, 37, 36, 39, 38, 63, 62, 61, 60, 58, 59, 56, 57, 53, 52, 55, 54, 48, 49, 50, 51, 85, 84, 87, 86, 80, 81, 82, 83
Offset: 0

Views

Author

N. J. A. Sloane, Oct 13 2001

Keywords

Comments

Not the same as A100281: a(n)=A100281(n)=A099896(A099896(n)) only for n<64. - Reinhard Zumkeller, Nov 11 2004

Crossrefs

Inverse of permutation defined by A064706. Cf. A003188.

Programs

  • MATLAB
    A = 1; for i = 1:7 B = A(end:-1:1); A = [A (B + length(A))]; end C = A(A); for i = 1:128 A(C(i)) = i - 1; end A

Formula

a(n) = A180200(A233279(n)), n > 0. - Yosu Yurramendi, Apr 05 2017

Extensions

More terms from David Wasserman, Aug 02 2002

A268725 Square array A(i,j) = A003188(A006068(i) * A006068(j)), read by antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 2, 2, 3, 13, 3, 4, 5, 5, 4, 5, 31, 6, 31, 5, 6, 27, 9, 9, 27, 6, 7, 10, 10, 41, 10, 10, 7, 8, 8, 12, 63, 63, 12, 8, 8, 9, 59, 15, 18, 54, 18, 15, 59, 9, 10, 63, 17, 50, 20, 20, 50, 17, 63, 10, 11, 54, 18, 93, 17, 24, 17, 93, 18, 54, 11, 12, 52, 20, 83, 119, 30, 30, 119, 83, 20, 52, 12, 13, 20, 23, 126, 126, 34, 21, 34, 126, 126, 23, 20, 13
Offset: 1

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Examples

			The top left [1 .. 15] x [1 .. 15] section of the array:
   1,  2,  3,   4,   5,  6,   7,   8,   9,  10,  11,  12,  13,  14,  15
   2, 13,  5,  31,  27, 10,   8,  59,  63,  54,  52,  20,  22,  49,  17
   3,  5,  6,   9,  10, 12,  15,  17,  18,  20,  23,  24,  27,  29,  30
   4, 31,  9,  41,  63, 18,  50,  93,  83, 126, 118,  36,  32, 107, 101
   5, 27, 10,  63,  54, 20,  17, 119, 126, 108, 105,  40,  45,  99,  34
   6, 10, 12,  18,  20, 24,  30,  34,  36,  40,  46,  48,  54,  58,  60
   7,  8, 15,  50,  17, 30,  21, 110, 101,  34,  97,  60,  59,  44,  43
   8, 59, 17,  93, 119, 34, 110, 145, 187, 238, 162,  68, 196, 247, 221
   9, 63, 18,  83, 126, 36, 101, 187, 166, 252, 237,  72,  65, 215, 202
  10, 54, 20, 126, 108, 40,  34, 238, 252, 216, 210,  80,  90, 198,  68
  11, 52, 23, 118, 105, 46,  97, 162, 237, 210, 253,  92,  79, 200, 195
  12, 20, 24,  36,  40, 48,  60,  68,  72,  80,  92,  96, 108, 116, 120
  13, 22, 27,  32,  45, 54,  59, 196,  65,  90,  79, 108, 121,  82, 119
  14, 49, 29, 107,  99, 58,  44, 247, 215, 198, 200, 116,  82,  69,  89
  15, 17, 30, 101,  34, 60,  43, 221, 202,  68, 195, 120, 119,  89,  86
		

Crossrefs

Cf. A268723 (main diagonal).
Cf. A268722 (row 2 and column 2).
Cf. A001969 (row 3 and column 3).
Cf. also A268715.

Programs

Formula

A(i,j) = A003188(A006068(i) * A006068(j)).
A(i,j) = A003188(A268724(i,j)).

A323896 Sum of binary Gray code A003188 and its Dirichlet inverse, A323895.

Original entry on oeis.org

2, 0, 0, 9, 0, 12, 0, 9, 4, 42, 0, 0, 0, 24, 28, 27, 0, 62, 0, -15, 16, 84, 0, 33, 49, 66, 44, -6, 0, -74, 0, 45, 56, 150, 56, -4, 0, 156, 44, 123, 0, 118, 0, -36, 130, 168, 0, 24, 16, -105, 100, -27, 0, -62, 196, 69, 104, 114, 0, 230, 0, 96, 180, 99, 154, 46, 0, -69, 112, 42, 0, 186, 0, 330, -98, -72, 112, 118, 0, 39, 117, 366, 0, 47
Offset: 1

Views

Author

Antti Karttunen, Feb 08 2019

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    DirInverse(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = -sumdiv(n, d, if(dA003188(n) = bitxor(n, n>>1);
    v323895 = DirInverse(vector(up_to,n,A003188(n)));
    A323895(n) = v323895[n];
    A323896(n) = (A003188(n)+A323895(n));

Formula

a(n) = A003188(n) + A323895(n).

A369041 LCM-transform of binary Gray code (A003188).

Original entry on oeis.org

1, 3, 2, 1, 7, 5, 2, 1, 13, 1, 1, 1, 11, 3, 2, 1, 5, 3, 1, 1, 31, 29, 1, 1, 1, 23, 1, 1, 19, 17, 2, 1, 7, 1, 1, 1, 1, 53, 1, 1, 61, 1, 1, 1, 59, 1, 1, 1, 41, 43, 1, 1, 47, 1, 1, 1, 37, 1, 1, 1, 1, 1, 2, 1, 97, 1, 1, 1, 103, 101, 1, 1, 109, 1, 1, 1, 107, 1, 1, 1, 11, 1, 1, 1, 127, 5, 1, 1, 1, 1, 1, 1, 1, 113, 1, 1, 3
Offset: 1

Views

Author

Antti Karttunen, Jan 12 2024

Keywords

Comments

Binary Gray code, A003188, is a permutation related to the binary expansion of n that keeps all the numbers of range [2^k, 2^(1+k)[ in the same range, i.e., for all n >= 1, A000523(A003188(n)) = A000523(n), from which it immediately follows that A003188 has the property S mentioned in the comments of A368900, and therefore this sequence is equal to A014963(A003188(n)), for n >= 1.

Crossrefs

Programs

  • Mathematica
    nn = 120; a[1] = s[1] = 1; Do[s[n] = LCM[s[n - 1], BitXor[n, Floor[n/2]] ]; a[n] = s[n]/s[n - 1], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Mar 24 2024 *)
  • PARI
    up_to = 65537; \\ Checked up to 2^17;
    LCMtransform(v) = { my(len = length(v), b = vector(len), g = vector(len)); b[1] = g[1] = 1; for(n=2,len, g[n] = lcm(g[n-1],v[n]); b[n] = g[n]/g[n-1]); (b); };
    A003188(n) = bitxor(n, n>>1);
    v369041 = LCMtransform(vector(up_to,i,A003188(i)));
    A369041(n) = v369041[n];
    A014963(n) = { ispower(n, , &n); if(isprime(n), n, 1); };

Formula

a(n) = lcm {1..A003188(n)} / lcm {1..A003188(n-1)}.
a(n) = A014963(A003188(n)). [See comments.]
Previous Showing 11-20 of 214 results. Next