A263277 First differences of A263276; length of n-th run of terms of same parity in A259934.
21, 3, 8480, 1356, 18162, 149, 78495, 291, 1194707, 8567, 1426107, 4090, 6029619, 59748, 325034101, 95590
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
N:= 10^4: # to get "guaranteed unique" terms <= N S:= Vector(N,datatype=integer[1]): for n from N+1 to 2*N do k:= n - numtheory:-tau(n); if k <= N then S[k]:= S[k]+1; B[k]:= n; fi; od: for n from N to 3 by -1 do if S[n] >= 1 then k:= n - numtheory:-tau(n); S[k]:= S[k]+1; B[k]:= n; fi od: A[0]:= 0: A[1]:= 2: for n from 2 do b:= B[A[n-1]]; if b > N or S[b] > 1 then break fi; A[n]:= b; od: seq(A[i],i=0..n-1); # Robert Israel, Jul 09 2015
NN = 10^4; (* to get "guaranteed unique" terms <= NN *) Clear[A, B, S]; S[]=0; For[n = NN+1, n <= 2*NN, n++, k = n-DivisorSigma[0, n]; If[k <= NN, S[k] = S[k]+1; B[k]=n]]; For[n=NN, n >= 3, n--, If[S[n] >= 1 , k = n-DivisorSigma[0, n]; S[k] = S[k]+1; B[k]=n]]; A[0]=0; A[1]=2; For[n=2, True, n++, b = B[A[n-1]]; If[b>NN || S[b]>1, Break[]]; A[n]=b]; Table[A[i], {i, 0, n-1}] (* _Jean-François Alcover, Jul 22 2015, after Robert Israel *)
Comments