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.

A008318 Smallest number strictly greater than previous one which is the sum of squares of two previous distinct terms (a(1)=1, a(2)=2).

This page as a plain text file.
%I A008318 #44 Feb 16 2025 08:32:32
%S A008318 1,2,5,26,29,677,680,701,842,845,866,1517,458330,458333,458354,459005,
%T A008318 459170,462401,462404,462425,463076,463241,491402,491405,491426,
%U A008318 492077,492242,708965,708968,708989,709640,709805,714026,714029,714050,714701
%N A008318 Smallest number strictly greater than previous one which is the sum of squares of two previous distinct terms (a(1)=1, a(2)=2).
%C A008318 A003095 is a subsequence apart from the initial term. - _Reinhard Zumkeller_, Jan 17 2008
%C A008318 The subsequence of primes begins: 2, 5, 29, 677, 701, 458333, 462401, 492077, 708989, 714029, ... - _Jonathan Vos Post_, Nov 21 2012
%D A008318 F. Smarandache, Definitions solved and unsolved problems, conjectures and theorems in number theory and geometry, edited by M. Perez, Xiquan Publishing House 2000
%D A008318 F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.
%H A008318 T. D. Noe, <a href="/A008318/b008318.txt">Table of n, a(n) for n=1..1000</a>
%H A008318 Mihaly Bencze [Beneze], <a href="http://www.gallup.unm.edu/~smarandache/mihalyb.htm">Smarandache Recurrence Type Sequences</a>, in Bull. Pure Appl. Sciences, Vol. 16E, No. 2, 231-236, 1997.
%H A008318 F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/Definitions-book.pdf">Definitions, Solved and Unsolved Problems, Conjectures, ...</a>
%H A008318 F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/Sequences-book.pdf">Sequences of Numbers Involved in Unsolved Problems</a>.
%H A008318 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SmarandacheSequences.html">Smarandache Sequences.</a>
%t A008318 a[1]=1; a[2]=2; a[n_] := a[n] = First[ Select[ Sort[ Flatten[ Table[a[j]^2 + a[k]^2, {j, 1, n-1}, {k, j+1, n-1}]]], # > a[n-1] & , 1]]; Table[a[n], {n, 1, 36}](* _Jean-François Alcover_, Nov 10 2011 *)
%o A008318 (Haskell)
%o A008318 import Data.Set (singleton, deleteFindMin, insert)
%o A008318 a008318 n = a008318_list !! (n-1)
%o A008318 a008318_list = f [1] (singleton 1) where
%o A008318    f xs s =
%o A008318      m : f (m:xs) (foldl (flip insert) s' (map (+ m^2) (map (^ 2) xs)))
%o A008318      where (m,s') = deleteFindMin s
%o A008318 -- _Reinhard Zumkeller_, Aug 15 2011
%Y A008318 Cf. A192476.
%K A008318 nonn,easy,nice
%O A008318 1,2
%A A008318 R. Muller
%E A008318 More terms from _David W. Wilson_