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 82 results. Next

A318456 a(n) = n OR A001065(n), where OR is bitwise-or (A003986) and A001065 = sum of proper divisors.

Original entry on oeis.org

1, 3, 3, 7, 5, 6, 7, 15, 13, 10, 11, 28, 13, 14, 15, 31, 17, 23, 19, 22, 31, 30, 23, 60, 31, 26, 31, 28, 29, 62, 31, 63, 47, 54, 47, 55, 37, 54, 55, 58, 41, 62, 43, 44, 45, 62, 47, 124, 57, 59, 55, 62, 53, 118, 55, 120, 63, 58, 59, 124, 61, 62, 63, 127, 83, 78, 67, 126, 95, 78, 71, 123, 73, 106, 123, 76, 95, 94, 79, 122, 121, 126, 83
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Array[BitOr[#, DivisorSigma[1, #] - #] &, 100] (* Paolo Xausa, Mar 11 2024 *)
  • PARI
    A318456(n) = bitor(n,sigma(n)-n);
    
  • Python
    from sympy import divisor_sigma
    def A318456(n): return n|divisor_sigma(n)-n # Chai Wah Wu, Jul 01 2022

Formula

a(n) = A003986(n, A001065(n)).
a(n) = A000203(n) - A318458(n).

A324866 a(n) = A156552(n) OR A324865(n), where OR is bitwise-OR, A003986.

Original entry on oeis.org

0, 1, 3, 3, 7, 5, 15, 7, 6, 13, 31, 11, 63, 17, 10, 15, 127, 13, 255, 19, 23, 47, 511, 23, 28, 83, 14, 47, 1023, 31, 2047, 31, 54, 175, 22, 31, 4095, 257, 78, 55, 8191, 37, 16383, 67, 30, 799, 32767, 47, 60, 31, 250, 131, 65535, 29, 55, 71, 270, 1301, 131071, 43, 262143, 2735, 54, 63, 126, 95, 524287, 303, 774, 41, 1048575, 55
Offset: 1

Views

Author

Antti Karttunen, Mar 18 2019

Keywords

Crossrefs

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A318456(n) = bitor(n,sigma(n)-n);
    A324866(n) = if(1==n,0,A318456(A156552(n)));
    
  • PARI
    A324866(n) = { my(k=A156552(n)); bitor(k,(A323243(n)-k)); }; \\ Needs also code from A323243.

Formula

a(1) = 0; for n > 1, a(n) = A318456(A156552(n)).
a(n) = A156552(n) OR (A323243(n) - A156552(n)).

A318466 a(n) = 2*n OR A000203(n), where OR is bitwise-or (A003986) and A000203 = sum of divisors.

Original entry on oeis.org

3, 7, 6, 15, 14, 12, 14, 31, 31, 22, 30, 28, 30, 28, 30, 63, 50, 39, 54, 42, 42, 44, 62, 60, 63, 62, 62, 56, 62, 124, 62, 127, 114, 118, 118, 91, 110, 124, 126, 90, 122, 116, 126, 92, 94, 92, 126, 124, 123, 125, 110, 106, 126, 124, 110, 120, 114, 126, 126, 248, 126, 124, 126, 255, 214, 148, 198, 254, 234, 156, 206
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Array[BitOr[2 #, DivisorSigma[1, #]] &, 71] (* Michael De Vlieger, Mar 30 2019 *)
  • PARI
    A318466(n) = bitor(2*n,sigma(n));
    
  • Python
    from sympy import divisor_sigma
    def A318466(n): return (n<<1)|int(divisor_sigma(n)) # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A003986(2*n, A000203(n)).
a(n) = A224880(n) - A318468(n).

A283986 a(n) = A002487(n-1) OR A002487(n), where OR is bitwise-or (A003986).

Original entry on oeis.org

1, 1, 3, 3, 3, 3, 3, 3, 5, 7, 7, 7, 7, 7, 7, 5, 5, 5, 7, 7, 11, 13, 7, 7, 7, 7, 13, 11, 7, 7, 5, 5, 7, 7, 13, 13, 15, 15, 15, 11, 11, 11, 13, 13, 13, 15, 15, 11, 11, 15, 15, 13, 13, 13, 11, 11, 11, 15, 15, 15, 13, 13, 7, 7, 7, 7, 15, 15, 15, 15, 13, 13, 15, 15, 27, 23, 23, 27, 15, 15, 15, 15, 27, 27, 29, 29, 31, 23, 21, 29, 31, 23, 23, 25, 11, 11, 11, 11, 25
Offset: 1

Views

Author

Antti Karttunen, Mar 21 2017

Keywords

Crossrefs

Odd bisection of A283976.
Cf. A283973 (positions where coincides with A007306, equally, with A283987).

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ@ n, a[n/2], a[(n - 1)/2] + a[(n + 1)/2]]; Table[BitOr[a[n - 1], a@ n], {n, 120}] (* Michael De Vlieger, Mar 22 2017 *)
  • PARI
    A(n) = if(n<2, n, if(n%2, A(n\2) + A((n + 1)/2), A(n/2)));
    for(n=1, 101, print1(bitor(A(n - 1), A(n))", ")) \\ Indranil Ghosh, Mar 23 2017
    
  • Python
    from functools import reduce
    def A283986(n): return sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0)))|sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n-1)[-1:2:-1],(1,0))) # Chai Wah Wu, May 05 2023
  • Scheme
    (define (A283986 n) (A003986bi (A002487 (- n 1)) (A002487 n))) ;; Where A003986bi implements bitwise-OR (A003986).
    

