OFFSET
1,1
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..2651
MATHEMATICA
nn = 2048; f[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; g[n_] := Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1]; s = Select[Range@ nn, Xor[EvenQ@ f@ #, OddQ@ g@ #] &]; t = Select[Range@ nn, Xor[EvenQ@ f@ #, EvenQ@ g@ #] &]; Flatten@ Position[Table[Count[s, k_ /; k <= n] - Count[t, k_ /; k <= n], {n, nn/2}], n_ /; n == 0] (* Michael De Vlieger, Mar 19 2016 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 17 2016
STATUS
approved