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.

A004210 "Magic" integers: a(n+1) is the smallest integer m such that there is no overlap between the sets {m, m-a(i), m+a(i): 1 <= i <= n} and {a(i), a(i)-a(j), a(i)+a(j): 1 <= j < i <= n}.

This page as a plain text file.
%I A004210 M2728 #49 Feb 16 2025 08:32:28
%S A004210 1,3,8,18,30,43,67,90,122,161,202,260,305,388,416,450,555,624,730,750,
%T A004210 983,1059,1159,1330,1528,1645,1774,1921,2140,2289,2580,2632,2881,3158,
%U A004210 3304,3510,3745,4086,4563,4741,4928,5052,5407,5864,6242,6528,6739,7253
%N A004210 "Magic" integers: a(n+1) is the smallest integer m such that there is no overlap between the sets {m, m-a(i), m+a(i): 1 <= i <= n} and {a(i), a(i)-a(j), a(i)+a(j): 1 <= j < i <= n}.
%C A004210 The definition implies that the sets {a(i)} (A004210), {a(i)-a(j), j < i} (A206522) and {a(i)+a(j), j < i} (A206523) are disjoint. A206524 gives the complement of their union.
%D A004210 R. A. Bates, E. Riccomagno, R. Schwabe, H. P. Wynn, Lattices and dual lattices in optimal experimental design for Fourier models, Computational Statistics & Data Analysis Volume 28, Issue 3, 4 September 1998, Pages 283-296. See page 293.
%D A004210 D. R. Hofstadter, "Goedel, Escher, Bach: An Eternal Golden Braid", Basic Books Incorporated, p. 73
%D A004210 P. Mark Kayll, Well-spread sequences and edge-labelings with constant Hamiltonian weight, Disc. Math. & Theor. Comp. Sci 6 2 (2004) 401-408
%D A004210 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A004210 T. D. Noe, <a href="/A004210/b004210.txt">Table of n, a(n) for n = 1..150</a>
%H A004210 B. G. DeBoer, <a href="/A004210/a004210.pdf">Letter to N. J. A. Sloane</a>, Dec 15 1978, with enclosure of Silvertom article.
%H A004210 J. V. Silverton, <a href="http://dx.doi.org/10.1107/S0567739478001308">On the generation of 'magic integrals'</a>, Acta Cryst. A34 (1978) p. 634.
%H A004210 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MagicInteger.html">Magic Integer.</a>
%F A004210 a(n+1) = min{ k | k and k +- a(i) are not equal to a(i) or a(i)-a(j) or a(i)+a(j) for any n+1 > i > j > 0}. [Corrected by _T. D. Noe_, Sep 08 2008]
%t A004210 a[1] = 1; a[n_] := a[n] = Module[{pairs = Flatten[ Table[{a[j] + a[k], a[k] - a[j]}, {j, 1, n-1}, {k, j+1, n-1}]], an = a[n-1] + 1}, While[ True, If[ Intersection[ Join[ Array[a, n-1], pairs], Prepend[ Flatten[ Table[{a[j] + an, an - a[j]}, {j, 1, n-1}]], an]] == {}, Break[], an++]]; an]; Table[a[n], {n, 1, 48}] (* _Jean-François Alcover_, Nov 10 2011 *)
%o A004210 (Haskell)
%o A004210 import Data.List (intersect)
%o A004210 a004210 n = a004210_list !! (n-1)
%o A004210 a004210_list = magics 1 [0] [0] where
%o A004210    magics :: Integer -> [Integer] -> [Integer] -> [Integer]
%o A004210    magics n ms tests
%o A004210       | tests `intersect` nMinus == [] && tests `intersect` nPlus == []
%o A004210       = n : magics (n+1) (n:ms) (nMinus ++ nPlus ++ tests)
%o A004210       | otherwise
%o A004210       = magics (n+1) ms tests
%o A004210       where nMinus = map (n -) ms
%o A004210             nPlus  = map (n +) ms
%o A004210 -- magics works also as generator for a126428_list, cf. A126428.
%o A004210 -- _Reinhard Zumkeller_, Mar 03 2011
%Y A004210 Cf. A000969, A005228, A206522, A206523, A206524.
%K A004210 easy,nonn,nice
%O A004210 1,2
%A A004210 _N. J. A. Sloane_, following a suggestion from B. G. DeBoer, Dec 15 1978
%E A004210 Additional comments from Robert M. Burton, Jr. (bob(AT)oregonstate.edu), Feb 20 2005
%E A004210 More terms from _Joshua Zucker_, May 04 2006
%E A004210 Edited by _N. J. A. Sloane_, Sep 06 2008 at the suggestion of _R. J. Mathar_
%E A004210 Edited by _N. J. A. Sloane_, Feb 08 2012