login
A341348
Runlengths of A341346.
2
1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 1, 2, 4, 3, 3, 3, 1, 1, 1, 1, 2, 3, 2, 1, 2, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 3, 1, 4, 1, 3, 3, 1, 4, 1, 1, 2, 1, 6, 2, 1, 1, 2, 2, 2, 3, 4, 2, 3, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 1, 1, 2, 2, 2, 3, 3, 4, 1, 1, 2, 1, 1, 1, 4, 1, 5, 3, 1
OFFSET
1,5
COMMENTS
Records 1, 2, 3, 4, 7, 8, 11, 12, 14, 15, 19, 23, ..., occur at n = 1, 5, 14, 21, 51, 162, 319, 851, 1543, 6568, 91616, 608928, ...
EXAMPLE
A341346 begins as 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, ...,
thus this sequence begins as 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 3, 2, ...
PROG
(PARI)
up_to = 65537;
A003961(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); }; \\ From A003961
A341346(n) = (((A003961(n+n-1)+1)/2)%3);
A341348lista(up_to) = { my(v=vector(up_to), r=1, n=0, i=2, pb=1, b); while(n<up_to, b = A341346(i); if(b==pb, r++, n++; v[n] = r; r = 1; pb = b); i++); (v); };
v341348 = A341348lista(up_to);
A341348(n) = v341348[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 10 2021
STATUS
approved