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 31-40 of 155 results. Next

A268836 Antidiagonal sums of array A268714: a(n) = Sum_{k=0..n} A006068(n)+A006068(n-k).

Original entry on oeis.org

0, 2, 8, 12, 26, 38, 46, 56, 86, 114, 138, 164, 180, 198, 220, 240, 302, 362, 418, 476, 524, 574, 628, 680, 712, 746, 784, 820, 866, 910, 950, 992, 1118, 1242, 1362, 1484, 1596, 1710, 1828, 1944, 2040, 2138, 2240, 2340, 2450, 2558, 2662, 2768, 2832, 2898, 2968, 3036, 3114, 3190, 3262, 3336, 3430, 3522, 3610, 3700
Offset: 0

Views

Author

Antti Karttunen, Feb 15 2016

Keywords

Crossrefs

Cf. also A268837, A268721.
Partial sums of A268716.

Programs

  • Scheme
    (define (A268836 n) (add (lambda (k) (+ (A006068 k) (A006068 (- (+ n 0) k)))) 0 n))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

Formula

a(n) = Sum_{k=0..n} A006068(n)+A006068(n-k).

A268837 Antidiagonal sums of array A268715: a(n) = Sum_{k=0..n} A003188(A006068(n)+A006068(n-k)).

Original entry on oeis.org

0, 2, 7, 18, 17, 48, 56, 80, 67, 122, 136, 194, 204, 268, 281, 328, 291, 378, 396, 498, 510, 640, 675, 792, 790, 886, 965, 1098, 1093, 1208, 1248, 1344, 1227, 1378, 1356, 1530, 1538, 1792, 1815, 2016, 2008, 2218, 2339, 2602, 2619, 2892, 2970, 3208, 3150, 3294, 3385, 3586, 3691, 4012, 4174, 4440, 4367, 4554, 4644
Offset: 0

Views

Author

Antti Karttunen, Feb 15 2016

Keywords

Crossrefs

Cf. also A268720, A268836.

Programs

  • Scheme
    (define (A268837 n) (add (lambda (k) (A003188 (+ (A006068 k) (A006068 (- n k))))) 0 n))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

Formula

a(n) = Sum_{k=0..n} A003188(A006068(n)+A006068(n-k)).

A277812 a(n) = the first odious number encountered when starting from k = n and iterating the map k -> A003188(A006068(k)/2).

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 7, 8, 4, 2, 11, 1, 13, 14, 7, 16, 8, 4, 19, 2, 21, 22, 11, 1, 25, 26, 13, 28, 14, 7, 31, 32, 16, 8, 35, 4, 37, 38, 19, 2, 41, 42, 21, 44, 22, 11, 47, 1, 49, 50, 25, 52, 26, 13, 55, 56, 28, 14, 59, 7, 61, 62, 31, 64, 32, 16, 67, 8, 69, 70, 35, 4, 73, 74, 37, 76, 38, 19, 79, 2, 81, 82, 41, 84, 42, 21, 87, 88, 44, 22, 91, 11, 93, 94, 47, 1, 97, 98, 49, 100
Offset: 1

Views

Author

Antti Karttunen, Nov 03 2016

Keywords

Crossrefs

