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.

A007697 Smallest odd number expressible in at least n ways as p+2*m^2 where p is 1 or a prime and m >= 0.

This page as a plain text file.
%I A007697 M2292 #42 Aug 05 2023 06:26:29
%S A007697 1,3,13,19,55,61,139,139,181,181,391,439,559,619,619,829,859,1069,
%T A007697 1081,1459,1489,1609,1741,1951,2029,2341,2341,3331,3331,3331,3961,
%U A007697 4189,4189,4261,4801,4801,5911,5911,5911,6319,6319,6319,8251,8251,8251,8251,8251
%N A007697 Smallest odd number expressible in at least n ways as p+2*m^2 where p is 1 or a prime and m >= 0.
%D A007697 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A007697 Donovan Johnson, <a href="/A007697/b007697.txt">Table of n, a(n) for n = 1..10000</a>
%H A007697 G. H. Hardy and J. E. Littlewood, <a href="https://doi.org/10.1007/BF02403921">Some problems of 'Partitio numerorum'; III: On the expression of a number as a sum of primes</a>, Acta Math., Vol. 44, No. 1 (1923), pp. 1-70.
%H A007697 L. Hodges, <a href="https://www.jstor.org/stable/2690477">A lesser-known Goldbach conjecture</a>, Math. Mag., 66 (1993), 45-47.
%H A007697 M. Stern, <a href="http://www.numdam.org/item/NAM_1856_1_15__23_0/">Sur une assertion de Goldbach relative aux nombres impairs</a>, Nouvelles Annales Math., 15 (1856) pp. 23-24.
%H A007697 <a href="/index/Go#Goldbach">Index entries for sequences related to Goldbach conjecture</a>
%t A007697 max = 9000; sp = Outer[Plus, Prepend[Prime /@ Range[PrimePi[max]], 1], 2*Range[0, Ceiling[Sqrt[max/2]]]^2] // Flatten // Sort // Split;
%t A007697 a[1] = 3; a[n_] := (sel = Select[sp, Length[#] >= n &];
%t A007697 If[sel == {}, {}, sel[[1, 1]]]); a /@ Range[47]
%t A007697 (* _Jean-François Alcover_, Apr 29 2011 *)
%o A007697 (Haskell)
%o A007697 import Data.List (findIndex)
%o A007697 import Data.Maybe (fromJust)
%o A007697 a007697 n = 2 * (fromJust $ findIndex (>= n) a046921_list) + 1
%o A007697 -- _Reinhard Zumkeller_, Apr 03 2013
%Y A007697 Cf. A016067, A046921.
%K A007697 nonn,nice,easy
%O A007697 1,2
%A A007697 _N. J. A. Sloane_
%E A007697 Stern and Hardy-Littlewood references suggested by _Ctibor O. Zizka_, Apr 14 2008
%E A007697 Edited by _N. J. A. Sloane_, May 15 2008 at the suggestion of _R. J. Mathar_
%E A007697 a(1) changed to 1 at the suggestion of _Donovan Johnson_ by _N. J. A. Sloane_, May 10 2011