A039659 Erroneous version of A039919.
0, 1, 5, 21, 50, 355
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.
L(n) = my(x = 'x + O('x^(n+4))); polcoeff((1+x)*(1-3*x^2-sqrt(1-6*x^2+5*x^4))/(2*x^2*(1-x)), n); \\ A039658 Lp(n) = my(x = 'x + O('x^(n+4))); polcoeff((1+x)*(1-6*x^2+7*x^4-(1-3*x^2)*sqrt(1-6*x^2+5*x^4))/(2*x^4*(1-x)), n); \\ A039660 M(n)= my(A); if( n<1, 0, n--; A = O(x); for( k = 0, n\2, A = 1 / (1 - x - x^2 / (1 + x - x^2 * A))); polcoeff( A, n)); \\ A055879 N(n) = polcoeff( (1 - x - sqrt(1 - 6*x + 5*x^2 + x^2 * O(x^n))) / 2, n+1); \\ A002212 Mp(n) = N(n) - sum(j=0, n-1, N(j)); \\ A039919 b(n) = N(n+3) - 6*N(n+2) - Mp(floor((n+1)/2)) + (41*N(n+1)-21*N(n)-L(n))/4 - (M(n+3)-M(n+2)+M(n)-if (!(n%2),M(n/2))+Lp(n))/2; a(n) = if (n<=4, 0, b(n-4)); \\ Michel Marcus, Apr 05 2020
Groups of runs in A007775 are (1), (7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47), (49), (53, 59, 61, 67, 71, 73), (77), (79, 83,...), which is 1 nonprime followed by 12 primes followed by 1 nonprime followed by 6 primes etc.
A007775 := proc(n) option remember ; local a; if n = 1 then 1; else for a from A007775(n-1)+1 do if a mod 2 <>0 and a mod 3 <>0 and a mod 5 <> 0 then RETURN(a) ; fi ; od: fi ; end: A := proc() local al,isp,n; al := 0: isp := false ; n := 1: while n< 300 do a := A007775(n) ; if isprime(a) <> isp then printf("%d,",al) ; al := 1; isp := not isp ; else al := al+1 ; fi ; n := n+1: od: end: A() ; # R. J. Mathar, Jun 16 2008
For n=1, the 8 numbers 31 (r=1), 37 (r=7), 41 (r=11), 43 (r=17), 47 (r=17), 49 (r=19), 53 (r=23) and 59 (r=29) are prime, prime, prime, prime, prime, nonprime, prime, prime, prime, which is rendered into the binary 000100000 = 2^5=32=a(1).
T(3,3)=4 because we have UUUDDD, UUUDLD, UUUDDL and UUUDLL. Triangle starts: 1; 1, 2; 3, 3, 4; 10, 10, 8, 8; 36, 36, 29, 20, 16;
g:=(1-z-sqrt(1-6*z+5*z^2))/2/z: G:=t*z*g/(1-t*z-t*z*g): Gser:=simplify(series(G,z=0,15)): for n from 1 to 11 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 1 to 11 do seq(coeff(P[n],t,j),j=1..n) od; # yields sequence in triangular form
Comments