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-10 of 842 results. Next

A048680 Nonnegative integers A001477 expanded with rewrite 0->0, 01->1, then interpreted as Zeckendorffian expansions (as numbers of Fibonacci number system).

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 7, 12, 5, 9, 10, 17, 11, 19, 20, 33, 8, 14, 15, 25, 16, 27, 28, 46, 18, 30, 31, 51, 32, 53, 54, 88, 13, 22, 23, 38, 24, 40, 41, 67, 26, 43, 44, 72, 45, 74, 75, 122, 29, 48, 49, 80, 50, 82, 83, 135, 52, 85, 86, 140, 87, 142, 143, 232, 21, 35, 36, 59, 37, 61
Offset: 0

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

A permutation of the nonnegative integers (A001477). Inverse permutation to A048679, i.e. A048679[ A048680[ n ] ] = n for all n and vice versa.

Crossrefs

Equals A074049(n+1) - 1.

Programs

  • Maple
    rewrite_0to0_1to01 := proc(n) option remember; if(n < 2) then RETURN(n); else RETURN(((2^(1+(n mod 2))) * rewrite_0to0_1to01(floor(n/2))) + (n mod 2)); fi; end; interpret_as_zeckendorf_expansion := n -> sum('(bit_i(n,i)*fib(i+2))','i'=0..floor_log_2(n));
  • PARI
    a(n)=my(k=1,s);while(n,if(n%2,s+=fibonacci(k++));k++;n>>=1);s \\ Charles R Greathouse IV, Nov 17 2013

Formula

a(n) = interpret_as_zeckendorf_expansion(rewrite_0to0_1to01(n)) (where rewrite_0to0_1to01(n)=A048678[ n ])

