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.

A283974 Numbers n for which A002487(n-1) AND A002487(n) > 0 where AND is bitwise-and (A004198).

Original entry on oeis.org

2, 5, 6, 7, 8, 11, 14, 17, 18, 19, 20, 23, 24, 25, 26, 29, 30, 31, 32, 34, 35, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 86, 89, 92, 95, 96, 97, 98, 101, 104, 107, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120
Offset: 1

Views

Author

Antti Karttunen, Mar 21 2017

Keywords

Comments

Numbers n such that the binary representations of A002487(n-1) and A002487(n) have at least one 1-bit in a common shared position.

Crossrefs

Cf. A283973 (complement).
Positions of nonzeros in A283988.

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ@ n, a[n/2], a[(n - 1)/2] + a[(n + 1)/2]]; Flatten@ Position[Table[BitAnd[a[n - 1], a@ n], {n, 120}], k_ /; k > 0] (* 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)));
    D(n) = if(n<1, 1, sum(k=0, n, binomial(n + k - 1, 2*k)%2))
    for(n=1, 120, if(bitor(A(n - 1), A(n)) != D(n), print1(n, ", "))) \\ Indranil Ghosh, Mar 23 2017