Cf. A277808 (gives the number of such iterations needed to reach a(n) from n).
Cf. A003945 (the positions of 1's in this sequence).

Formula

If A010060(n) = 1 [when n is one of the odious numbers, A000069], then a(n) = n, otherwise a(n) = a(A003188(A006068(n)/2)).
Other identities:
a(n) = A000069(A277813(n)).
If A010060(n) = 0 [when n is one of the evil numbers, A001969], then a(n)= a(A000265(n)) [the trailing zeros in binary expansion of n do not affect the result].
For all n >= 1, a(A000069(n)) = A000069(n). [By definition].
For all n > 1, a(A001969(n)) < A001969(n).

A283999 a(n) = A005187(n) XOR A006068(n), where XOR is bitwise-xor (A003987).

Original entry on oeis.org

0, 0, 0, 6, 0, 14, 14, 14, 0, 30, 30, 30, 30, 30, 18, 16, 0, 62, 62, 62, 62, 62, 50, 48, 62, 62, 34, 32, 34, 32, 44, 44, 0, 126, 126, 126, 126, 126, 114, 112, 126, 126, 98, 96, 98, 96, 108, 108, 126, 126, 66, 64, 66, 64, 76, 76, 66, 64, 92, 92, 92, 92, 92, 82, 0, 254, 254, 254, 254, 254, 242, 240, 254, 254, 226, 224, 226, 224, 236, 236, 254, 254, 194, 192, 194
Offset: 0

Views

Author

Antti Karttunen, Mar 20 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[BitXor[Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]], 2 n - DigitCount[2 n, 2, 1]], {n, 0, 84}] (* Michael De Vlieger, Mar 20 2017, after Jan Mangaldan at A006068 *)
  • PARI
    b(n) = if(n<1, 0, b(n\2) + n%2);
    A(n) = 2*n - b(2*n);
    a(n) = if(n<2, n, 2*a(floor(n/2)) + (n%2 + a(floor(n/2))%2)%2);
    for(n=0, 110, print1(bitxor(A(n),a(n)),", ")) \\ Indranil Ghosh, Mar 25 2017
    
  • Python
    def A(n): return 2*n - bin(2*n)[2:].count("1")
    def a(n): return n if n<2 else 2*a(n//2) + (n%2 + a(n//2)%2)%2
    print([A(n)^a(n) for n in range(111)]) # Indranil Ghosh, Mar 25 2017
  • Scheme
    (define (A283999 n) (A003987bi (A005187 n) (A006068 n))) ;; Where A003987bi implements bitwise-XOR (A003987).
    

Formula

a(n) = A005187(n) XOR A006068(n), where XOR is bitwise-xor (A003987).
a(n) = A006068(2*n) XOR A283997(2*n).

A286546 a(n) = A006068(n) - n.

Original entry on oeis.org

0, 0, 1, -1, 3, 1, -2, -2, 7, 5, 2, 2, -4, -4, -3, -5, 15, 13, 10, 10, 4, 4, 5, 3, -8, -8, -7, -9, -5, -7, -10, -10, 31, 29, 26, 26, 20, 20, 21, 19, 8, 8, 9, 7, 11, 9, 6, 6, -16, -16, -15, -17, -13, -15, -18, -18, -9, -11, -14, -14, -20, -20, -19, -21, 63, 61, 58, 58, 52, 52, 53, 51, 40, 40, 41, 39, 43, 41, 38, 38
Offset: 0

Views

Author

Antti Karttunen, May 18 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A006068(n) - n.
a(n) = -A286548(A006068(n)). - Antti Karttunen, Oct 02 2017

A286547 Restricted growth sequence of A286546 (A006068(n) - n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 18 2017

Keywords

Crossrefs

Programs

  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ Essentially Joerg Arndt's Jul 19 2012 code.
    A286546(n) = (A006068(n)-n);
    write_to_bfile(0,rgs_transform(vector(16384,n,A286546(n-1))),"b286547.txt");

A339696 Let G be the undirected graph with nodes {g_k, k >= 0} such that for any k >= 0, g_k is connected to g_{k+1} and g_{A006068(k)} is connected to g_{A006068(k+1)}; a(n) is the number of nodes at distance n from g_0.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 3, 6, 7, 6, 5, 8, 9, 10, 5, 8, 10, 16, 12, 15, 12, 12, 7, 14, 18, 18, 16, 20, 17, 18, 7, 14, 18, 18, 17, 25, 29, 33, 21, 28, 30, 31, 22, 25, 24, 22, 11, 18, 24, 38, 31, 39, 35, 37, 25, 42, 46, 37, 29, 37, 33, 30, 11, 18, 24, 38, 31, 39, 35
Offset: 0

Views

Author

Rémy Sigrist, Dec 13 2020

Keywords

Crossrefs

A339697 Square array T(n, k) read by antidiagonals, n >= 0 and k >= 0; let G be the undirected graph with nodes {g_k, k >= 0} such that for any k >= 0, g_k is connected to g_{k+1} and g_{A006068(k)} is connected to g_{A006068(k+1)}; T(n, k) is the distance between g_n and g_k.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Dec 13 2020

Keywords

Examples

			Array T(n, k) begins:
  n\k|  0  1  2  3  4  5  6  7  8  9  10  11  12
  ---+------------------------------------------
    0|  0  1  2  2  3  4  4  3  4  5   6   6   6
    1|  1  0  1  1  2  3  3  2  3  4   5   5   5
    2|  2  1  0  1  2  3  2  1  2  3   4   4   4
    3|  2  1  1  0  1  2  2  2  3  4   5   5   5
    4|  3  2  2  1  0  1  1  2  3  4   5   5   4
    5|  4  3  3  2  1  0  1  2  3  4   5   4   3
    6|  4  3  2  2  1  1  0  1  2  3   4   4   4
    7|  3  2  1  2  2  2  1  0  1  2   3   3   3
    8|  4  3  2  3  3  3  2  1  0  1   2   2   2
    9|  5  4  3  4  4  4  3  2  1  0   1   1   2
   10|  6  5  4  5  5  5  4  3  2  1   0   1   2
   11|  6  5  4  5  5  4  4  3  2  1   1   0   1
   12|  6  5  4  5  4  3  4  3  2  2   2   1   0
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, n) = 0.
T(n, k) = T(k, n).
T(n, k) <= abs(n-k).
T(m, k) <= T(m, n) + T(n, k).
T(n, 0) = A339695(n).

A268722 a(n) = A003188(3*A006068(n)), where A003188 is binary Gray code and A006068 is its inverse.

Original entry on oeis.org

0, 2, 13, 5, 31, 27, 10, 8, 59, 63, 54, 52, 20, 22, 49, 17, 115, 119, 126, 124, 108, 110, 121, 105, 40, 42, 37, 45, 103, 99, 34, 32, 227, 231, 238, 236, 252, 254, 233, 249, 216, 218, 213, 221, 247, 243, 210, 208, 80, 82, 93, 85, 79, 75, 90, 88, 203, 207, 198, 196, 68, 70, 193, 65
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Crossrefs

Row 2 and column 2 of array A268725.

Programs

Formula

a(n) = A003188(3*A006068(n)).

A268723 Main diagonal of A268725: a(n) = A003188(A006068(n)^2), where A003188 is binary Gray code and A006068 is its inverse.

Original entry on oeis.org

0, 1, 13, 6, 41, 54, 24, 21, 145, 166, 216, 253, 96, 121, 69, 86, 545, 582, 664, 749, 864, 841, 949, 1014, 384, 433, 477, 486, 793, 278, 344, 357, 2113, 2182, 2328, 2509, 2656, 2793, 2901, 2998, 3456, 3537, 3901, 3366, 3641, 3798, 4056, 3973, 1536, 1633, 1709, 1734, 1801, 1910, 1944, 2037, 3313, 3174, 1112, 1053
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Crossrefs

Main diagonal of array A268725.

Programs

Formula

a(n) = A003188(A000290(A006068(n))).
Previous Showing 31-40 of 155 results. Next