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.
%I A241529 #74 Feb 16 2025 08:33:22 %S A241529 2887,2969,3056,3220,3365,3464,3565,3611,3719,3746,3814,3836,3874, %T A241529 3879,3955,4142,4147,4211,4277,4371,4403,4483,4564,4572,4661,4730, %U A241529 4813,4881,4888,4902,4906,4965,4982,5132,5175,5208,5410,5431,5509,5527,5564,5624,5669 %N A241529 Positive numbers k such that k^2 + k + 41 is composite and there are no positive integers a,c,d such that k = c*a*z^2 + ((((d+2)*(1/3))*c-2)*a/d+1)*z + ((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2 - (((d-1)*(1/3))*c+1)/d)/c for an integer z. %C A241529 This sequence has a restriction involving 4 variables. More composite cases are described with a better restrictive expression. The expression for k(a,c,d,z) will force k^2 + k + 41 to be either a fraction or a composite number. %C A241529 The condition on k(a,c,d,z) was determined by quadratic curve fitting. It has been automated with the Maple Interactive() command. The ultimate motivation is to try to find a closed-from expression that generates all the composite cases of k^2 + k + 41 for integer k. %C A241529 What is the smallest value of n where this sequence's a(n) < 2n? (For A194634, this value is 2358.) - _J. Lowell_, Feb 25 2019 %D A241529 John Stillwell, Elements of Number Theory, Springer, 2003, page 3. %H A241529 Matt C. Anderson, <a href="/A241529/a241529.pdf">Graph of composite values for n^2 + n + 41 with a modular symmetry.</a> %H A241529 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Prime-GeneratingPolynomial.html">Prime-Generating Polynomial</a> %p A241529 # Euler considered the prime values for n^2 + n + 41; %p A241529 # This is a 76 second calculation on a 2.93 GHz machine %p A241529 h := n^2+n+41; %p A241529 y := c*a*z^2+((((d+2)*(1/3))*c-2)*a/d+1)*z+((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2-(((d-1)*(1/3))*c+1)/d)/c; %p A241529 y2 := subs(n = y, h); %p A241529 y3 := factor(y2); %p A241529 # note that y is an expression in 4 variables. %p A241529 # After a composition of functions, an algebraic factorization %p A241529 # can be observed in y3. As long as y3 is an integer, it will %p A241529 # be composite. This is because y3 factors and both factors %p A241529 # are integers bigger than one. %p A241529 maxn := 6000; %p A241529 A := {}: %p A241529 for n to maxn do %p A241529 g := n^2+n+41: %p A241529 if isprime(g) = false then A := `union`(A, {n}) end if : %p A241529 end do: %p A241529 # now the A set contains composite values of the form %p A241529 # n^2 + n + 41 less than maxn. %p A241529 c := 1: a := 1: d := 1: z := -1: p := 41: %p A241529 q := c*a*z^2+((((d+2)*(1/3))*c-2)*a/d+1)*z+((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2-(((d-1)*(1/3))*c+1)/d)/c: %p A241529 A2 := A: %p A241529 while q < maxn do %p A241529 while `and`(q < maxn, d < 100) do %p A241529 while q < maxn do while %p A241529 q < maxn do %p A241529 A2 := `minus`(A2, {q}); %p A241529 A2 := `minus`(A2, {c*a*z^2+((((d+2)*(1/3))*c-2)*a/d+1)*z+((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2-(((d-1)*(1/3))*c+1)/d)/c}); %p A241529 z := z+1; %p A241529 A2 := `minus`(A2, {c*a*z^2-((((d+2)*(1/3))*c-2)*a/d+1)*(1*z)+((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2-(((d-1)*(1/3))*c+1)/d)/c}); q := c*a*z^2+((((d+2)*(1/3))*c-2)*a/d+1)*z+((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2-(((d-1)*(1/3))*c+1)/d)/c %p A241529 end do; %p A241529 a := a+1; z := -1; %p A241529 q := c*a*z^2+((((d+2)*(1/3))*c-2)*a/d+1)*z+((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2-(((d-1)*(1/3))*c+1)/d)/c : %p A241529 end do; %p A241529 d := d+1: a := 1: %p A241529 q := c*a*z^2+((((d+2)*(1/3))*c-2)*a/d+1)*z+((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2-(((d-1)*(1/3))*c+1)/d)/c : %p A241529 end do: %p A241529 c := c+1: d := 1: %p A241529 q := c*a*z^2+((((d+2)*(1/3))*c-2)*a/d+1)*z+((((367*d^2+d+1)*(1/9))*c^2-((d+2)*(1/3))*c+1)*a/d^2-(((d-1)*(1/3))*c+1)/d)/c : %p A241529 end do: %p A241529 A2; %p A241529 # _Matt C. Anderson_, May 13 2014 %Y A241529 Cf. A007634, A055390, A201998, and with division, A235381. %K A241529 nonn %O A241529 1,1 %A A241529 _Matt C. Anderson_, Apr 27 2014