A145830 Indices for which A145768 (XOR of squares of the numbers 1...n) is a power of 2.
1, 7, 9, 16, 47, 63
Offset: 1
Crossrefs
Programs
-
Mathematica
Position[ FoldList[ BitXor, 0, Range[10^6]^2], n_ /; IntegerQ[Log[2, n]]] - 1 // Flatten (* Jean-François Alcover, Sep 30 2013 *)
-
PARI
an=0; for( i=1,10^6, an=bitxor(an,i^2); an & an==1<
Comments