Formula

a(n) = A002487(n-1) OR A002487(n), where OR is bitwise-or (A003986).
a(n) = A283987(n) + A283988(n).
a(n) = A007306(n) - A283988(n).
a(n) = A283976((2*n)-1).

A324727 Odd numbers such that 2n is equal to A318466(n), bitor(2*n,sigma(n)), where bitor is A003986.

Original entry on oeis.org

3, 7, 15, 21, 31, 55, 57, 63, 93, 105, 111, 127, 171, 189, 201, 213, 215, 217, 231, 237, 249, 253, 255, 315, 351, 357, 363, 369, 381, 393, 447, 465, 469, 473, 483, 489, 497, 501, 511, 651, 705, 747, 759, 789, 813, 831, 833, 879, 889, 895, 917, 959, 987, 989, 1001, 1015, 1023, 1155, 1365, 1377, 1407, 1467, 1491, 1503, 1505, 1515, 1533, 1595
Offset: 1

Views

Author

Antti Karttunen, Mar 15 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 2000, 2], 2*# == BitOr[2*#, DivisorSigma[1, #]] &] (* Paolo Xausa, Mar 11 2024 *)
  • PARI
    for(n=1,oo,if((n%2)&&((2*n)==bitor(2*n,sigma(n))),print1(n,", ")));

A318506 a(n) = A032742(n) OR A001065(n)-A032742(n), where OR is bitwise-or (A003986) and A001065 = sum of proper divisors and A032742 = the largest proper divisor of n.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 7, 3, 7, 1, 14, 1, 7, 5, 15, 1, 13, 1, 14, 7, 11, 1, 28, 5, 15, 13, 14, 1, 31, 1, 31, 15, 19, 7, 55, 1, 19, 13, 30, 1, 53, 1, 22, 31, 23, 1, 60, 7, 27, 21, 30, 1, 63, 15, 60, 23, 31, 1, 94, 1, 31, 21, 63, 15, 45, 1, 58, 23, 39, 1, 119, 1, 39, 25, 62, 11, 55, 1, 106, 31, 43, 1, 106, 23, 43, 29, 60, 1, 111, 13, 62, 31
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2018

Keywords

Crossrefs

Programs

Formula

a(n) = A003986(A032742(n), A318505(n)).
For n > 1, a(n) = A001065(n) - A318508(n).

