login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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) for 1 <= i <= n} and {a(i), a(i)-a(j), a(i)+a(j) for 1 <= j < i <= n}.
(Formerly M2728)
5
1, 3, 8, 18, 30, 43, 67, 90, 122, 161, 202, 260, 305, 388, 416, 450, 555, 624, 730, 750, 983, 1059, 1159, 1330, 1528, 1645, 1774, 1921, 2140, 2289, 2580, 2632, 2881, 3158, 3304, 3510, 3745, 4086, 4563, 4741, 4928, 5052, 5407, 5864, 6242, 6528, 6739, 7253 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

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.

REFERENCES

D. R. Hofstadter, "Goedel, Escher, Bach: An Eternal Golden Braid", Basic Books Incorparated,pg. 73

P. Mark Kayll, Well-spread sequences and edge-labelings with constant Hamiltonian weight, Disc. Math. & Theor. Comp. Sci 6 2 (2004) 401-408

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, Table of n, a(n) for n=1..150

J. V. Silverton, On the generation of 'magic integrals', Acta Cryst. A34 (1978) p 634.

Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.

FORMULA

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]

MATHEMATICA

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}](* From Jean-François Alcover, Nov 10 2011 *)

PROG

(Haskell)

import Data.List (intersect)

a004210 n = a004210_list !! (n-1)

a004210_list = magics 1 [0] [0] where

   magics :: Integer -> [Integer] -> [Integer] -> [Integer]

   magics n ms tests

      | tests `intersect` nMinus == [] && tests `intersect` nPlus == []

      = n : magics (n+1) (n:ms) (nMinus ++ nPlus ++ tests)

      | otherwise

      = magics (n+1) ms tests

      where nMinus = map (n -) ms

            nPlus  = map (n +) ms

-- magics works also as generator for a126428_list, cf. A126428.

-- Reinhard Zumkeller, Mar 03 2011

CROSSREFS

Cf. A000969, A005228, A206522, A206523, A206524.

Sequence in context: A088589 A063597 A171701 * A119881 A184636 A075342

Adjacent sequences:  A004207 A004208 A004209 * A004211 A004212 A004213

KEYWORD

easy,nonn,nice,changed

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), following a suggestion from B. G. DeBoer, Dec 15 1978.

EXTENSIONS

Additional comments from Robert M. Burton, Jr. (bob(AT)oregonstate.edu), Feb 20 2005

More terms from Joshua Zucker (joshua.zucker(AT)stanfordalumni.org), May 04 2006

Edited by N. J. A. Sloane (njas(AT)research.att.com), Sep 06 2008 at the suggestion of R. J. Mathar

Edited by N. J. A. Sloane, Feb 08 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 19:13 EST 2012. Contains 206085 sequences.