A270432 a(n) = number of terms A270430 <= n; least monotonic left inverse of A270430.
1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 8, 9, 10, 10, 10, 11, 12, 12, 12, 13, 13, 13, 13, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 22, 23, 24, 24, 25, 26, 27, 28, 28, 28, 28, 28, 28, 29, 30, 31, 31, 32, 33, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 36, 37, 37, 37, 38, 39, 39, 39, 39, 39, 40, 41, 41, 42, 42, 42, 43, 44, 45
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..35000
Programs
-
Mathematica
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@ 144, Xor[EvenQ@ f@ #, OddQ@ g@ #] &]; Table[Count[s, k_ /; k <= n], {n, 84}] (* Michael De Vlieger, Mar 17 2016 *)
Comments