A286156 A(n,k) = T(remainder(n,k), quotient(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, square array read by descending antidiagonals.

Original entry on oeis.org

1, 2, 3, 2, 1, 6, 2, 5, 4, 10, 2, 5, 1, 3, 15, 2, 5, 9, 4, 7, 21, 2, 5, 9, 1, 8, 6, 28, 2, 5, 9, 14, 4, 3, 11, 36, 2, 5, 9, 14, 1, 8, 7, 10, 45, 2, 5, 9, 14, 20, 4, 13, 12, 16, 55, 2, 5, 9, 14, 20, 1, 8, 3, 6, 15, 66, 2, 5, 9, 14, 20, 27, 4, 13, 7, 11, 22, 78, 2, 5, 9, 14, 20, 27, 1, 8, 19, 12, 17, 21, 91, 2, 5, 9, 14, 20, 27, 35, 4, 13, 3, 18, 10, 29, 105
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Examples

			The top left 15 X 15 corner of the array:
    1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,   2,   2
    3,  1,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,   5,   5
    6,  4,  1,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,   9,   9
   10,  3,  4,  1, 14, 14, 14, 14, 14, 14, 14, 14, 14,  14,  14
   15,  7,  8,  4,  1, 20, 20, 20, 20, 20, 20, 20, 20,  20,  20
   21,  6,  3,  8,  4,  1, 27, 27, 27, 27, 27, 27, 27,  27,  27
   28, 11,  7, 13,  8,  4,  1, 35, 35, 35, 35, 35, 35,  35,  35
   36, 10, 12,  3, 13,  8,  4,  1, 44, 44, 44, 44, 44,  44,  44
   45, 16,  6,  7, 19, 13,  8,  4,  1, 54, 54, 54, 54,  54,  54
   55, 15, 11, 12,  3, 19, 13,  8,  4,  1, 65, 65, 65,  65,  65
   66, 22, 17, 18,  7, 26, 19, 13,  8,  4,  1, 77, 77,  77,  77
   78, 21, 10,  6, 12,  3, 26, 19, 13,  8,  4,  1, 90,  90,  90
   91, 29, 16, 11, 18,  7, 34, 26, 19, 13,  8,  4,  1, 104, 104
  105, 28, 23, 17, 25, 12,  3, 34, 26, 19, 13,  8,  4,   1, 119
  120, 37, 15, 24,  6, 18,  7, 43, 34, 26, 19, 13,  8,   4,   1
		

Crossrefs

Cf. A286157 (transpose), A286158 (lower triangular region), A286159 (lower triangular region transposed).
Cf. A000217 (column 1), A000012 (the main diagonal), A000096 (superdiagonal), A034856.

Programs

  • Mathematica
    Map[((#1 + #2)^2 + 3 #1 + #2)/2 & @@ # & /@ Reverse@ # &, Table[Function[m, Reverse@ QuotientRemainder[m, k]][n - k + 1], {n, 14}, {k, n}]] // Flatten (* Michael De Vlieger, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def A(n, k): return T(n%k, n//k)
    for n in range(1, 21): print([A(k, n - k + 1) for k in range(1, n + 1)])  # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286156 n) (A286156bi (A002260 n) (A004736 n)))
    (define (A286156bi row col) (if (zero? col) -1 (let ((a (remainder row col)) (b (quotient row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))))
    

Formula

A(n,k) = T(remainder(n,k), quotient(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, that is, as a pairing function from [0, 1, 2, 3, ...] x [0, 1, 2, 3, ...] to [0, 1, 2, 3, ...]. This sequence lists only values for indices n >= 1, k >= 1.

A231179 Boustrophedon transform of nonnegative integers, cf. A001477.

Original entry on oeis.org

0, 1, 4, 12, 36, 120, 462, 2058, 10472, 59976, 381770, 2673374, 20422908, 169020852, 1506427678, 14385323610, 146527700944, 1585801332848, 18171944693586, 219803766565366, 2798628476670180, 37414906698747564, 524019526485293894, 7672827408344428242
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 05 2013

Keywords

Crossrefs

Programs

  • Haskell
    a231179 n = sum $ zipWith (*) (a109449_row n) [0..]
    
  • Mathematica
    a[n_] := n! SeriesCoefficient[x Exp[x] (1+Sin[x]) / Cos[x], {x, 0, n}];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jul 30 2018, after Peter Luschny *)
  • Python
    from itertools import count, islice, accumulate
    def A231179_gen(): # generator of terms
        blist = tuple()
        for i in count(0):
            yield (blist := tuple(accumulate(reversed(blist),initial=i)))[-1]
    A231179_list = list(islice(A231179_gen(),30)) # Chai Wah Wu, Jun 11 2022

Formula

a(n) = A231200(n)/2.
a(n) = Sum_{k=1..n} k * A109449(n,k).
E.g.f.: x*exp(x)*(sec(x)+tan(x)). (After Sergei N. Gladkovskii in A000660.) - Peter Luschny, Oct 28 2014
a(n) = A000660(n) - A000111(n). - Sergei N. Gladkovskii, Oct 28 2014
a(n) ~ n! * exp(Pi/2) * 2^(n+1) / Pi^n. - Vaclav Kotesovec, Jun 12 2015

A286151 Square array read by descending antidiagonals: If n > k, A(n,k) = T(n XOR k, k), and otherwise A(n,k) = T(n, n XOR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, and XOR is bitwise-xor (A003987).

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 6, 11, 13, 9, 10, 7, 5, 8, 14, 15, 22, 8, 7, 26, 20, 21, 16, 38, 9, 42, 19, 27, 28, 37, 47, 58, 62, 52, 43, 35, 36, 29, 23, 48, 14, 51, 25, 34, 44, 45, 56, 30, 39, 19, 16, 41, 33, 64, 54, 55, 46, 80, 31, 25, 20, 23, 32, 88, 53, 65, 66, 79, 93, 108, 32, 41, 39, 31, 116, 102, 89, 77, 78, 67, 57, 94, 140, 33, 27, 30, 148, 101, 63, 76, 90
Offset: 0

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), ...

Examples

			The top left 0 .. 12 x 0 .. 12 corner of the array:
   0,   1,   3,   6,  10,  15,  21,  28,  36,  45,  55,  66,  78
   2,   2,  11,   7,  22,  16,  37,  29,  56,  46,  79,  67, 106
   5,  13,   5,   8,  38,  47,  23,  30,  80,  93,  57,  68, 138
   9,   8,   7,   9,  58,  48,  39,  31, 108,  94,  81,  69, 174
  14,  26,  42,  62,  14,  19,  25,  32, 140, 157, 175, 194,  82
  20,  19,  52,  51,  16,  20,  41,  33, 176, 158, 215, 195, 110
  27,  43,  25,  41,  23,  39,  27,  34, 216, 237, 177, 196, 142
  35,  34,  33,  32,  31,  30,  29,  35, 260, 238, 217, 197, 178
  44,  64,  88, 116, 148, 184, 224, 268,  44,  53,  63,  74,  86
  54,  53, 102, 101, 166, 165, 246, 245,  46,  54,  87,  75, 114
  65,  89,  63,  87, 185, 225, 183, 223,  57,  81,  65,  76, 146
  77,  76,  75,  74, 205, 204, 203, 202,  69,  68,  67,  77, 182
  90, 118, 150, 186,  86, 114, 146, 182,  82, 110, 142, 178,  90
		

Crossrefs

Cf. A000217 (row 0), A000096 (column 0 and the main diagonal).
Cf. A286153 (same array without row 0 and column 0).

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=If[n>k, T[BitXor[n, k], k], T[n, BitXor[n, k]]]; Table[A[k, n - k ], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def A(n, k): return T(n^k, k) if n>k else T(n, n^k)
    for n in range(21): print([A(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286151 n) (A286151bi (A002262 n) (A025581 n)))
    (define (A286151bi row col) (define (pairA001477bi a b) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2)) (cond ((> row col) (pairA001477bi (A003987bi row col) col)) (else (pairA001477bi row (A003987bi col row))))) ;; Where A003987bi implements bitwise-xor (A003987).
    

Formula

If n > k, A(n,k) = T(A003987(n,k),k), otherwise A(n,k) = T(n,A003987(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, and XOR is bitwise-xor (A003987).

A072732 Simple triangle-stretching N X N -> N bijection: push terms in the middle twice as far down to make space for the terms obtained by bisecting the edges, which are thus contracted by the same factor. Do this for all "triangle-shells" successively contained inside each other in A001477.

Original entry on oeis.org

0, 1, 4, 7, 12, 2, 3, 17, 24, 8, 11, 31, 40, 18, 5, 6, 23, 49, 60, 32, 13, 16, 39, 71, 84, 50, 25, 9, 10, 30, 59, 97, 112, 72, 41, 19, 22, 48, 83, 127, 144, 98, 61, 33, 14, 15, 38, 70, 111, 161, 180, 128, 85, 51, 26, 29, 58, 96, 143, 199, 220, 162, 113, 73, 42, 20, 21, 47
Offset: 0

Views

Author

Antti Karttunen, Jun 12 2002

Keywords

Crossrefs

Inverse: A072733, projections: A072736 & A072737, variant of the same theme: A072734. Cf. also A001477 and its projections A025581 & A002262.

Programs

  • Scheme
    (define (A072732 n) (packA072732 (A025581 n) (A002262 n)))
    (define (packA001477 x y) (/ (+ (expt (+ x y) 2) x (* 3 y)) 2))
    (define (packA072732 x y) (let ((x-y (- x y))) (cond ((<= x-y 0) (packA001477 (+ (* 2 x) (modulo x-y 2)) (+ (* 2 x) (floor->exact (/ (1+ (- x-y)) 2))))) (else (packA001477 (+ (* 2 (1+ y)) (floor->exact (/ (- x-y 2) 2))) (+ (* 2 y) (modulo (1+ x-y) 2)))))))

A182431 Table, read by antidiagonals, in which the n-th row comprises A214206(n) 0 followed by a second-order recursive series G in which each product G(i)*G(i+1) lies in the same row of A001477 (interpreted as a square array).

Original entry on oeis.org

0, 14, 4, 0, 14, 7, 12, 1, 14, 8, 98, 4, 2, 14, 10, 602, 35, 0, 3, 14, 11, 3540, 218, 0, 4, 4, 14, 12, 20664, 1285, 2, 21, 4, 5, 14, 13, 120470, 7504, 14, 122, 14, 8, 6, 14, 14, 702182, 43751, 84, 711, 74, 35, 12, 7, 14, 15
Offset: 0

Views

Author

Kenneth J Ramsey, Apr 28 2012

Keywords

Comments

This is a table related to the square array of nonnegative integers, A001477. Each row k contains the positive argument of the largest triangular number equal to or less than 14*k in column 0 and a corresponding 2nd-order recursive sequence G(k) beginning at position a(k,1). Each term G(i) is the same as a(k,i+1). If the product 14*k appears in row "r" of the square array A001477, then the product of adjacent terms G(i)*G(i+1), if greater than (r^2 + 3*r - 2)/2, is always in row "r" of table A001477. If the product is less than (r^2 +3*r -2)/2, then the product less r would be a triangular number, i.e., still lie in the same row assumed to contain all numbers n that equal a triangular number + r. For example, 3 is a triangular number and appears in row 0 of A001477, but if the rows could take negative indices, A001477(2,-1) would be a 3 so 3 can be said to also lie in row 2. See A182102 for a table of the arguments of the triangular numbers G(i)*G(i+1) - r.
A property of this table is that a(k+1,i)-a(k,i) directly depends on the value of a(k+1,0)-a(k,0) in the same manner regardless of the value of k. For instance, if a(k+1,0) - a(k,0) = 1 then a(k+1,i+1) - a(k,i+1) equals A182435(i) for all i. Also, for i>0, A143608(i) divides a(k+1,i+1)-a(k,i+1) for all k.

Examples

			The Table begins:
0 14  0 12  98  602 3540 ...
4 14  1  4  35  218 1285 ...
7 14  2  0   0    2   14 ...
8 14  3  4  21  122  711 ...
10 14  4  4  14   74  424 ...
11 14  5  8  35  194 1121 ...
12 14  6 12  56  314 1818 ...
13 14  7 16  77  434 2515 ...
14 14  8 20  98  554 3212 ...
15 14  9 24 119  674 3909 ...
16 14 10 28 140  794 4606 ...
17 14 11 32 161  914 5303 ...
17 14 12 40 210 1202 6984 ...
...
Note that 14*0,0*12,12*98, 98*602 etc are each 0 more than a triangular number and are in row 0 of square array A001477; while 14*1, 1*4, 4*35, 35*218 etc are each 4 more than a triangular number and thus can be said to lie in row 4 of square array A001477.
		

Crossrefs

Programs

  • Mathematica
    highTri = Compile[{{S1,_Integer}}, Module[{xS0=0, xS1=S1}, While[xS1-xS0*(xS0+1)/2 > xS0, xS0++]; xS0]];
    overTri = Compile[{{S2,_Integer}}, Module[{xS0=0, xS2=S2}, While[xS2-xS0*(xS0+1)/2 > xS0, xS0++]; xS2 - (xS0*(1+xS0)/2)]];
    K1 = 0; m = 14; tab=Reap[While[K1<16,J1=highTri[m*K1]; X = 2*(m+K1-(J1*2+1)); K2 = (6 K1 - m + X); K3 = 6 K2 - K1 + X; K4 = 6 K3 - K2 + X; K5 = 6 K4 -K3 + X; K6 = 6*K5 - K4 + X; K7 = 6*K6-K5+X; K8 = 6*K7-K6+X; Sow[J1,c]; Sow[m,d]; Sow[K1,e]; Sow[K2,f]; Sow[K3,g]; Sow[K4,h];
      Sow[K5,i]; Sow[K6,j]; Sow[K7,k]; Sow[K8,l]; K1++]][[2]]; a=1; list5 = Reap[While[a<11, b=a; While[b>0, Sow[tab[[b,a+1-b]]]; b--]; a++]][[2,1]]; list5

Formula

a(k,0) equals the largest m such that m*(m+1)/2 is less than or equal to 14*k.
a(k,1) = 14; a(k,2) = k.
For i > 2, a(k,i) = 6*a(k,i-1) - a(k,i-2) + G_k where G_k is a constant equal to 28 + 2*k - 2 - 4*a(k,0).

A286108 Square array read by antidiagonals: A(n,k) = T(2*(n AND k), n XOR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and XOR is bitwise-xor (A003987).

Original entry on oeis.org

0, 1, 1, 3, 5, 3, 6, 6, 6, 6, 10, 12, 14, 12, 10, 15, 15, 19, 19, 15, 15, 21, 23, 21, 27, 21, 23, 21, 28, 28, 28, 28, 28, 28, 28, 28, 36, 38, 40, 38, 44, 38, 40, 38, 36, 45, 45, 49, 49, 53, 53, 49, 49, 45, 45, 55, 57, 55, 61, 63, 65, 63, 61, 55, 57, 55, 66, 66, 66, 66, 74, 74, 74, 74, 66, 66, 66, 66, 78, 80, 82, 80, 78, 88, 90, 88, 78, 80, 82, 80, 78
Offset: 0

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), ...

Examples

			The top left 0 .. 12 x 0 .. 12 corner of the array:
   0,  1,   3,   6,  10,  15,  21,  28,  36,  45,  55,  66,  78
   1,  5,   6,  12,  15,  23,  28,  38,  45,  57,  66,  80,  91
   3,  6,  14,  19,  21,  28,  40,  49,  55,  66,  82,  95, 105
   6, 12,  19,  27,  28,  38,  49,  61,  66,  80,  95, 111, 120
  10, 15,  21,  28,  44,  53,  63,  74,  78,  91, 105, 120, 144
  15, 23,  28,  38,  53,  65,  74,  88,  91, 107, 120, 138, 161
  21, 28,  40,  49,  63,  74,  90, 103, 105, 120, 140, 157, 179
  28, 38,  49,  61,  74,  88, 103, 119, 120, 138, 157, 177, 198
  36, 45,  55,  66,  78,  91, 105, 120, 152, 169, 187, 206, 226
  45, 57,  66,  80,  91, 107, 120, 138, 169, 189, 206, 228, 247
  55, 66,  82,  95, 105, 120, 140, 157, 187, 206, 230, 251, 269
  66, 80,  95, 111, 120, 138, 157, 177, 206, 228, 251, 275, 292
  78, 91, 105, 120, 144, 161, 179, 198, 226, 247, 269, 292, 324
		

Crossrefs

Cf. A000217 (row 0 & column 0), A014106 (main diagonal).

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[2*BitAnd[n, k], BitXor[n, k]]; Table[A[k, n - k ], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def A(n, k): return T(2*(n&k), n^k)
    for n in range(21): print([A(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286108 n) (A286108bi (A002262 n) (A025581 n)))
    (define (A286108bi row col) (let ((a (* 2 (A004198bi row col))) (b (A003987bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003987bi and A004198bi implement bitwise-xor (A003987) and bitwise-and (A004198).
    

Formula

A(n,k) = T(2*A004198(n,k), A003987(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, that is, as a pairing function from [0, 1, 2, 3, ...] x [0, 1, 2, 3, ...] to [0, 1, 2, 3, ...].

A286109 Square array read by antidiagonals: A(n,k) = T(n XOR k, 2*(n AND k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and XOR is bitwise-xor (A003987).

Original entry on oeis.org

0, 2, 2, 5, 3, 5, 9, 9, 9, 9, 14, 12, 10, 12, 14, 20, 20, 16, 16, 20, 20, 27, 25, 27, 21, 27, 25, 27, 35, 35, 35, 35, 35, 35, 35, 35, 44, 42, 40, 42, 36, 42, 40, 42, 44, 54, 54, 50, 50, 46, 46, 50, 50, 54, 54, 65, 63, 65, 59, 57, 55, 57, 59, 65, 63, 65, 77, 77, 77, 77, 69, 69, 69, 69, 77, 77, 77, 77, 90, 88, 86, 88, 90, 80, 78, 80, 90, 88, 86, 88, 90
Offset: 0

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), ...

Examples

			The top left 0 .. 12 x 0 .. 12 corner of the array:
   0,   2,   5,   9,  14,  20,  27,  35,  44,  54,  65,  77,  90
   2,   3,   9,  12,  20,  25,  35,  42,  54,  63,  77,  88, 104
   5,   9,  10,  16,  27,  35,  40,  50,  65,  77,  86, 100, 119
   9,  12,  16,  21,  35,  42,  50,  59,  77,  88, 100, 113, 135
  14,  20,  27,  35,  36,  46,  57,  69,  90, 104, 119, 135, 144
  20,  25,  35,  42,  46,  55,  69,  80, 104, 117, 135, 150, 162
  27,  35,  40,  50,  57,  69,  78,  92, 119, 135, 148, 166, 181
  35,  42,  50,  59,  69,  80,  92, 105, 135, 150, 166, 183, 201
  44,  54,  65,  77,  90, 104, 119, 135, 136, 154, 173, 193, 214
  54,  63,  77,  88, 104, 117, 135, 150, 154, 171, 193, 212, 236
  65,  77,  86, 100, 119, 135, 148, 166, 173, 193, 210, 232, 259
  77,  88, 100, 113, 135, 150, 166, 183, 193, 212, 232, 253, 283
  90, 104, 119, 135, 144, 162, 181, 201, 214, 236, 259, 283, 300
		

Crossrefs

Cf. A000096 (row 0 & column 0), A014105 (main diagonal).

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitXor[n, k], 2*BitAnd[n, k]]; Table[A[k, n - k ], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def A(n, k): return T(n^k, 2*(n&k))
    for n in range(21): print([A(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286109 n) (A286109bi (A002262 n) (A025581 n)))
    (define (A286109bi row col) (let ((a (A003987bi row col)) (b (* 2 (A004198bi row col)))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003987bi and A004198bi implement bitwise-xor (A003987) and bitwise-and (A004198).
    

Formula

A(n,k) = T(A003987(n,k), 2*A004198(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, that is, as a pairing function from [0, 1, 2, 3, ...] x [0, 1, 2, 3, ...] to [0, 1, 2, 3, ...].

A075175 Prime factorization of n encoded by interleaving successive prime exponents in unary to bit-positions given by columns of A001477.

Original entry on oeis.org

0, 1, 2, 5, 8, 3, 64, 37, 18, 9, 1024, 7, 32768, 65, 10, 549, 2097152, 19, 268435456, 13, 66, 1025, 68719476736, 39, 136, 32769, 274, 69, 35184372088832, 11, 36028797018963968, 16933, 1026, 2097153, 72, 23, 73786976294838206464
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

Here we store the exponent e_i of p_i (p1=2, p2=3, p3=5, ...) in the factorization of n to the bit positions given by the column i-1 of A001477 viewed as a table (the exponent of 2 is thus stored to bit positions 0, 2, 5, 9, 14, 20, ..., exponent of 3 to 1, 4, 8, 13, 19, ..., exponent of 5 to 3, 7, 12, 18, 25, ...) using unary system, i.e. we actually store 2^(e_i) - 1 in binary.
This injective mapping from N to N offers an example of the proof given in Cameron's book that any distributive lattice can be represented as a sublattice of the power-set lattice P(X) of some set X. With this we can implement GCD (A003989) with bitwise AND (A004198) and LCM (A003990) with bitwise OR (A003986). Also, to test whether x divides y, it is enough to check that ((a(x) OR a(y)) XOR a(y)) = A003987(A003986(a(x),a(y)),a(y)) is zero.

Examples

			a(24) = 39 because 24 = 2^3 * 3^1 so we add the binary words 100101 and 10 to get 100111 in binary = 39 in decimal and a(25) = 136 because 25 = 5^2 so we form a binary word 10001000 = 136 in decimal.
		

References

  • P. J. Cameron, Combinatorics: Topics, Techniques, Algorithms, Cambridge University Press, 1998, page 191. (12.3. Distributive lattices)

Crossrefs

Variant: A075173. Inverse: A075176.
A003989(x, y) = A075176(A004198(a(x), a(y))), A003990(x, y) = A075176(A003986(a(x), a(y))).

A163894 The least i for which A163355^n(i) is not equal to i, 0 if no such i exists, i.e., when A163355^n = A001477.

Original entry on oeis.org

0, 2, 4, 2, 4, 2, 24, 2, 4, 2, 4, 2, 33, 2, 4, 2, 4, 2, 24, 2, 4, 2, 4, 2, 76, 2, 4, 2, 4, 2, 24, 2, 4, 2, 4, 2, 33, 2, 4, 2, 4, 2, 24, 2, 4, 2, 4, 2, 76, 2, 4, 2, 4, 2, 24, 2, 4, 2, 4, 2, 33, 2, 4, 2, 4, 2, 24, 2, 4, 2, 4, 2, 390, 2, 4, 2, 4, 2, 24, 2, 4, 2, 4, 2, 33, 2, 4, 2, 4, 2, 24, 2, 4, 2, 4
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Comments

A163355^n means n-fold application of A163355, i.e., A163355^2 = A163905, A163355^3 = A163915. By convention A163355^0 = A001477.

Crossrefs

Programs

  • Maple
    A163894 := proc(n)
        local i,a355,a,itr ;
        if n = 0 then
            return 0 ;
        end if;
        a := 0 ;
        for i from 0 do
            a355 := A163355(i) ;
            for itr from 2 to n do
                a355 := A163355(a355) ;
            end do:
            if a355 <> i then
                return i ;
            end if;
        end do:
    end proc:
    seq(A163894(n),n=0..100) ; # R. J. Mathar, Nov 22 2023
Showing 1-10 of 842 results. Next