cp's OEIS Frontend

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.

A060395 Smallest prime that divides k^2 + k + n for k = 0, 1, 2, ....

This page as a plain text file.
%I A060395 #13 Aug 15 2022 08:35:08
%S A060395 2,3,2,3,2,5,2,3,2,3,2,11,2,3,2,3,2,17,2,3,2,3,2,5,2,3,2,3,2,5,2,3,2,
%T A060395 3,2,5,2,3,2,3,2,41,2,3,2,3,2,7,2,3,2,3,2,5,2,3,2,3,2,5,2,3,2,3,2,5,2,
%U A060395 3,2,3,2,7,2,3,2,3,2,7,2,3,2,3,2,5,2,3,2,3,2,5,2,3,2,3,2,5,2,3,2,3,2,11
%N A060395 Smallest prime that divides k^2 + k + n for k = 0, 1, 2, ....
%H A060395 Carlos Rivera, <a href="http://www.primepuzzles.net/conjectures/conj_017.htm">Conjecture 17. The Ludovicus conjecture about the Euler trinomials</a>, The Prime Puzzles & Problems Connection.
%F A060395 a(n)=2 if n is equal to 0, 2 or 4 modulo 6; a(n)=3 if n is equal to 1 or 3 modulo 6.
%e A060395 To obtain a(7), note that x^2+x+7 takes the values 7,9,13,19,... for k=0,1,2,... and the smallest prime dividing these numbers is 3.
%t A060395 a[n_] := Switch[n, 0, 2, 1, 3, _, Module[{f, kmax0 = 2}, f[kmax_] := f[kmax] = MinimalBy[Table[{k, FactorInteger[k^2 + k + n][[1, 1]]}, {k, 0, kmax}], Last, 1]; f[kmax = kmax0]; f[kmax = 2 kmax]; While[f[kmax] != f[kmax/2], kmax = 2 kmax]; f[kmax][[1, 2]]]];
%t A060395 Table[a[n], {n, 0, 101}] (* _Jean-François Alcover_, Aug 15 2022 *)
%Y A060395 Cf. A060380, A060392-A060398. A060396 gives values of k.
%K A060395 nonn,easy,nice
%O A060395 0,1
%A A060395 _N. J. A. Sloane_, Apr 04 2001
%E A060395 More terms from _Matthew Conroy_, Apr 18 2001