login
A269862
Least monotonic left inverse of A269861.
2
0, 0, 0, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 15, 15, 16, 16, 17, 18, 19, 20, 21, 22, 22, 22, 23, 23, 23, 24, 25, 26, 26, 27, 28, 29, 30, 30, 30, 31, 31, 32, 33, 34, 34, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37, 38, 38, 38, 39, 39, 39, 39, 40, 41
OFFSET
1,5
COMMENTS
a(n) = number of terms of A269861 <= n.
LINKS
FORMULA
a(1) = 0, for n > 1, a(n) = (A048673(n)-n reduced mod 2) + a(n-1).
Other identities. For all n >= 1:
a(A269861(n)) = n.
MATHEMATICA
f[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; s = Select[Range@ 150, Xor[EvenQ@ f@ #, EvenQ@ #] &]; Table[Count[s, k_ /; k <= n], {n, 87}] (* Michael De Vlieger, Mar 17 2016 *)
PROG
(Scheme, with memoization-macro definec)
(definec (A269862 n) (if (<= n 1) 0 (+ (modulo (- (A048673 n) n) 2) (A269862 (- n 1)))))
CROSSREFS
Sequence in context: A229803 A029123 A025777 * A194200 A242736 A194237
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved