login
A113512
Number of preceding primes or nonprimes whichever is greater.
0
0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 15, 16, 17, 17, 17, 17, 18, 18, 19, 19, 20, 20, 21, 22, 23, 23, 23, 23, 24, 24, 25, 26, 27, 28, 29, 29, 29, 29, 29, 29, 30, 30, 31, 31, 32, 32, 33, 34, 35, 36, 37, 37, 37, 37, 37, 37
OFFSET
1,3
COMMENTS
a(1) = 0, a(n) = if 2*m+1 > n then m else n-m-1, where m = number of occurrences of primes in a(k) for k<n;
for k>1: prime(k) occurs consecutively exactly A001223(k)=prime(k)-prime(k-1) times; the nonnegative integers (A001477) are a subsequence.
CROSSREFS
Sequence in context: A357604 A090702 A029124 * A338624 A194169 A194165
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 12 2006
STATUS
approved