A384688 Runs of t in the range 0 <= t <= k and the same parity as k, for successive k >= 0.
0, 1, 0, 2, 1, 3, 0, 2, 4, 1, 3, 5, 0, 2, 4, 6, 1, 3, 5, 7, 0, 2, 4, 6, 8, 1, 3, 5, 7, 9, 0, 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 11, 0, 2, 4, 6, 8, 10, 12, 1, 3, 5, 7, 9, 11, 13, 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15, 0, 2, 4, 6, 8, 10, 12, 14, 16
Offset: 0
Examples
Runs and their corresponding k = A055086(n) begin, n = 0 1 2 4 6 9 a(n) = 0, 1, 0,2, 1,3, 0,2,4, 1,3,5, ... A055086(n) = 0, 1, 2,2, 3,3, 4,4,4, 5,5,5, ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..5001
Crossrefs
Programs
-
Mathematica
ClearAll[a] a[n_Integer]:=Module[{s,r},s=Floor[Sqrt[n]]; r=n-s^2; If[r
Vincenzo Librandi, Jul 06 2025 *) -
PARI
a(n) = my(r,s=sqrtint(n,&r)); if(r
Comments