login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A379783
For n >= 2, let b(n) = 1 if A379899(n) is 3 mod 4, 0 if A379899(n) is 1 mod 4; form the RUNS transform of {b(n), n >= 2}.
3
3, 7, 19, 42, 116, 292, 791, 2085, 5692, 15482, 42709, 118272, 329891, 923905, 2600458, 7344965, 20818129
OFFSET
1,1
COMMENTS
If instead of A379899 we begin with the primes >= 2 in their natural order, the {b(n), n >= 2} sequence is 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, ..., with RUNS transform 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 3, 2, ..., (a dramatically different sequence, essentially A091237).
EXAMPLE
A379899 begins 2, 3, 7, 11, 5, 13, 17, 29, 37, 41, 53, 19, ..., and the {b(n), n >= 2} sequence begins 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, ..., whose RUNS transform is 3, 7, 19, 42, ...
MATHEMATICA
nn = 2^20; c[_] := True; j = 3; q = 0; r = 1; s = 4;
Monitor[Reap[
Do[m = j + s;
While[k = SelectFirst[FactorInteger[m][[All, 1]], c]; !IntegerQ[k],
m += s];
c[k] = False; j = k;
If[# == r, q++, r = #; Sow[q]; q = 1] &[(Mod[k, 4] - 1)/2],
{n, nn}] ][[-1, 1]], n] (* Michael De Vlieger, Jan 11 2025 *)
CROSSREFS
See also A379652, A379785.
Sequence in context: A292775 A282024 A356617 * A086519 A090689 A145476
KEYWORD
nonn,more
AUTHOR
N. J. A. Sloane, Jan 11 2025
EXTENSIONS
a(10)-a(17) from Michael De Vlieger, Jan 11 2025
STATUS
approved