A286098 Square array read by antidiagonals: A(n,k) = T(n AND k, n OR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and OR is bitwise-or (A003986).

Original entry on oeis.org

0, 1, 1, 3, 4, 3, 6, 6, 6, 6, 10, 11, 12, 11, 10, 15, 15, 17, 17, 15, 15, 21, 22, 21, 24, 21, 22, 21, 28, 28, 28, 28, 28, 28, 28, 28, 36, 37, 38, 37, 40, 37, 38, 37, 36, 45, 45, 47, 47, 49, 49, 47, 47, 45, 45, 55, 56, 55, 58, 59, 60, 59, 58, 55, 56, 55, 66, 66, 66, 66, 70, 70, 70, 70, 66, 66, 66, 66, 78, 79, 80, 79, 78, 83, 84, 83, 78, 79, 80, 79, 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,  4,   6,  11,  15,  22,  28,  37,  45,  56,  66,  79,  91
   3,  6,  12,  17,  21,  28,  38,  47,  55,  66,  80,  93, 105
   6, 11,  17,  24,  28,  37,  47,  58,  66,  79,  93, 108, 120
  10, 15,  21,  28,  40,  49,  59,  70,  78,  91, 105, 120, 140
  15, 22,  28,  37,  49,  60,  70,  83,  91, 106, 120, 137, 157
  21, 28,  38,  47,  59,  70,  84,  97, 105, 120, 138, 155, 175
  28, 37,  47,  58,  70,  83,  97, 112, 120, 137, 155, 174, 194
  36, 45,  55,  66,  78,  91, 105, 120, 144, 161, 179, 198, 218
  45, 56,  66,  79,  91, 106, 120, 137, 161, 180, 198, 219, 239
  55, 66,  80,  93, 105, 120, 138, 155, 179, 198, 220, 241, 261
  66, 79,  93, 108, 120, 137, 155, 174, 198, 219, 241, 264, 284
  78, 91, 105, 120, 140, 157, 175, 194, 218, 239, 261, 284, 312
		

Crossrefs

Cf. A000217 (row 0 & column 0), A084263 (seems to be row 1 & column 1), A046092 (main diagonal).
Cf. also arrays A286099, A286101, A286102, A286108.

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitAnd[n, k],BitOr[n,  k]]; Table[A[n - k, k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 21 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(0, 21): print([A(k, n - k) for k in range(0, n + 1)]) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286098 n) (A286098bi (A002262 n) (A025581 n)))
    (define (A286098bi row col) (let ((a (A004198bi row col)) (b (A003986bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003986bi and A004198bi implement bitwise-OR (A003986) and bitwise-AND (A004198).
    

Formula

A(n,k) = T(A004198(n,k), A003986(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, ...].

A286099 Square array read by antidiagonals: A(n,k) = T(n OR k, n AND k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and OR is bitwise-or (A003986).

Original entry on oeis.org

0, 2, 2, 5, 4, 5, 9, 9, 9, 9, 14, 13, 12, 13, 14, 20, 20, 18, 18, 20, 20, 27, 26, 27, 24, 27, 26, 27, 35, 35, 35, 35, 35, 35, 35, 35, 44, 43, 42, 43, 40, 43, 42, 43, 44, 54, 54, 52, 52, 50, 50, 52, 52, 54, 54, 65, 64, 65, 62, 61, 60, 61, 62, 65, 64, 65, 77, 77, 77, 77, 73, 73, 73, 73, 77, 77, 77, 77, 90, 89, 88, 89, 90, 85, 84, 85, 90, 89, 88, 89, 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,   4,   9,  13,  20,  26,  35,  43,  54,  64,  77,  89, 104
   5,   9,  12,  18,  27,  35,  42,  52,  65,  77,  88, 102, 119
   9,  13,  18,  24,  35,  43,  52,  62,  77,  89, 102, 116, 135
  14,  20,  27,  35,  40,  50,  61,  73,  90, 104, 119, 135, 148
  20,  26,  35,  43,  50,  60,  73,  85, 104, 118, 135, 151, 166
  27,  35,  42,  52,  61,  73,  84,  98, 119, 135, 150, 168, 185
  35,  43,  52,  62,  73,  85,  98, 112, 135, 151, 168, 186, 205
  44,  54,  65,  77,  90, 104, 119, 135, 144, 162, 181, 201, 222
  54,  64,  77,  89, 104, 118, 135, 151, 162, 180, 201, 221, 244
  65,  77,  88, 102, 119, 135, 150, 168, 181, 201, 220, 242, 267
  77,  89, 102, 116, 135, 151, 168, 186, 201, 221, 242, 264, 291
  90, 104, 119, 135, 148, 166, 185, 205, 222, 244, 267, 291, 312
		

Crossrefs

Cf. A000096 (row 0 & column 0), A162761 (seems to be row 1 & column 1), A046092 (main diagonal).
Cf. also arrays A286098, A286101, A286102, A286109.

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitOr[n, k],BitAnd[n,  k]]; Table[A[n - k, k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 21 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(0, 21): print([A(k, n - k) for k in range(0, n + 1)]) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286099 n) (A286099bi (A002262 n) (A025581 n)))
    (define (A286099bi row col) (let ((a (A003986bi row col)) (b (A004198bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003986bi and A004198bi implement bitwise-OR (A003986) and bitwise-AND (A004198).
    

Formula

A(n,k) = T(A003986(n,k), 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, ...].

A318516 a(n) = A032742(n) OR n-A032742(n), where OR is bitwise-or (A003986) and A032742 = the largest proper divisor of n.

Original entry on oeis.org

1, 1, 3, 2, 5, 3, 7, 4, 7, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 15, 11, 23, 12, 21, 13, 27, 14, 29, 15, 31, 16, 31, 17, 31, 18, 37, 19, 31, 20, 41, 21, 43, 22, 31, 23, 47, 24, 47, 25, 51, 26, 53, 27, 47, 28, 55, 29, 59, 30, 61, 31, 63, 32, 61, 33, 67, 34, 63, 35, 71, 36, 73, 37, 59, 38, 75, 39, 79, 40, 63, 41, 83, 42
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2018

Keywords

Crossrefs

Programs

Formula

a(n) = A003986(A032742(n), A060681(n)).
a(n) = n - A318518(n).

A324719 Odd numbers n for which bitor(2n,sigma(n)) = 2*bitor(n,sigma(n)-n), where bitor is bitwise-OR, A003986.

Original entry on oeis.org

3, 7, 15, 27, 31, 51, 55, 63, 111, 119, 123, 125, 127, 219, 255, 411, 447, 485, 493, 495, 505, 511, 735, 765, 771, 831, 879, 927, 959, 965, 985, 1011, 1023, 1563, 1587, 1611, 1731, 1779, 1791, 1799, 1887, 1921, 1923, 1945, 1975, 1983, 1991, 2019, 2031, 2041, 2043, 2045, 2047, 3099, 3183, 3231, 3279, 3291, 3327, 3459, 3535, 3579
Offset: 1

Views

Author

Antti Karttunen, Mar 14 2019

Keywords

Comments

Odd numbers n for which 2*A318456(n) = A318466(n).
If there are no common terms with A324718, then there are no odd perfect numbers.
The following subsequence of terms k are those with sigma(k) == 2 (mod 4): 3725, 7281, 15325, 24525, 25713, 32481, 51633, 52209, 59121, 63553, 114417, 117009, 120753, 121725, 122725, 123245, 130833, 208881, 236925, 241325, 245725, 253325, 261297, 384993, 411633, 457713, 468081, 482481, 482525, 482725, 483325, ..., and are thus present in A191218.

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 10^4, 2], Block[{s = DivisorSigma[1, #]}, BitOr[2*#, s] == 2* BitOr[#, s-#]] &] (* Paolo Xausa, Mar 11 2024 *)
  • PARI
    for(n=1,oo,if((n%2) && (2*(bitor(n, sigma(n)-n))==bitor(n+n, sigma(n))),print1(n,", ")));
Showing 1-10 of 82 results. Next